diff --git a/.cursor/environment.json b/.cursor/environment.json new file mode 100644 index 00000000..aa6b9b85 --- /dev/null +++ b/.cursor/environment.json @@ -0,0 +1,17 @@ +{ + "name": "Ultra Card", + "install": "bash .cursor/install.sh", + "terminals": [ + { + "name": "demo-server", + "command": "python3 -m http.server 8765 --bind 0.0.0.0", + "description": "Static server for the standalone card demo. Open http://localhost:8765/website/_local-preview.html?p=modules-page-embed.html (also template-mode-page-embed.html and presets-page-embed.html). Run 'npm run build:demo' to refresh dist-demo/ultra-card-demo.js after changing source." + } + ], + "ports": [ + { + "name": "demo server", + "port": 8765 + } + ] +} diff --git a/.cursor/install.sh b/.cursor/install.sh new file mode 100755 index 00000000..bfa4796b --- /dev/null +++ b/.cursor/install.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Cloud Agent install script for Ultra Card. +# Idempotent: safe to run repeatedly against cached state. +set -euo pipefail + +# package.json pins "engines.node": ">=24.15.0" and CI runs on Node 24 +# (jsdom 30 used by the test suite requires it). The base image ships an older +# Node, so install the required version with nvm and make it the login default. +NODE_VERSION="24.15.0" + +export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" +# shellcheck disable=SC1091 +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +nvm install "$NODE_VERSION" +nvm alias default "$NODE_VERSION" +nvm use "$NODE_VERSION" + +echo "Using Node $(node --version) / npm $(npm --version)" + +# Reproducible install from the committed lockfile. +npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13a66c1a..9a5f73f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,11 +118,20 @@ jobs: cat release_notes.md >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - # Releases created below with the default GITHUB_TOKEN do NOT fire the - # `release: published` event (GitHub suppresses events from GITHUB_TOKEN - # to prevent workflow loops), so announce-release.yml never runs for - # tag-push releases. Record whether the release already exists so we can - # dispatch the announcement manually only when this workflow creates it. + # A release must never be visible to HACS without its assets. With + # content_in_root=false HACS looks for ultra-card.js among the release + # assets; when the release exists but the upload has not happened yet it + # falls back to the repo root, where ultra-card.js is committed but the + # uc-*.js chunks are gitignored. Users then get a new entry file with no + # chunks: no editor, modules stuck loading, and a permanent "Ultra Card + # was updated, reload" toast (3.10.0-beta8 and the first minutes of + # beta9). So: create the release as a DRAFT, attach every asset, and only + # then publish. HACS ignores drafts. `scripts/release.js` no longer + # creates the release itself for the same reason. + # + # Record whether a release already existed (e.g. created by hand) so the + # Discord announcement is only dispatched for releases this workflow + # publishes; a hand-made publish already fired `release: published`. - name: Check if release already exists id: existing_release env: @@ -134,15 +143,16 @@ jobs: echo "exists=false" >> $GITHUB_OUTPUT fi - - name: Create GitHub Release + - name: Create draft release and upload assets uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.ref_name }} name: What's New in ${{ steps.version.outputs.VERSION }} - draft: false + draft: true prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }} generate_release_notes: false body: ${{ steps.release_notes.outputs.RELEASE_NOTES }} + fail_on_unmatched_files: true # Every asset listed here is downloaded flat into each user's # www/community/Ultra-Card/ by HACS (content_in_root=false -> # release mode). Ship only files the browser needs; no zip. @@ -154,13 +164,29 @@ jobs: uc-*.js uc-*.js.LICENSE.txt + # Belt and braces: refuse to publish unless the entry file and at least + # one chunk are actually attached. A draft that fails here stays a draft + # (invisible to HACS) and can be inspected on the Releases page. + - name: Verify release assets before publishing + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ASSETS=$(gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" --json assets -q '.assets[].name') + echo "$ASSETS" + echo "$ASSETS" | grep -qx 'ultra-card.js' || { echo "::error::ultra-card.js is not attached to the release"; exit 1; } + echo "$ASSETS" | grep -q '^uc-.*\.js$' || { echo "::error::no uc-*.js chunks attached to the release"; exit 1; } + echo "Attached assets: $(echo "$ASSETS" | wc -l)" + + - name: Publish release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release edit "${{ github.ref_name }}" --repo "${{ github.repository }}" --draft=false + # `announce-release.yml` is the single source of truth for the Discord - # announcement. When the release was created by the local release script - # (user credentials), the `release: published` event fires and announces - # on its own; this workflow only updates that release, so we must NOT - # dispatch here or Discord would get a duplicate. When the release is - # created by THIS workflow (plain tag push), GITHUB_TOKEN suppresses the - # event, so we dispatch the announcement manually. + # announcement. Publishing with GITHUB_TOKEN does not fire the + # `release: published` event (GitHub suppresses events from GITHUB_TOKEN + # to prevent workflow loops), so dispatch it manually. Skip when the + # release pre-existed: that publish already announced itself. - name: Announce release to Discord if: steps.existing_release.outputs.exists == 'false' env: diff --git a/.gitignore b/.gitignore index b595da2b..f5d60ac5 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,10 @@ yarn-error.log* .idea # Cursor IDE -.cursor/ +.cursor/* +# Track the Cloud Agent dev environment config +!.cursor/environment.json +!.cursor/install.sh # Planning and implementation documents *_PLAN.md diff --git a/README.md b/README.md index 8cf8db6c..b7bb3889 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ https://github.com/user-attachments/assets/e9f28eee-e587-4bc0-ad0b-cea53a3fa5a6 **Visual editor** - Every setting lives in the UI. No YAML required. +**Ultra Dashboard** - A complete dashboard from your areas in one click (Settings → Dashboards → Add dashboard → Community dashboards). Pick a style, take control, and every card opens in the visual editor. [Read more](docs/ultra-dashboard.md). + **94 modules** - Layouts, gauges, graphs, controls, media, and more. Drag-and-drop columns with nesting so you can build the layout you want. **Template Mode** - Jinja2 templates that change how a module looks as your entities change. Free for everyone. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8884d1f7..e4de534c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,160 @@ # 🎉 Ultra Card - The Ultimate Home Assistant Card Experience +## Version 3.10.0-beta10 + +The tenth 3.10.0 beta adds two new PRO modules: **Boiler**, an animated boiler card for OpenTherm, water heater and central-heating setups, and **Train Departures**, a live departure board for your commute with a modern look or an LED dot-matrix style. It also fixes an entity picker bug on newer Home Assistant frontends that dropped the entity you had just picked, and lets Buttons fill a Stack Overlay layer edge to edge. It includes everything from beta9. This is a pre-release for testing — please report anything odd on GitHub or Discord. + +**If you install by hand instead of through HACS:** copy every file from this release into `www/community/Ultra-Card/`, not just `ultra-card.js`. HACS does this for you. Seeing around 120 files in that folder after updating is normal. + +### 🚀 New Features + +- **Added the Boiler module (PRO)** - An animated boiler card for OpenTherm, water heater and central-heating systems. Point it at a boiler or water heater entity and optionally at flow, return and target temperature, pressure, modulation, flame, heating, hot-water and power switch entities. The boiler graphic changes colour with the water temperature (cold, warm and hot thresholds and colours are yours to set), the flame and pipes animate while it is firing, a pressure readout with your own safe range is shown, and the target temperature can be adjusted from the card. Standard and Compact layouts, with every readout, the mode chips and the power button individually switchable +- **Added the Train Departures module (PRO)** - A departure board for one route. Feed it departure timestamp sensors from your public-transport integration (planned, expected, delay, platform and destination attributes from the common integrations are picked up automatically) or hand it a template for anything else, and it shows the next departures as train icons coloured by status (on time, delayed, cancelled), the planned and expected times, a live minutes-to-go countdown and any delay or cancellation. Choose **Modern** or **LED** board style, Standard or Compact layout, how many departures to show, the delay threshold, an "imminent" window, and 12 or 24-hour times. Three ready-made templates for it are in the template cheatsheet +- **Front-view trains on a receding track** - Each train in the board is drawn head-on: a bogie with a wheel at each side sitting on two rails that fan out toward you over sleepers that roll forward while the train is approaching. The LED style carves the windows, door seam and lamp rings out of the dot grid in the board colour with dim lit panes and headlights on, so the train shape reads clearly instead of collapsing into a glowing blob + +### 🔧 Improvements + +- **Boiler and Train Departures show up everywhere the other modules do** - Both have screenshots and hover animations in the Add Module gallery, entries in the module directory, and are understood by the Smart Card composer, so asking for a "boiler" or "train departures" card picks them and fills in sensible fields +- **Releases can no longer ship without their files** - The GitHub release is created as a draft and only published after `ultra-card.js` and its `uc-*.js` chunks are attached and verified, so HACS never sees an asset-less release like 3.10.0-beta8 again + +### 🐛 Bug Fixes + +- **Fixed entity pickers dropping the entity you just chose** - On newer Home Assistant frontends, picking an entity in a multi-entity field (the Train Departures sensors, and other chip-list pickers) would add it and immediately wipe it again, and the picker itself sometimes rendered as an empty box. The picker's own change event was escaping the chip list and hitting the module with the wrong payload, and newer frontends now pass a state object rather than an id to the filter. Both are handled +- **Fixed Buttons not filling a Stack Overlay layer** - A Button with height set to 100% inside a Stack Overlay layer used to collapse to its content height, so a full-tile tap target was not possible ([#132](https://github.com/WJDDesigns/Ultra-Card/issues/132)). Button containers now respect the design height and the percentage carries through the layer like it does for Images + +--- + +## Version 3.10.0-beta9 + +The ninth 3.10.0 beta makes Ultra Card's outer shell behave like a built-in Home Assistant card. Cards now render as a real `ha-card`, so HA themes and card-mod themes (including unusual ones like TET-49) apply border, radius, shadow and decoration the same way they do for every other card. New cards also stop freezing default chrome into their YAML so they can inherit the active theme. It includes everything from beta7. This is a pre-release for testing — please report anything odd on GitHub or Discord. + +**Replaces 3.10.0-beta8.** That release was published without its files, so HACS delivered only `ultra-card.js` with none of the `uc-*.js` chunks it needs. If you installed beta8 you will see a missing visual editor, modules stuck loading, and a permanent "Ultra Card was updated. Reload the page" message that no reload or cache clear fixes. Redownload Ultra Card in HACS and pick this version, then hard-refresh. + +**If you install by hand instead of through HACS:** copy every file from this release into `www/community/Ultra-Card/`, not just `ultra-card.js`. HACS does this for you. Seeing around 120 files in that folder after updating is normal. + +### 🔧 Improvements + +- **Ultra Cards follow Home Assistant themes like built-in cards** - The card shell is now a real `ha-card`, so theme variables for background, border width and colour, corner radius, shadow and backdrop filter apply automatically. card-mod theme rules that target `ha-card` (corner brackets, sharp frames, custom fonts, glow) also reach Ultra Cards the same way they reach every other card +- **New cards inherit theme chrome instead of baking it in** - Fresh cards from the picker no longer write a fixed 12px radius, divider-colour border or background into their YAML. Those fields stay unset so the Home Assistant theme (or an Ultra Card theme) can supply them. Existing cards keep whatever you already saved +- **Border settings can inherit from the theme** - In Card Settings → Border & Shadow, clearing radius, width or colour hands control back to the Home Assistant theme, and empty fields show "Inherit from theme" so that is obvious + +### 🐛 Bug Fixes + +- **Fixed Ultra Cards ignoring theme border and corner styles** - Themes that set `--ha-card-border-width`, `--ha-card-border-color` or a tight `--ha-card-border-radius` were not reflected on Ultra Cards because the shell was a plain `div` that never read those variables. They now match neighbouring built-in cards + +--- + +## Version 3.10.0-beta7 + +The seventh 3.10.0 beta is a polish release. The **Design tab** — the panel that styles every row, column and module — has been gone over from top to bottom so it is consistent, predictable and a little smarter, and a handful of long-standing quirks in it are fixed. The **Metallic**, **Vapor** and **Beach** themes have been refined, and bar values stay readable on light themes. It includes everything from beta6. This is a pre-release for testing — please report anything odd on GitHub or Discord. + +**If you install by hand instead of through HACS:** copy every file from this release into `www/community/Ultra-Card/`, not just `ultra-card.js`. HACS does this for you. Seeing around 120 files in that folder after updating is normal. + +### 🔧 Improvements + +- **A cleaner, more consistent Design tab** - Every section (Text, Background, Sizes, Spacing, Border, Position, shadows, Overflow, 3D Transform, Animations, Custom Targeting) now uses the same field layout, labels, hints and reset buttons. The Copy / Paste / Reset to Theme / Reset All buttons sit in a tidy 2×2 grid so no label is cut off, the per-field reset arrow only lights up when there is something to reset, dropdowns show their "Default" or "None" choice instead of an empty box and no longer carry a redundant clear button, and example hints are short enough to fit their fields +- **Spacing accepts any unit, and says so** - Margin and padding fields explain that they take px, rem, em, %, vw, auto or calc(), and that a bare number means pixels +- **Arrow keys respect the unit you typed** - Pressing Up/Down in a size, spacing, border or shadow field nudges the value in its own unit (1rem → 1.1rem, 5% → 10%, 1.5 → 2.5) instead of forcing pixels. Hold Shift to step ten times faster, Alt/Option for ten times finer. Empty fields start at 1px, rotations at 1deg +- **Reset All is thorough, but leaves your targeting alone** - It now clears every visual setting including background filters, 3D transform and animations, while keeping the CSS variable prefix, extra classes and element ID you set under Custom Targeting +- **Copy Design no longer carries the Element ID** - IDs have to be unique, so pasting a copied design onto another module will not duplicate one +- **Duration, Delay and Timing line up** - Mixed rows of text fields and dropdowns now share a baseline instead of sitting at different heights +- **Metallic theme reworked** - The card is a brushed-aluminium plate with spun-metal controls and sunk tracks; inner panes are a lighter alloy raised off the plate, and module backdrops become a faint glaze so the metal shows through instead of flat grey slabs +- **Vapor and Beach themes vary more** - Vapor cards now draw a sun, a moon or a bare sky and show or skip the grid from their own seed so neighbouring cards stop repeating; the Beach shell that was clipped at the dome is gone +- **Bar values readable on light themes** - The value text drawn across a bar flips to dark text with a light halo when the card is light. The module's default look is unchanged +- **ultracard.io Theme Builder** - The preview's brightness label stays readable on tinted themes like Terminal + +### 🐛 Bug Fixes + +- **Fixed Text Shadow and 3D Transform values disappearing from the editor** - Values were saved and rendered correctly but came back blank when you reopened the module's Design tab +- **Fixed section reset wiping the desktop design while editing a device** - Resetting a section on Laptop, Tablet or Mobile now clears only that device's overrides +- **Fixed the Font dropdown showing blank** - The font you had picked was not shown as selected when the Design tab first opened +- **Fixed the animation Duration field pretending a value was set** - It showed "2s" as if you had typed it; it now shows the default as a hint and stays empty until you set one +- **Fixed locked spacing saving three times** - Locking margin or padding to edit all sides together now saves in a single step + +--- + +## Version 3.10.0-beta6 + +The sixth 3.10.0 beta finishes what beta5 started: **every module style surface now speaks Theme Engine.** Light and Button Input follow theme control recipes, painted panes across the card announce themselves so glass and neumorphic backdrops actually apply, and coverage gates keep that from drifting. This is a pre-release for testing — please report anything odd on GitHub or Discord. + +**If you install by hand instead of through HACS:** copy every file from this release into `www/community/Ultra-Card/`, not just `ultra-card.js`. HACS does this for you. Seeing around 120 files in that folder after updating is normal. + +**Themes still do nothing until you pick one.** Cards keep their current look. Per-module styles you set by hand still win; modules left on "Theme" now pick up control and pane recipes consistently. + +### 🚀 New Features + +- **Light and Button Input now follow Theme Engine control recipes** - Their button style setting resolves through the same themed control pipeline as other controls. New modules default to **Theme** so they inherit `recipes.control`; older `filled` / `outlined` / `text` values still map cleanly to the matching recipe +- **Theme glass and neumorphic panes apply across modules** - Modules that paint a card-like surface now use `--uc-pane-*` tokens and announce `data-uc-role="pane"`, so theme backdrop-filter, border and shadow recipes reach popups, entity wrappers, calendars, maps, media players, gauges, navigation chrome and the rest of the painted UI — not just a handful of early adopters + +### 🔧 Improvements + +- **Theme module style coverage is gated at 100%** - Allow-listed style keys, Hub fields and surface-role registration stay in lockstep, and every `--uc-pane-*` consumer must declare the pane role (with a short, documented carve-out list for templates, full-bleed backgrounds and dead CSS) +- **Residual card backgrounds fall back through pane tokens** - Live `color-mix` and solid card-background paints across entity and layout modules now prefer `--uc-pane-bg`, so a theme's pane surface wins without each module inventing its own chrome +- **Built-in themes ship inside the website plugin as a fallback** - Plugin 1.3.37 embeds `data/builtin-themes.json` so the Theme Builder / harness still has the default catalog when the channel copy is missing, and phone hero offsets are measured from the real fixed header so content no longer sits under the three-row header + +### 🐛 Bug Fixes + +- **Fixed theme glass not applying on modules that already used pane colours** - Several modules referenced pane CSS variables but never set `data-uc-role="pane"`, so backdrop recipes from the theme base CSS never attached. Those surfaces now announce the role + +--- + +## Version 3.10.0-beta5 + +The fifth 3.10.0 beta adds **Themes**: one setting that restyles every Ultra Card on a dashboard at once — surface, corners, colours, shadows, wallpaper and the way each module draws its buttons, bars and panels. Fifteen themes ship with the card, from Liquid Glass and Material 3 to Green Terminal, Neumorphic and Wood, and you can build your own in the Hub or in the new Theme Builder on ultracard.io, then share it with the community. This is a pre-release for testing — please report anything odd on GitHub or Discord. + +**If you install by hand instead of through HACS:** copy every file from this release into `www/community/Ultra-Card/`, not just `ultra-card.js`. HACS does this for you. Seeing around 120 files in that folder after updating is normal. + +**Nothing changes until you pick a theme.** Every card keeps its current look. Bar, slider and button styles you chose by hand stay exactly as they were; only modules left on the new "Theme" setting follow the theme. + +### 🚀 New Features + +- **Added Themes: restyle every card at once** - Open the Ultra Card Hub and go to the new **Themes** tab, or pick a theme for one card under Card Settings → Appearance → Theme. A theme controls the card chrome (background, border, radius, shadow, blur), the accent and text palette, the inner panes that rows, tiles and chips draw, and per-module defaults. Set one as the **Global default** to theme your whole dashboard; set a different one on any card to override it. Ultra Dashboard now writes its style as a theme too +- **Fifteen built-in themes** - Glass, Bold, Monochrome, Material (following the Material 3 baseline with an expressive-shapes wallpaper), Neumorphic Light and Dark, Liquid Glass (Apple-style see-through glass with real refraction at the bezel), Hillary, Moose, Metallic, Beach, Vapor, Gummy, Wood and Green Terminal, plus HA Native which simply follows your Home Assistant theme. Several deal each card its own hue, highlight placement or artwork, so neighbouring cards never match exactly +- **Themes can paint the view** - A theme may set the Lovelace view background behind its cards (most of the built-ins do; Glass, Bold and Monochrome leave yours alone). Cards claim and release it cleanly, and your own view background wins if you set one +- **Build your own theme** - The Hub's theme editor and the **Theme Builder at ultracard.io/theme-builder** offer Simple mode (starter, surface, corners, shadow, density, font, accent and palette, page background) and Advanced mode (every token, pane styling, card chrome overrides, per-module defaults, grayscale and colour filters, custom CSS, image or SVG wallpapers with size limits, import/export JSON). A contrast fixer keeps text readable, "Tint everything to the accent" recolours a theme like Terminal to any hue, **Surprise me** generates a coherent random theme, and **Reset** returns to the starter you picked +- **Community theme catalog** - Submit a theme from the builder; after review it appears under Community in the Hub and on the new **ultracard.io/themes** gallery alongside the built-in Default themes, with live previews, star ratings, download counts, JSON copy/download and "Remix in builder". My Themes in the website dashboard tracks your submissions and syncs them into the Hub through Ultra Card Connect. Every submitted theme is sanitised server-side and scanned for CSS that could hide or cover content +- **Import a Home Assistant theme** - Turn any installed HA theme into a local Ultra theme from the Hub, light and dark variants included + +### 🔧 Improvements + +- **One surface vocabulary for every module** - Bar, slider, button, spinbox, popup, tabs, grid, entity list, activity feed, area summary and UniFi rack now share the same set of surface recipes (flat, glass, glossy, neumorphic, metallic, outline and friends) applied to four roles: controls, tracks, fills and panes. A theme picks a recipe per role and every module follows; your existing per-module style dropdowns still work and still win. Modules also expose `data-uc-surface` and `data-uc-role` attributes for theme CSS +- **Radii step down concentrically** - Inner elements scale their corners with the theme's card radius so nested panes and controls stay proportional at any size +- **Pinned palettes stay readable** - When a theme sets primary or card colours, the companion Home Assistant colours (secondary background, dividers, text) are derived automatically so nothing disappears +- **Hub Themes tab mirrors Presets** - Themes / My Themes with Default and Community sections, ratings and install counts, and the My Presets rows no longer collide on phones + +### 🐛 Bug Fixes + +- **Monochrome actually desaturates everything** - Modules with their own colours are now included through the new grayscale token +- **Theme picker hover effects only on pointer devices** - No stuck hover states on touch screens + +--- + +## Version 3.10.0-beta4 + +The fourth 3.10.0 beta turns Ultra Card into a dashboard builder. **Ultra Dashboard** creates a complete, good-looking dashboard from your areas and floors in one click — and unlike every other generated dashboard, you can take control of it and edit every single card in the visual editor. It is free, it needs Home Assistant 2026.5 or newer, and it uses only free modules. This beta also finishes the Dynamic List live-update bug from [#130](https://github.com/WJDDesigns/Ultra-Card/issues/130) and tightens drag-and-drop and keyboard reordering in the layout tree. This is a pre-release for testing — please report anything odd on GitHub or Discord. + +**If you install by hand instead of through HACS:** copy every file from this release into `www/community/Ultra-Card/`, not just `ultra-card.js`. HACS does this for you. Seeing around 120 files in that folder after updating is normal. + +### 🚀 New Features + +- **Added Ultra Dashboard, a complete dashboard in one click** - Go to Settings → Dashboards → Add dashboard and pick **Ultra Dashboard** under Community dashboards. You get a Home page with a clock and weather header, a tile for every room grouped by floor, and People, Alerts, Batteries and Updates blocks, plus a page for each room with its lights, climate, media, covers, fans, locks, cameras, security sensors and switches — each block only appears when the room has something for it. Rooms with no devices are skipped, and diagnostic entities like signal strength stay out of the way +- **Pick a style, then take control and edit anything** - Open the dashboard's Edit menu to choose between four styles (Classic, Soft, Glass and Bold), pages per area or per floor, which areas to include, and which Home blocks to show. When you are happy, choose **Take control**: every card becomes a regular Ultra Card that opens in the visual editor with its rows, columns and modules, so you can restyle a room, add a module, or rearrange a page like any other card. No other community dashboard can do this +- **Use just one room anywhere** - The room page is also available as a view you can drop into any existing dashboard with `strategy: { type: custom:ultra-dashboard-area, area: kitchen }`. See [docs/ultra-dashboard.md](https://github.com/WJDDesigns/Ultra-Card/blob/main/docs/ultra-dashboard.md) + +### 🔧 Improvements + +- **Room tiles pick the right thermometer** - When a room has several temperature or humidity sensors, the room tile now prefers one that is reporting a number and is not attached to an appliance, so a kitchen shows the room temperature rather than the oven or the fridge +- **The download stays small** - Ultra Dashboard adds about 1 KB to the file every dashboard loads; the generator and its settings panel are fetched only when you create or edit an Ultra Dashboard +- **Templates that return a CSS variable with a fallback now work** - A template producing `var(--my-color, #000000)` was being replaced with the default color. It is now used as written, matching the color picker fix in beta3. Thanks for the report in [#129](https://github.com/WJDDesigns/Ultra-Card/issues/129) + +### 🐛 Bug Fixes + +- **Fixed Dynamic Lists not updating after you save the card** - Changing a sensor on the live dashboard did nothing until you refreshed the page, and after every edit you had to press F5 before values started moving again. The list now keeps updating as soon as you save, including the Temperature Sensors example. Follow-up to [#130](https://github.com/WJDDesigns/Ultra-Card/issues/130) +- **Fixed drag and drop in the layout tree** - Dragging a row, column or module could highlight the wrong drop target, leave a dimmed ghost behind, or drop onto itself. The tree now tracks the drag cleanly from start to drop +- **Fixed moving a row, column or module down with the keyboard** - Moving an item down could land it in the wrong place because the insert point was off by one. It now swaps with the next sibling + +--- + ## Version 3.10.0-beta3 The third 3.10.0 beta cuts the download nearly in half again and works through the open GitHub reports: icon layout options, popup customization, the editor hanging on deeply nested layouts, drag and drop into empty columns, CSS variables with fallbacks, and Dynamic Lists stuck on placeholders after a page reload. The "Loading..." flash on phones from [#124](https://github.com/WJDDesigns/Ultra-Card/issues/124) should be much shorter now that the first download is 93% smaller than 3.9.0. This is a pre-release for testing — please report anything odd on GitHub or Discord. diff --git a/dist-demo/ultra-card-demo.js b/dist-demo/ultra-card-demo.js index 89269ff3..5ee4d5f3 100644 --- a/dist-demo/ultra-card-demo.js +++ b/dist-demo/ultra-card-demo.js @@ -1,5 +1,5 @@ /*! For license information please see ultra-card-demo.js.LICENSE.txt */ -(()=>{var e,t,i={4632(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,".swiper-fade {\n &.swiper-free-mode {\n .swiper-slide {\n transition-timing-function: ease-out;\n }\n }\n .swiper-slide {\n pointer-events: none;\n transition-property: opacity;\n .swiper-slide {\n pointer-events: none;\n }\n }\n .swiper-slide-active {\n pointer-events: auto;\n & .swiper-slide-active {\n pointer-events: auto;\n }\n }\n}\n",""]);const s=r},506(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,":root {\n --swiper-navigation-size: 44px;\n /*\n --swiper-navigation-top-offset: 50%;\n --swiper-navigation-sides-offset: 4px;\n --swiper-navigation-color: var(--swiper-theme-color);\n */\n}\n.swiper-button-prev,\n.swiper-button-next {\n position: absolute;\n\n width: var(--swiper-navigation-size);\n height: var(--swiper-navigation-size);\n\n z-index: 10;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n &.swiper-button-disabled {\n opacity: 0.35;\n cursor: auto;\n pointer-events: none;\n }\n &.swiper-button-hidden {\n opacity: 0;\n cursor: auto;\n pointer-events: none;\n }\n .swiper-navigation-disabled & {\n display: none !important;\n }\n\n ::slotted(svg),\n svg {\n width: 100%;\n height: 100%;\n object-fit: contain;\n transform-origin: center;\n fill: currentColor;\n pointer-events: none;\n }\n}\n\n.swiper-button-lock {\n display: none;\n}\n\n.swiper-button-prev,\n.swiper-button-next {\n top: var(--swiper-navigation-top-offset, 50%);\n margin-top: calc(0px - (var(--swiper-navigation-size) / 2));\n}\n.swiper-button-prev {\n left: var(--swiper-navigation-sides-offset, 4px);\n right: auto;\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(180deg);\n }\n}\n.swiper-button-next {\n right: var(--swiper-navigation-sides-offset, 4px);\n left: auto;\n}\n.swiper-horizontal {\n .swiper-button-prev,\n .swiper-button-next,\n ~ .swiper-button-prev,\n ~ .swiper-button-next {\n top: var(--swiper-navigation-top-offset, 50%);\n margin-top: calc(0px - (var(--swiper-navigation-size) / 2));\n margin-left: 0;\n }\n .swiper-button-prev,\n & ~ .swiper-button-prev,\n &.swiper-rtl .swiper-button-next,\n &.swiper-rtl ~ .swiper-button-next {\n left: var(--swiper-navigation-sides-offset, 4px);\n right: auto;\n }\n .swiper-button-next,\n & ~ .swiper-button-next,\n &.swiper-rtl .swiper-button-prev,\n &.swiper-rtl ~ .swiper-button-prev {\n right: var(--swiper-navigation-sides-offset, 4px);\n left: auto;\n }\n .swiper-button-prev,\n & ~ .swiper-button-prev,\n &.swiper-rtl .swiper-button-next,\n &.swiper-rtl ~ .swiper-button-next {\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(180deg);\n }\n }\n &.swiper-rtl .swiper-button-prev,\n &.swiper-rtl ~ .swiper-button-prev {\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(0deg);\n }\n }\n}\n.swiper-vertical {\n .swiper-button-prev,\n .swiper-button-next,\n ~ .swiper-button-prev,\n ~ .swiper-button-next {\n left: var(--swiper-navigation-top-offset, 50%);\n right: auto;\n margin-left: calc(0px - (var(--swiper-navigation-size) / 2));\n margin-top: 0;\n }\n .swiper-button-prev,\n ~ .swiper-button-prev {\n top: var(--swiper-navigation-sides-offset, 4px);\n bottom: auto;\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(-90deg);\n }\n }\n .swiper-button-next,\n ~ .swiper-button-next {\n bottom: var(--swiper-navigation-sides-offset, 4px);\n top: auto;\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(90deg);\n }\n }\n}\n",""]);const s=r},5124(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,":root {\n /*\n --swiper-pagination-color: var(--swiper-theme-color);\n --swiper-pagination-left: auto;\n --swiper-pagination-right: 8px;\n --swiper-pagination-bottom: 8px;\n --swiper-pagination-top: auto;\n --swiper-pagination-fraction-color: inherit;\n --swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);\n --swiper-pagination-progressbar-size: 4px;\n --swiper-pagination-bullet-size: 8px;\n --swiper-pagination-bullet-width: 8px;\n --swiper-pagination-bullet-height: 8px;\n --swiper-pagination-bullet-border-radius: 50%;\n --swiper-pagination-bullet-inactive-color: #000;\n --swiper-pagination-bullet-inactive-opacity: 0.2;\n --swiper-pagination-bullet-opacity: 1;\n --swiper-pagination-bullet-horizontal-gap: 4px;\n --swiper-pagination-bullet-vertical-gap: 6px;\n */\n}\n.swiper-pagination {\n position: absolute;\n text-align: center;\n transition: 300ms opacity;\n transform: translate3d(0, 0, 0);\n z-index: 10;\n &.swiper-pagination-hidden {\n opacity: 0;\n }\n .swiper-pagination-disabled > &,\n &.swiper-pagination-disabled {\n display: none !important;\n }\n}\n/* Common Styles */\n.swiper-pagination-fraction,\n.swiper-pagination-custom,\n.swiper-horizontal > .swiper-pagination-bullets,\n.swiper-pagination-bullets.swiper-pagination-horizontal {\n bottom: var(--swiper-pagination-bottom, 8px);\n top: var(--swiper-pagination-top, auto);\n left: 0;\n width: 100%;\n}\n/* Bullets */\n.swiper-pagination-bullets-dynamic {\n overflow: hidden;\n font-size: 0;\n .swiper-pagination-bullet {\n transform: scale(0.33);\n position: relative;\n }\n .swiper-pagination-bullet-active {\n transform: scale(1);\n }\n .swiper-pagination-bullet-active-main {\n transform: scale(1);\n }\n .swiper-pagination-bullet-active-prev {\n transform: scale(0.66);\n }\n .swiper-pagination-bullet-active-prev-prev {\n transform: scale(0.33);\n }\n .swiper-pagination-bullet-active-next {\n transform: scale(0.66);\n }\n .swiper-pagination-bullet-active-next-next {\n transform: scale(0.33);\n }\n}\n.swiper-pagination-bullet {\n width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));\n height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));\n display: inline-block;\n border-radius: var(--swiper-pagination-bullet-border-radius, 50%);\n background: var(--swiper-pagination-bullet-inactive-color, #000);\n opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);\n button& {\n border: none;\n margin: 0;\n padding: 0;\n box-shadow: none;\n appearance: none;\n }\n .swiper-pagination-clickable & {\n cursor: pointer;\n }\n\n &:only-child {\n display: none !important;\n }\n}\n.swiper-pagination-bullet-active {\n opacity: var(--swiper-pagination-bullet-opacity, 1);\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n}\n\n.swiper-vertical > .swiper-pagination-bullets,\n.swiper-pagination-vertical.swiper-pagination-bullets {\n right: var(--swiper-pagination-right, 8px);\n left: var(--swiper-pagination-left, auto);\n top: 50%;\n transform: translate3d(0px, -50%, 0);\n .swiper-pagination-bullet {\n margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;\n display: block;\n }\n &.swiper-pagination-bullets-dynamic {\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n .swiper-pagination-bullet {\n display: inline-block;\n transition:\n 200ms transform,\n 200ms top;\n }\n }\n}\n.swiper-horizontal > .swiper-pagination-bullets,\n.swiper-pagination-horizontal.swiper-pagination-bullets {\n .swiper-pagination-bullet {\n margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);\n }\n &.swiper-pagination-bullets-dynamic {\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n .swiper-pagination-bullet {\n transition:\n 200ms transform,\n 200ms left;\n }\n }\n}\n.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition:\n 200ms transform,\n 200ms right;\n}\n/* Fraction */\n.swiper-pagination-fraction {\n color: var(--swiper-pagination-fraction-color, inherit);\n}\n/* Progress */\n.swiper-pagination-progressbar {\n background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));\n position: absolute;\n .swiper-pagination-progressbar-fill {\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n transform: scale(0);\n transform-origin: left top;\n }\n .swiper-rtl & .swiper-pagination-progressbar-fill {\n transform-origin: right top;\n }\n .swiper-horizontal > &,\n &.swiper-pagination-horizontal,\n .swiper-vertical > &.swiper-pagination-progressbar-opposite,\n &.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {\n width: 100%;\n height: var(--swiper-pagination-progressbar-size, 4px);\n left: 0;\n top: 0;\n }\n .swiper-vertical > &,\n &.swiper-pagination-vertical,\n .swiper-horizontal > &.swiper-pagination-progressbar-opposite,\n &.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {\n width: var(--swiper-pagination-progressbar-size, 4px);\n height: 100%;\n left: 0;\n top: 0;\n }\n}\n.swiper-pagination-lock {\n display: none;\n}\n",""]);const s=r},3868(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,":root {\n /*\n --swiper-scrollbar-border-radius: 10px;\n --swiper-scrollbar-top: auto;\n --swiper-scrollbar-bottom: 4px;\n --swiper-scrollbar-left: auto;\n --swiper-scrollbar-right: 4px;\n --swiper-scrollbar-sides-offset: 1%;\n --swiper-scrollbar-bg-color: rgba(0, 0, 0, 0.1);\n --swiper-scrollbar-drag-bg-color: rgba(0, 0, 0, 0.5);\n --swiper-scrollbar-size: 4px;\n */\n}\n.swiper-scrollbar {\n border-radius: var(--swiper-scrollbar-border-radius, 10px);\n position: relative;\n touch-action: none;\n background: var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, 0.1));\n .swiper-scrollbar-disabled > &,\n &.swiper-scrollbar-disabled {\n display: none !important;\n }\n .swiper-horizontal > &,\n &.swiper-scrollbar-horizontal {\n position: absolute;\n left: var(--swiper-scrollbar-sides-offset, 1%);\n bottom: var(--swiper-scrollbar-bottom, 4px);\n top: var(--swiper-scrollbar-top, auto);\n z-index: 50;\n height: var(--swiper-scrollbar-size, 4px);\n width: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n }\n .swiper-vertical > &,\n &.swiper-scrollbar-vertical {\n position: absolute;\n left: var(--swiper-scrollbar-left, auto);\n right: var(--swiper-scrollbar-right, 4px);\n top: var(--swiper-scrollbar-sides-offset, 1%);\n z-index: 50;\n width: var(--swiper-scrollbar-size, 4px);\n height: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n }\n}\n.swiper-scrollbar-drag {\n height: 100%;\n width: 100%;\n position: relative;\n background: var(--swiper-scrollbar-drag-bg-color, rgba(0, 0, 0, 0.5));\n border-radius: var(--swiper-scrollbar-border-radius, 10px);\n left: 0;\n top: 0;\n}\n.swiper-scrollbar-cursor-drag {\n cursor: move;\n}\n.swiper-scrollbar-lock {\n display: none;\n}\n",""]);const s=r},2870(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,"/**\n * Swiper 12.2.0\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2026 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: May 27, 2026\n */\n\n:root {\n --swiper-theme-color: #007aff;\n /*\n --swiper-preloader-color: var(--swiper-theme-color);\n --swiper-wrapper-transition-timing-function: initial;\n */\n}\n:host {\n position: relative;\n display: block;\n margin-left: auto;\n margin-right: auto;\n z-index: 1;\n}\n.swiper {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n /* Fix of Webkit flickering */\n z-index: 1;\n display: block;\n}\n.swiper-vertical > .swiper-wrapper {\n flex-direction: column;\n}\n.swiper-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n}\n.swiper-android .swiper-slide,\n.swiper-ios .swiper-slide,\n.swiper-wrapper {\n transform: translate3d(0px, 0, 0);\n}\n.swiper-horizontal {\n touch-action: pan-y;\n}\n.swiper-vertical {\n touch-action: pan-x;\n}\n.swiper-slide {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n}\n.swiper-slide-invisible-blank {\n visibility: hidden;\n}\n/* Auto Height */\n.swiper-autoheight,\n.swiper-autoheight .swiper-slide {\n height: auto;\n}\n.swiper-autoheight .swiper-wrapper {\n align-items: flex-start;\n transition-property: transform, height;\n}\n.swiper-backface-hidden .swiper-slide {\n transform: translateZ(0);\n backface-visibility: hidden;\n}\n/* 3D Effects */\n.swiper-3d.swiper-css-mode .swiper-wrapper {\n perspective: 1200px;\n}\n.swiper-3d .swiper-wrapper {\n transform-style: preserve-3d;\n}\n.swiper-3d {\n perspective: 1200px;\n .swiper-slide,\n .swiper-cube-shadow {\n transform-style: preserve-3d;\n }\n}\n\n/* CSS Mode */\n.swiper-css-mode {\n > .swiper-wrapper {\n overflow: auto;\n scrollbar-width: none; /* For Firefox */\n -ms-overflow-style: none; /* For Internet Explorer and Edge */\n &::-webkit-scrollbar {\n display: none;\n }\n }\n > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: start start;\n }\n &.swiper-horizontal {\n > .swiper-wrapper {\n scroll-snap-type: x mandatory;\n }\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-inline-start: var(--swiper-slides-offset-before);\n scroll-margin-inline-start: var(--swiper-slides-offset-before);\n }\n > .swiper-wrapper > .swiper-slide:last-child {\n margin-inline-end: var(--swiper-slides-offset-after);\n }\n }\n &.swiper-vertical {\n > .swiper-wrapper {\n scroll-snap-type: y mandatory;\n }\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-block-start: var(--swiper-slides-offset-before);\n scroll-margin-block-start: var(--swiper-slides-offset-before);\n }\n > .swiper-wrapper > .swiper-slide:last-child {\n margin-block-end: var(--swiper-slides-offset-after);\n }\n }\n &.swiper-free-mode {\n > .swiper-wrapper {\n scroll-snap-type: none;\n }\n > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: none;\n }\n }\n &.swiper-centered {\n > .swiper-wrapper::before {\n content: '';\n flex-shrink: 0;\n order: 9999;\n }\n > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: center center;\n scroll-snap-stop: always;\n }\n }\n &.swiper-centered.swiper-horizontal {\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-inline-start: var(--swiper-centered-offset-before);\n }\n > .swiper-wrapper::before {\n height: 100%;\n min-height: 1px;\n width: var(--swiper-centered-offset-after);\n }\n }\n &.swiper-centered.swiper-vertical {\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-block-start: var(--swiper-centered-offset-before);\n }\n > .swiper-wrapper::before {\n width: 100%;\n min-width: 1px;\n height: var(--swiper-centered-offset-after);\n }\n }\n}\n\n/* Slide styles start */\n/* 3D Shadows */\n.swiper-3d {\n .swiper-slide-shadow,\n .swiper-slide-shadow-left,\n .swiper-slide-shadow-right,\n .swiper-slide-shadow-top,\n .swiper-slide-shadow-bottom,\n .swiper-slide-shadow,\n .swiper-slide-shadow-left,\n .swiper-slide-shadow-right,\n .swiper-slide-shadow-top,\n .swiper-slide-shadow-bottom {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 10;\n }\n .swiper-slide-shadow {\n background: rgba(0, 0, 0, 0.15);\n }\n .swiper-slide-shadow-left {\n background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n .swiper-slide-shadow-right {\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n .swiper-slide-shadow-top {\n background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n .swiper-slide-shadow-bottom {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n}\n.swiper-lazy-preloader {\n width: 42px;\n height: 42px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-left: -21px;\n margin-top: -21px;\n z-index: 10;\n transform-origin: 50%;\n box-sizing: border-box;\n border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));\n border-radius: 50%;\n border-top-color: transparent;\n}\n.swiper:not(.swiper-watch-progress),\n.swiper-watch-progress .swiper-slide-visible {\n .swiper-lazy-preloader {\n animation: swiper-preloader-spin 1s infinite linear;\n }\n}\n.swiper-lazy-preloader-white {\n --swiper-preloader-color: #fff;\n}\n.swiper-lazy-preloader-black {\n --swiper-preloader-color: #000;\n}\n@keyframes swiper-preloader-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n/* Slide styles end */\n",""]);const s=r},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,o,n,a){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(o)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},1601(e){"use strict";e.exports=function(e){return e[1]}},8153(e,t,i){"use strict";i.d(t,{forwardHaptic:()=>y,nu:()=>g,rC:()=>v});var o,n,a,r=function(e,t){return s(t).format(e)},s=function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric"})};(a=o||(o={})).language="language",a.system="system",a.comma_decimal="comma_decimal",a.decimal_comma="decimal_comma",a.space_comma="space_comma",a.none="none",function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(n||(n={}));var l=function(e){if(e.time_format===n.language||e.time_format===n.system){var t=e.time_format===n.language?e.language:void 0,i=(new Date).toLocaleString(t);return i.includes("AM")||i.includes("PM")}return e.time_format===n.am_pm},d=function(e,t){return c(t).format(e)},c=function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:l(e)?"numeric":"2-digit",minute:"2-digit",hour12:l(e)})},u=function(e,t){return p(t).format(e)},p=function(e){return new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hour12:l(e)})};function _(){return(_=Object.assign||function(e){for(var t=1;t-1?e.split(".")[1].length:0;i.minimumFractionDigits=o,i.maximumFractionDigits=o}return i},g=function(e,t,i,o){var n=void 0!==o?o:t.state;if("unknown"===n||"unavailable"===n)return e("state.default."+n);if(function(e){return!!e.attributes.unit_of_measurement||!!e.attributes.state_class}(t)){if("monetary"===t.attributes.device_class)try{return h(n,i,{style:"currency",currency:t.attributes.unit_of_measurement})}catch(e){}return h(n,i)+(t.attributes.unit_of_measurement?" "+t.attributes.unit_of_measurement:"")}var a=function(e){return function(e){return e.substr(0,e.indexOf("."))}(e.entity_id)}(t);if("input_datetime"===a){var s;if(void 0===o)return t.attributes.has_date&&t.attributes.has_time?(s=new Date(t.attributes.year,t.attributes.month-1,t.attributes.day,t.attributes.hour,t.attributes.minute),d(s,i)):t.attributes.has_date?(s=new Date(t.attributes.year,t.attributes.month-1,t.attributes.day),r(s,i)):t.attributes.has_time?((s=new Date).setHours(t.attributes.hour,t.attributes.minute),u(s,i)):t.state;try{var l=o.split(" ");if(2===l.length)return d(new Date(l.join("T")),i);if(1===l.length){if(o.includes("-"))return r(new Date(o+"T00:00"),i);if(o.includes(":")){var c=new Date;return u(new Date(c.toISOString().split("T")[0]+"T"+o),i)}}return o}catch(e){return o}}return"humidifier"===a&&"on"===n&&t.attributes.humidity?t.attributes.humidity+" %":"counter"===a||"number"===a||"input_number"===a?h(n,i):t.attributes.device_class&&e("component."+a+".state."+t.attributes.device_class+"."+n)||e("component."+a+".state._."+n)||n},v=(new Set(["fan","input_boolean","light","switch","group","automation"]),function(e,t,i,o){o=o||{},i=null==i?{}:i;var n=new Event(t,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return n.detail=i,e.dispatchEvent(n),n});new Set(["call-service","divider","section","weblink","cast","select"]);var y=function(e){v(window,"haptic",e)}},3481(e,t){!function(e){"use strict";function t(e){var t,i,o,n;for(i=1,o=arguments.length;i0?Math.floor(e):Math.ceil(e)};function I(e,t,i){return e instanceof P?e:g(e)?new P(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new P(e.x,e.y):new P(e,t,i)}function D(e,t){if(e)for(var i=t?[e,t]:e,o=0,n=i.length;o=this.min.x&&i.x<=this.max.x&&t.y>=this.min.y&&i.y<=this.max.y},intersects:function(e){e=M(e);var t=this.min,i=this.max,o=e.min,n=e.max,a=n.x>=t.x&&o.x<=i.x,r=n.y>=t.y&&o.y<=i.y;return a&&r},overlaps:function(e){e=M(e);var t=this.min,i=this.max,o=e.min,n=e.max,a=n.x>t.x&&o.xt.y&&o.y=o.lat&&i.lat<=n.lat&&t.lng>=o.lng&&i.lng<=n.lng},intersects:function(e){e=O(e);var t=this._southWest,i=this._northEast,o=e.getSouthWest(),n=e.getNorthEast(),a=n.lat>=t.lat&&o.lat<=i.lat,r=n.lng>=t.lng&&o.lng<=i.lng;return a&&r},overlaps:function(e){e=O(e);var t=this._southWest,i=this._northEast,o=e.getSouthWest(),n=e.getNorthEast(),a=n.lat>t.lat&&o.latt.lng&&o.lng1,Ce=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",l,t),window.removeEventListener("testPassiveEventSupport",l,t)}catch(e){}return e}(),Te=!!document.createElement("canvas").getContext,Pe=!(!document.createElementNS||!K("svg").createSVGRect),Ee=!!Pe&&((Q=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Ie=!Pe&&function(){try{var e=document.createElement("div");e.innerHTML='';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}();function De(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Me={ie:X,ielt9:ee,edge:te,webkit:ie,android:oe,android23:ne,androidStock:re,opera:se,chrome:le,gecko:de,safari:ce,phantom:ue,opera12:pe,win:_e,ie3d:he,webkit3d:me,gecko3d:ge,any3d:ve,mobile:ye,mobileWebkit:fe,mobileWebkit3d:be,msPointer:we,pointer:ke,touch:Se,touchNative:xe,mobileOpera:ze,mobileGecko:Ae,retina:$e,passiveEvents:Ce,canvas:Te,svg:Pe,vml:Ie,inlineSvg:Ee,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},je=Me.msPointer?"MSPointerDown":"pointerdown",Le=Me.msPointer?"MSPointerMove":"pointermove",Oe=Me.msPointer?"MSPointerUp":"pointerup",Ue=Me.msPointer?"MSPointerCancel":"pointercancel",Ne={touchstart:je,touchmove:Le,touchend:Oe,touchcancel:Ue},Re={touchstart:function(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ot(t),Je(e,t)},touchmove:Je,touchend:Je,touchcancel:Je},Fe={},He=!1;function Be(e,t,i){return"touchstart"===t&&(He||(document.addEventListener(je,qe,!0),document.addEventListener(Le,Ve,!0),document.addEventListener(Oe,Ge,!0),document.addEventListener(Ue,Ge,!0),He=!0)),Re[t]?(i=Re[t].bind(this,i),e.addEventListener(Ne[t],i,!1),i):(console.warn("wrong event specified:",t),l)}function qe(e){Fe[e.pointerId]=e}function Ve(e){Fe[e.pointerId]&&(Fe[e.pointerId]=e)}function Ge(e){delete Fe[e.pointerId]}function Je(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in t.touches=[],Fe)t.touches.push(Fe[i]);t.changedTouches=[t],e(t)}}var We,Ke,Ze,Qe,Ye,Xe=mt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),et=mt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tt="webkitTransition"===et||"OTransition"===et?et+"End":"transitionend";function it(e){return"string"==typeof e?document.getElementById(e):e}function ot(e,t){var i=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!i||"auto"===i)&&document.defaultView){var o=document.defaultView.getComputedStyle(e,null);i=o?o[t]:null}return"auto"===i?null:i}function nt(e,t,i){var o=document.createElement(e);return o.className=t||"",i&&i.appendChild(o),o}function at(e){var t=e.parentNode;t&&t.removeChild(e)}function rt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function lt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function dt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var i=_t(e);return i.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(i)}function ct(e,t){if(void 0!==e.classList)for(var i=u(t),o=0,n=i.length;o0?2*window.devicePixelRatio:1;function Ht(e){return Me.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Ft:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function Bt(e,t){var i=t.relatedTarget;if(!i)return!0;try{for(;i&&i!==e;)i=i.parentNode}catch(e){return!1}return i!==e}var qt={__proto__:null,on:$t,off:Tt,stopPropagation:Mt,disableScrollPropagation:jt,disableClickPropagation:Lt,preventDefault:Ot,stop:Ut,getPropagationPath:Nt,getMousePosition:Rt,getWheelDelta:Ht,isExternalTarget:Bt,addListener:$t,removeListener:Tt},Vt=T.extend({run:function(e,t,i,o){this.stop(),this._el=e,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=yt(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=S(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,i=1e3*this._duration;tthis.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var i=this.getCenter(),o=this._limitCenter(i,this._zoom,O(e));return i.equals(o)||this.panTo(o,t),this._enforcingBounds=!1,this},panInside:function(e,t){var i=I((t=t||{}).paddingTopLeft||t.padding||[0,0]),o=I(t.paddingBottomRight||t.padding||[0,0]),n=this.project(this.getCenter()),a=this.project(e),r=this.getPixelBounds(),s=M([r.min.add(i),r.max.subtract(o)]),l=s.getSize();if(!s.contains(a)){this._enforcingBounds=!0;var d=a.subtract(s.getCenter()),c=s.extend(a).getSize().subtract(l);n.x+=d.x<0?-c.x:c.x,n.y+=d.y<0?-c.y:c.y,this.panTo(this.unproject(n),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=t({animate:!1,pan:!0},!0===e?{animate:!0}:e);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),a=i.divideBy(2).round(),r=n.divideBy(2).round(),s=a.subtract(r);return s.x||s.y?(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=t({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,e):navigator.geolocation.getCurrentPosition(i,n,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,i=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new U(e.coords.latitude,e.coords.longitude),i=t.toBounds(2*e.coords.accuracy),o=this._locateOptions;if(o.setView){var n=this.getBoundsZoom(i);this.setView(t,o.maxZoom?Math.min(n,o.maxZoom):n)}var a={latlng:t,bounds:i,timestamp:e.timestamp};for(var r in e.coords)"number"==typeof e.coords[r]&&(a[r]=e.coords[r]);this.fire("locationfound",a)}},addHandler:function(e,t){if(!t)return this;var i=this[e]=new t(this);return this._handlers.push(i),this.options[e]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),at(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)at(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var i=nt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new j(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,i){e=O(e),i=I(i||[0,0]);var o=this.getZoom()||0,n=this.getMinZoom(),a=this.getMaxZoom(),r=e.getNorthWest(),s=e.getSouthEast(),l=this.getSize().subtract(i),d=M(this.project(s,o),this.project(r,o)).getSize(),c=Me.any3d?this.options.zoomSnap:1,u=l.x/d.x,p=l.y/d.y,_=t?Math.max(u,p):Math.min(u,p);return o=this.getScaleZoom(_,o),c&&(o=Math.round(o/(c/100))*(c/100),o=t?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(n,Math.min(a,o))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new P(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var i=this._getTopLeftPoint(e,t);return new D(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var i=this.options.crs;return t=void 0===t?this._zoom:t,i.scale(e)/i.scale(t)},getScaleZoom:function(e,t){var i=this.options.crs;t=void 0===t?this._zoom:t;var o=i.zoom(e*i.scale(t));return isNaN(o)?1/0:o},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(N(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(I(e),t)},layerPointToLatLng:function(e){var t=I(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(N(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(N(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(O(e))},distance:function(e,t){return this.options.crs.distance(N(e),N(t))},containerPointToLayerPoint:function(e){return I(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return I(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(I(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(e)))},mouseEventToContainerPoint:function(e){return Rt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=it(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");$t(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Me.any3d,ct(e,"leaflet-container"+(Me.touch?" leaflet-touch":"")+(Me.retina?" leaflet-retina":"")+(Me.ielt9?" leaflet-oldie":"")+(Me.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=ot(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),vt(this._mapPane,new P(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ct(e.markerPane,"leaflet-zoom-hide"),ct(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,i){vt(this._mapPane,new P(0,0));var o=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var n=this._zoom!==t;this._moveStart(n,i)._move(e,t)._moveEnd(n),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,i,o){void 0===t&&(t=this._zoom);var n=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),o?i&&i.pinch&&this.fire("zoom",i):((n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){vt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[a(this._container)]=this;var t=e?Tt:$t;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Me.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=S(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var i,o=[],n="mouseout"===t||"mouseover"===t,r=e.target||e.srcElement,s=!1;r;){if((i=this._targets[a(r)])&&("click"===t||"preclick"===t)&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(t,!0)){if(n&&!Bt(r,e))break;if(o.push(i),n)break}if(r===this._container)break;r=r.parentNode}return o.length||s||n||!this.listens(t,!0)||(o=[this]),o},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var i=e.type;"mousedown"===i&&kt(t),this._fireDOMEvent(e,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,i,o){if("click"===e.type){var n=t({},e);n.type="preclick",this._fireDOMEvent(n,n.type,o)}var a=this._findEventTargets(e,i);if(o){for(var r=[],s=0;s0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),i=this.getMaxZoom(),o=Me.any3d?this.options.zoomSnap:1;return o&&(e=Math.round(e/o)*o),Math.max(t,Math.min(i,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ut(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var i=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(i)||(this.panBy(i,t),0))},_createAnimProxy:function(){var e=this._proxy=nt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=Xe,i=this._proxy.style[t];gt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),i===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){at(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();gt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(t),n=this._getCenterOffset(e)._divideBy(1-1/o);return!(!0!==i.animate&&!this.getSize().contains(n)||(S(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(e,t,!0)},this),0))},_animateZoom:function(e,t,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,ct(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ut(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var Jt=$.extend({options:{position:"topright"},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),i=this.getPosition(),o=e._controlCorners[i];return ct(t,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(t,o.firstChild):o.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(at(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Wt=function(e){return new Jt(e)};Gt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",i=this._controlContainer=nt("div",t+"control-container",this._container);function o(o,n){var a=t+o+" "+t+n;e[o+n]=nt("div",a,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)at(this._controlCorners[e]);at(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Kt=Jt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,i,o){return i1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(a(e.target)),i=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;i&&this._map.fire(i,t)},_createRadioElement:function(e,t){var i='",o=document.createElement("div");return o.innerHTML=i,o.firstChild},_addItem:function(e){var t,i=document.createElement("label"),o=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=o):t=this._createRadioElement("leaflet-base-layers_"+a(this),o),this._layerControlInputs.push(t),t.layerId=a(e.layer),$t(t,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+e.name;var r=document.createElement("span");return i.appendChild(r),r.appendChild(t),r.appendChild(n),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var e,t,i=this._layerControlInputs,o=[],n=[];this._handlingClick=!0;for(var a=i.length-1;a>=0;a--)e=i[a],t=this._getLayer(e.layerId).layer,e.checked?o.push(t):e.checked||n.push(t);for(a=0;a=0;n--)e=i[n],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&ot.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,$t(e,"click",Ot),this.expand();var t=this;setTimeout(function(){Tt(e,"click",Ot),t._preventClick=!1})}}),Zt=Jt.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",i=nt("div",t+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,t+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,t+"-out",i,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,i,o,n){var a=nt("a",i,o);return a.innerHTML=e,a.href="#",a.title=t,a.setAttribute("role","button"),a.setAttribute("aria-label",t),Lt(a),$t(a,"click",Ut),$t(a,"click",n,this),$t(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";ut(this._zoomInButton,t),ut(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(ct(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(ct(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});Gt.mergeOptions({zoomControl:!0}),Gt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Zt,this.addControl(this.zoomControl))});var Qt=Jt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",i=nt("div",t),o=this.options;return this._addScales(o,t+"-line",i),e.on(o.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),i},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,i){e.metric&&(this._mScale=nt("div",t,i)),e.imperial&&(this._iScale=nt("div",t,i))},_update:function(){var e=this._map,t=e.getSize().y/2,i=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(i)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),i=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,i,t/e)},_updateImperial:function(e){var t,i,o,n=3.2808399*e;n>5280?(t=n/5280,i=this._getRoundNum(t),this._updateScale(this._iScale,i+" mi",i/t)):(o=this._getRoundNum(n),this._updateScale(this._iScale,o+" ft",o/n))},_updateScale:function(e,t,i){e.style.width=Math.round(this.options.maxWidth*i)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),i=e/t;return t*(i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),Yt=Jt.extend({options:{position:"bottomright",prefix:''+(Me.inlineSvg?' ':"")+"Leaflet"},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=nt("div","leaflet-control-attribution"),Lt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}});Gt.mergeOptions({attributionControl:!0}),Gt.addInitHook(function(){this.options.attributionControl&&(new Yt).addTo(this)});Jt.Layers=Kt,Jt.Zoom=Zt,Jt.Scale=Qt,Jt.Attribution=Yt,Wt.layers=function(e,t,i){return new Kt(e,t,i)},Wt.zoom=function(e){return new Zt(e)},Wt.scale=function(e){return new Qt(e)},Wt.attribution=function(e){return new Yt(e)};var Xt=$.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Xt.addTo=function(e,t){return e.addHandler(t,this),this};var ei={Events:C},ti=Me.touch?"touchstart mousedown":"mousedown",ii=T.extend({options:{clickTolerance:3},initialize:function(e,t,i,o){p(this,o),this._element=e,this._dragStartTarget=t||e,this._preventOutline=i},enable:function(){this._enabled||($t(this._dragStartTarget,ti,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ii._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,ti,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!dt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)ii._dragging===this&&this.finishDrag();else if(!(ii._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(ii._dragging=this,this._preventOutline&&kt(this._element),bt(),We(),this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,i=St(this._element);this._startPoint=new P(t.clientX,t.clientY),this._startPos=yt(this._element),this._parentScale=zt(i);var o="mousedown"===e.type;$t(document,o?"mousemove":"touchmove",this._onMove,this),$t(document,o?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,i=new P(t.clientX,t.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)t&&(i.push(e[o]),n=o);return nl&&(a=r,l=s);l>i&&(t[a]=1,ci(e,t,i,o,a),ci(e,t,i,a,n))}function ui(e,t,i,o,n){var a,r,s,l=o?ri:_i(e,i),d=_i(t,i);for(ri=d;;){if(!(l|d))return[e,t];if(l&d)return!1;s=_i(r=pi(e,t,a=l||d,i,n),i),a===l?(e=r,l=s):(t=r,d=s)}}function pi(e,t,i,o,n){var a,r,s=t.x-e.x,l=t.y-e.y,d=o.min,c=o.max;return 8&i?(a=e.x+s*(c.y-e.y)/l,r=c.y):4&i?(a=e.x+s*(d.y-e.y)/l,r=d.y):2&i?(a=c.x,r=e.y+l*(c.x-e.x)/s):1&i&&(a=d.x,r=e.y+l*(d.x-e.x)/s),new P(a,r,n)}function _i(e,t){var i=0;return e.xt.max.x&&(i|=2),e.yt.max.y&&(i|=8),i}function hi(e,t){var i=t.x-e.x,o=t.y-e.y;return i*i+o*o}function mi(e,t,i,o){var n,a=t.x,r=t.y,s=i.x-a,l=i.y-r,d=s*s+l*l;return d>0&&((n=((e.x-a)*s+(e.y-r)*l)/d)>1?(a=i.x,r=i.y):n>0&&(a+=s*n,r+=l*n)),s=e.x-a,l=e.y-r,o?s*s+l*l:new P(a,r)}function gi(e){return!g(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function vi(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gi(e)}function yi(e,t){var i,o,n,a,r,s,l,d;if(!e||0===e.length)throw new Error("latlngs not passed");gi(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var c=N([0,0]),u=O(e);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=ai(e));var p=e.length,_=[];for(i=0;io){l=(a-o)/n,d=[s.x-l*(s.x-r.x),s.y-l*(s.y-r.y)];break}var m=t.unproject(I(d));return N([m.lat+c.lat,m.lng+c.lng])}var fi={__proto__:null,simplify:li,pointToSegmentDistance:di,closestPointOnSegment:function(e,t,i){return mi(e,t,i)},clipSegment:ui,_getEdgeIntersection:pi,_getBitCode:_i,_sqClosestPointOnSegment:mi,isFlat:gi,_flat:vi,polylineCenter:yi},bi={project:function(e){return new P(e.lng,e.lat)},unproject:function(e){return new U(e.y,e.x)},bounds:new D([-180,-90],[180,90])},wi={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,i=this.R,o=e.lat*t,n=this.R_MINOR/i,a=Math.sqrt(1-n*n),r=a*Math.sin(o),s=Math.tan(Math.PI/4-o/2)/Math.pow((1-r)/(1+r),a/2);return o=-i*Math.log(Math.max(s,1e-10)),new P(e.lng*t*i,o)},unproject:function(e){for(var t,i=180/Math.PI,o=this.R,n=this.R_MINOR/o,a=Math.sqrt(1-n*n),r=Math.exp(-e.y/o),s=Math.PI/2-2*Math.atan(r),l=0,d=.1;l<15&&Math.abs(d)>1e-7;l++)t=a*Math.sin(s),t=Math.pow((1-t)/(1+t),a/2),s+=d=Math.PI/2-2*Math.atan(r*t)-s;return new U(s*i,e.x*i/o)}},ki={__proto__:null,LonLat:bi,Mercator:wi,SphericalMercator:q},xi=t({},H,{code:"EPSG:3395",projection:wi,transformation:function(){var e=.5/(Math.PI*wi.R);return G(e,.5,-e,.5)}()}),Si=t({},H,{code:"EPSG:4326",projection:bi,transformation:G(1/180,1,-1/180,.5)}),zi=t({},F,{projection:bi,transformation:G(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var i=t.lng-e.lng,o=t.lat-e.lat;return Math.sqrt(i*i+o*o)},infinite:!0});F.Earth=H,F.EPSG3395=xi,F.EPSG3857=J,F.EPSG900913=W,F.EPSG4326=Si,F.Simple=zi;var Ai=T.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[a(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[a(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var i=this.getEvents();t.on(i,this),this.once("remove",function(){t.off(i,this)},this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});Gt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=a(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=a(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return a(e)in this._layers},eachLayer:function(e,t){for(var i in this._layers)e.call(t,this._layers[i]);return this},_addLayers:function(e){for(var t=0,i=(e=e?g(e)?e:[e]:[]).length;tthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&t[0]instanceof U&&t[0].equals(t[i-1])&&t.pop(),t},_setLatLngs:function(e){Li.prototype._setLatLngs.call(this,e),gi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,i=new P(t,t);if(e=new D(e.min.subtract(i),e.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var o,n=0,a=this._rings.length;ne.y!=o.y>e.y&&e.x<(o.x-i.x)*(e.y-i.y)/(o.y-i.y)+i.x&&(d=!d);return d||Li.prototype._containsPoint.call(this,e,!0)}});var Ui=Ci.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,i,o,n=g(e)?e:e.features;if(n){for(t=0,i=n.length;t0&&n.push(n[0].slice()),n}function Vi(e,i){return e.feature?t({},e.feature,{geometry:i}):Gi(i)}function Gi(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var Ji={toGeoJSON:function(e){return Vi(this,{type:"Point",coordinates:Bi(this.getLatLng(),e)})}};function Wi(e,t){return new Ui(e,t)}Ii.include(Ji),ji.include(Ji),Mi.include(Ji),Li.include({toGeoJSON:function(e){var t=!gi(this._latlngs);return Vi(this,{type:(t?"Multi":"")+"LineString",coordinates:qi(this._latlngs,t?1:0,!1,e)})}}),Oi.include({toGeoJSON:function(e){var t=!gi(this._latlngs),i=t&&!gi(this._latlngs[0]),o=qi(this._latlngs,i?2:t?1:0,!0,e);return t||(o=[o]),Vi(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),$i.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(i){t.push(i.toGeoJSON(e).geometry.coordinates)}),Vi(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var i="GeometryCollection"===t,o=[];return this.eachLayer(function(t){if(t.toGeoJSON){var n=t.toGeoJSON(e);if(i)o.push(n.geometry);else{var a=Gi(n);"FeatureCollection"===a.type?o.push.apply(o,a.features):o.push(a)}}}),i?Vi(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});var Ki=Wi,Zi=Ai.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,i){this._url=e,this._bounds=O(t),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ct(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){at(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&st(this._image),this},bringToBack:function(){return this._map&<(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=O(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:nt("img");ct(t,"leaflet-image-layer"),this._zoomAnimated&&ct(t,"leaflet-zoom-animated"),this.options.className&&ct(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onload=o(this.fire,this,"load"),t.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;gt(this._image,i,t)},_reset:function(){var e=this._image,t=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=t.getSize();vt(e,t.min),e.style.width=i.x+"px",e.style.height=i.y+"px"},_updateOpacity:function(){ht(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Qi=Zi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:nt("video");if(ct(t,"leaflet-image-layer"),this._zoomAnimated&&ct(t,"leaflet-zoom-animated"),this.options.className&&ct(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onloadeddata=o(this.fire,this,"load"),e){for(var i=t.getElementsByTagName("source"),n=[],a=0;a0?n:[t.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var r=0;rn?(t.height=n+"px",ct(e,a)):ut(e,a),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),i=this._getAnchor();vt(this._container,t.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(ot(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+t,o=this._containerWidth,n=new P(this._containerLeft,-i-this._containerBottom);n._add(yt(this._container));var a=e.layerPointToContainerPoint(n),r=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||r),l=I(this.options.autoPanPaddingBottomRight||r),d=e.getSize(),c=0,u=0;a.x+o+l.x>d.x&&(c=a.x+o-d.x+l.x),a.x-c-s.x<0&&(c=a.x-s.x),a.y+i+l.y>d.y&&(u=a.y+i-d.y+l.y),a.y-u-s.y<0&&(u=a.y-s.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Gt.mergeOptions({closePopupOnClick:!0}),Gt.include({openPopup:function(e,t,i){return this._initOverlay(eo,e,t,i).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Ai.include({bindPopup:function(e,t){return this._popup=this._initOverlay(eo,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Ci||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Ut(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof Di?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var to=Xi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Xi.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Xi.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Xi.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=nt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,i,o=this._map,n=this._container,a=o.latLngToContainerPoint(o.getCenter()),r=o.layerPointToContainerPoint(e),s=this.options.direction,l=n.offsetWidth,d=n.offsetHeight,c=I(this.options.offset),u=this._getAnchor();"top"===s?(t=l/2,i=d):"bottom"===s?(t=l/2,i=0):"center"===s?(t=l/2,i=d/2):"right"===s?(t=0,i=d/2):"left"===s?(t=l,i=d/2):r.xthis.options.maxZoom||io&&this._retainParent(n,a,r,o))},_retainChildren:function(e,t,i,o){for(var n=2*e;n<2*e+2;n++)for(var a=2*t;a<2*t+2;a++){var r=new P(n,a);r.z=i+1;var s=this._tileCoordsToKey(r),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1this.options.maxZoom||void 0!==this.options.minZoom&&n1)this._setView(e,i);else{for(var u=n.min.y;u<=n.max.y;u++)for(var p=n.min.x;p<=n.max.x;p++){var _=new P(p,u);if(_.z=this._tileZoom,this._isValidTile(_)){var h=this._tiles[this._tileCoordsToKey(_)];h?h.current=!0:r.push(_)}}if(r.sort(function(e,t){return e.distanceTo(a)-t.distanceTo(a)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;pi.max.x)||!t.wrapLat&&(e.yi.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(e);return O(this.options.bounds).overlaps(o)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,i=this.getTileSize(),o=e.scaleBy(i),n=o.add(i);return[t.unproject(o,e.z),t.unproject(n,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),i=new j(t[0],t[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),i=new P(+t[0],+t[1]);return i.z=+t[2],i},_removeTile:function(e){var t=this._tiles[e];t&&(at(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){ct(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=l,e.onmousemove=l,Me.ielt9&&this.options.opacity<1&&ht(e,this.options.opacity)},_addTile:function(e,t){var i=this._getTilePos(e),n=this._tileCoordsToKey(e),a=this.createTile(this._wrapCoords(e),o(this._tileReady,this,e));this._initTile(a),this.createTile.length<2&&S(o(this._tileReady,this,e,null,a)),vt(a,i),this._tiles[n]={el:a,coords:e,current:!0},t.appendChild(a),this.fire("tileloadstart",{tile:a,coords:e})},_tileReady:function(e,t,i){t&&this.fire("tileerror",{error:t,tile:i,coords:e});var n=this._tileCoordsToKey(e);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ht(i.el,0),z(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),t||(ct(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Me.ielt9||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new P(this._wrapX?s(e.x,this._wrapX):e.x,this._wrapY?s(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new D(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});var no=oo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=p(this,t)).detectRetina&&Me.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var i=document.createElement("img");return $t(i,"load",o(this._tileOnLoad,this,t,i)),$t(i,"error",o(this._tileOnError,this,t,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(e),i},getTileUrl:function(e){var i={r:Me.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(i.y=o),i["-y"]=o}return m(this._url,t(i,this.options))},_tileOnLoad:function(e,t){Me.ielt9?setTimeout(o(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,i){var o=this.options.errorTileUrl;o&&t.getAttribute("src")!==o&&(t.src=o),e(i,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=l,t.onerror=l,!t.complete)){t.src=y;var i=this._tiles[e].coords;at(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:i})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",y),oo.prototype._removeTile.call(this,e)},_tileReady:function(e,t,i){if(this._map&&(!i||i.getAttribute("src")!==y))return oo.prototype._tileReady.call(this,e,t,i)}});function ao(e,t){return new no(e,t)}var ro=no.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,i){this._url=e;var o=t({},this.defaultWmsParams);for(var n in i)n in this.options||(o[n]=i[n]);var a=(i=p(this,i)).detectRetina&&Me.retina?2:1,r=this.getTileSize();o.width=r.x*a,o.height=r.y*a,this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,no.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),i=this._crs,o=M(i.project(t[0]),i.project(t[1])),n=o.min,a=o.max,r=(this._wmsVersion>=1.3&&this._crs===Si?[n.y,n.x,a.y,a.x]:[n.x,n.y,a.x,a.y]).join(","),s=no.prototype.getTileUrl.call(this,e);return s+_(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(e,i){return t(this.wmsParams,e),i||this.redraw(),this}});no.WMS=ro,ao.wms=function(e,t){return new ro(e,t)};var so=Ai.extend({options:{padding:.1},initialize:function(e){p(this,e),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ct(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var i=this._map.getZoomScale(t,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),n=this._map.project(this._center,t),a=o.multiplyBy(-i).add(n).subtract(this._map._getNewPixelOrigin(e,t));Me.any3d?gt(this._container,a,i):vt(this._container,a)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),i=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new D(i,i.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),lo=so.extend({options:{tolerance:0},getEvents:function(){var e=so.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){so.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");$t(e,"mousemove",this._onMouseMove,this),$t(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),$t(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,at(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){so.prototype._update.call(this);var e=this._bounds,t=this._container,i=e.getSize(),o=Me.retina?2:1;vt(t,e.min),t.width=o*i.x,t.height=o*i.y,t.style.width=i.x+"px",t.style.height=i.y+"px",Me.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){so.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[a(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,i=t.next,o=t.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete e._order,delete this._layers[a(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,i,o=e.options.dashArray.split(/[, ]+/),n=[];for(i=0;i')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),po={_initContainer:function(){this._container=nt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(so.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=uo("shape");ct(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=uo("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;at(t),e.removeInteractiveTarget(t),delete this._layers[a(e)]},_updateStyle:function(e){var t=e._stroke,i=e._fill,o=e.options,n=e._container;n.stroked=!!o.stroke,n.filled=!!o.fill,o.stroke?(t||(t=e._stroke=uo("stroke")),n.appendChild(t),t.weight=o.weight+"px",t.color=o.color,t.opacity=o.opacity,o.dashArray?t.dashStyle=g(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=o.lineCap.replace("butt","flat"),t.joinstyle=o.lineJoin):t&&(n.removeChild(t),e._stroke=null),o.fill?(i||(i=e._fill=uo("fill")),n.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(n.removeChild(i),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),i=Math.round(e._radius),o=Math.round(e._radiusY||i);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+i+","+o+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){st(e._container)},_bringToBack:function(e){lt(e._container)}},_o=Me.vml?uo:K,ho=so.extend({_initContainer:function(){this._container=_o("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=_o("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){at(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){so.prototype._update.call(this);var e=this._bounds,t=e.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,i.setAttribute("width",t.x),i.setAttribute("height",t.y)),vt(i,e.min),i.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=_o("path");e.options.className&&ct(t,e.options.className),e.options.interactive&&ct(t,"leaflet-interactive"),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){at(e._path),e.removeInteractiveTarget(e._path),delete this._layers[a(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,i=e.options;t&&(i.stroke?(t.setAttribute("stroke",i.color),t.setAttribute("stroke-opacity",i.opacity),t.setAttribute("stroke-width",i.weight),t.setAttribute("stroke-linecap",i.lineCap),t.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?t.setAttribute("stroke-dasharray",i.dashArray):t.removeAttribute("stroke-dasharray"),i.dashOffset?t.setAttribute("stroke-dashoffset",i.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),i.fill?(t.setAttribute("fill",i.fillColor||i.color),t.setAttribute("fill-opacity",i.fillOpacity),t.setAttribute("fill-rule",i.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,Z(e._parts,t))},_updateCircle:function(e){var t=e._point,i=Math.max(Math.round(e._radius),1),o="a"+i+","+(Math.max(Math.round(e._radiusY),1)||i)+" 0 1,0 ",n=e._empty()?"M0 0":"M"+(t.x-i)+","+t.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(e,n)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){st(e._path)},_bringToBack:function(e){lt(e._path)}});function mo(e){return Me.svg||Me.vml?new ho(e):null}Me.vml&&ho.include(po),Gt.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&co(e)||mo(e)}});var go=Oi.extend({initialize:function(e,t){Oi.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=O(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});ho.create=_o,ho.pointsToPath=Z,Ui.geometryToLayer=Ni,Ui.coordsToLatLng=Fi,Ui.coordsToLatLngs=Hi,Ui.latLngToCoords=Bi,Ui.latLngsToCoords=qi,Ui.getFeature=Vi,Ui.asFeature=Gi,Gt.mergeOptions({boxZoom:!0});var vo=Xt.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){$t(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){at(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),We(),bt(),this._startPoint=this._map.mouseEventToContainerPoint(e),$t(document,{contextmenu:Ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=nt("div","leaflet-zoom-box",this._container),ct(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new D(this._point,this._startPoint),i=t.getSize();vt(this._box,t.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(at(this._box),ut(this._container,"leaflet-crosshair")),Ke(),wt(),Tt(document,{contextmenu:Ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var t=new j(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Gt.addInitHook("addHandler","boxZoom",vo),Gt.mergeOptions({doubleClickZoom:!0});var yo=Xt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,i=t.getZoom(),o=t.options.zoomDelta,n=e.originalEvent.shiftKey?i-o:i+o;"center"===t.options.doubleClickZoom?t.setZoom(n):t.setZoomAround(e.containerPoint,n)}});Gt.addInitHook("addHandler","doubleClickZoom",yo),Gt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var fo=Xt.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new ii(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}ct(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ut(this._map._container,"leaflet-grab"),ut(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=O(this._map.options.maxBounds);this._offsetLimit=M(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.xt.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),i=this._initialWorldOffset,o=this._draggable._newPos.x,n=(o-t+i)%e+t-i,a=(o+t+i)%e-t-i,r=Math.abs(n+i)0?a:-a))-t;this._delta=0,this._startTime=null,r&&("center"===e.options.scrollWheelZoom?e.setZoom(t+r):e.setZoomAround(this._lastMousePos,t+r))}});Gt.addInitHook("addHandler","scrollWheelZoom",wo);Gt.mergeOptions({tapHold:Me.touchNative&&Me.safari&&Me.mobile,tapTolerance:15});var ko=Xt.extend({addHooks:function(){$t(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new P(t.clientX,t.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&($t(document,"touchend",Ot),$t(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),600),$t(document,"touchend touchcancel contextmenu",this._cancel,this),$t(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Tt(document,"touchend",Ot),Tt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new P(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var i=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});i._simulated=!0,t.target.dispatchEvent(i)}});Gt.addInitHook("addHandler","tapHold",ko),Gt.mergeOptions({touchZoom:Me.touch,bounceAtZoomLimits:!0});var xo=Xt.extend({addHooks:function(){ct(this._map._container,"leaflet-touch-zoom"),$t(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ut(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var i=t.mouseEventToContainerPoint(e.touches[0]),o=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(i.add(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),$t(document,"touchmove",this._onTouchMove,this),$t(document,"touchend touchcancel",this._onTouchEnd,this),Ot(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,i=t.mouseEventToContainerPoint(e.touches[0]),n=t.mouseEventToContainerPoint(e.touches[1]),a=i.distanceTo(n)/this._startDist;if(this._zoom=t.getScaleZoom(a,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoomt.getMaxZoom()&&a>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===a)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===a&&0===r.x&&0===r.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var s=o(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=S(s,this,!0),Ot(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Gt.addInitHook("addHandler","touchZoom",xo),Gt.BoxZoom=vo,Gt.DoubleClickZoom=yo,Gt.Drag=fo,Gt.Keyboard=bo,Gt.ScrollWheelZoom=wo,Gt.TapHold=ko,Gt.TouchZoom=xo,e.Bounds=D,e.Browser=Me,e.CRS=F,e.Canvas=lo,e.Circle=ji,e.CircleMarker=Mi,e.Class=$,e.Control=Jt,e.DivIcon=io,e.DivOverlay=Xi,e.DomEvent=qt,e.DomUtil=At,e.Draggable=ii,e.Evented=T,e.FeatureGroup=Ci,e.GeoJSON=Ui,e.GridLayer=oo,e.Handler=Xt,e.Icon=Ti,e.ImageOverlay=Zi,e.LatLng=U,e.LatLngBounds=j,e.Layer=Ai,e.LayerGroup=$i,e.LineUtil=fi,e.Map=Gt,e.Marker=Ii,e.Mixin=ei,e.Path=Di,e.Point=P,e.PolyUtil=si,e.Polygon=Oi,e.Polyline=Li,e.Popup=eo,e.PosAnimation=Vt,e.Projection=ki,e.Rectangle=go,e.Renderer=so,e.SVG=ho,e.SVGOverlay=Yi,e.TileLayer=no,e.Tooltip=to,e.Transformation=V,e.Util=A,e.VideoOverlay=Qi,e.bind=o,e.bounds=M,e.canvas=co,e.circle=function(e,t,i){return new ji(e,t,i)},e.circleMarker=function(e,t){return new Mi(e,t)},e.control=Wt,e.divIcon=function(e){return new io(e)},e.extend=t,e.featureGroup=function(e,t){return new Ci(e,t)},e.geoJSON=Wi,e.geoJson=Ki,e.gridLayer=function(e){return new oo(e)},e.icon=function(e){return new Ti(e)},e.imageOverlay=function(e,t,i){return new Zi(e,t,i)},e.latLng=N,e.latLngBounds=O,e.layerGroup=function(e,t){return new $i(e,t)},e.map=function(e,t){return new Gt(e,t)},e.marker=function(e,t){return new Ii(e,t)},e.point=I,e.polygon=function(e,t){return new Oi(e,t)},e.polyline=function(e,t){return new Li(e,t)},e.popup=function(e,t){return new eo(e,t)},e.rectangle=function(e,t){return new go(e,t)},e.setOptions=p,e.stamp=a,e.svg=mo,e.svgOverlay=function(e,t,i){return new Yi(e,t,i)},e.tileLayer=ao,e.tooltip=function(e,t){return new to(e,t)},e.transformation=G,e.version="1.9.4",e.videoOverlay=function(e,t,i){return new Qi(e,t,i)};var So=window.L;e.noConflict=function(){return window.L=So,this},window.L=e}(t)},7283(e){var t;t=()=>(()=>{var e={873:(e,t)=>{var i,o,n=function(){var e=function(e,t){var i=e,o=r[t],n=null,a=0,l=null,g=[],v={},f=function(e,t){n=function(e){for(var t=new Array(e),i=0;i=7&&x(e),null==l&&(l=A(i,o,g)),z(l,t)},b=function(e,t){for(var i=-1;i<=7;i+=1)if(!(e+i<=-1||a<=e+i))for(var o=-1;o<=7;o+=1)t+o<=-1||a<=t+o||(n[e+i][t+o]=0<=i&&i<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==i||6==i)||2<=i&&i<=4&&2<=o&&o<=4)},w=function(){for(var e=8;e>o&1);n[Math.floor(o/3)][o%3+a-8-3]=r}for(o=0;o<18;o+=1)r=!e&&1==(t>>o&1),n[o%3+a-8-3][Math.floor(o/3)]=r},S=function(e,t){for(var i=o<<3|t,r=s.getBCHTypeInfo(i),l=0;l<15;l+=1){var d=!e&&1==(r>>l&1);l<6?n[l][8]=d:l<8?n[l+1][8]=d:n[a-15+l][8]=d}for(l=0;l<15;l+=1)d=!e&&1==(r>>l&1),l<8?n[8][a-l-1]=d:l<9?n[8][15-l-1+1]=d:n[8][15-l-1]=d;n[a-8][8]=!e},z=function(e,t){for(var i=-1,o=a-1,r=7,l=0,d=s.getMaskFunction(t),c=a-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var u=0;u<2;u+=1)if(null==n[o][c-u]){var p=!1;l>>r&1)),d(o,c-u)&&(p=!p),n[o][c-u]=p,-1==(r-=1)&&(l+=1,r=7)}if((o+=i)<0||a<=o){o-=i,i=-i;break}}},A=function(e,t,i){for(var o=c.getRSBlocks(e,t),n=u(),a=0;a8*l)throw"code length overflow. ("+n.getLengthInBits()+">"+8*l+")";for(n.getLengthInBits()+4<=8*l&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*l||(n.put(236,8),n.getLengthInBits()>=8*l));)n.put(17,8);return function(e,t){for(var i=0,o=0,n=0,a=new Array(t.length),r=new Array(t.length),l=0;l=0?h.getAt(m):0}}var g=0;for(p=0;po)&&(e=o,t=i)}return t}())},v.createTableTag=function(e,t){e=e||2;var i="";i+='',i+="";for(var o=0;o";for(var n=0;n';i+=""}return(i+="")+"
"},v.createSvgTag=function(e,t,i,o){var n={};"object"==typeof arguments[0]&&(e=(n=arguments[0]).cellSize,t=n.margin,i=n.alt,o=n.title),e=e||2,t=void 0===t?4*e:t,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-description":null,(o="string"==typeof o?{text:o}:o||{}).text=o.text||null,o.id=o.text?o.id||"qrcode-title":null;var a,r,s,l,d=v.getModuleCount()*e+2*t,c="";for(l="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",c+=''+$(o.text)+"":"",c+=i.text?''+$(i.text)+"":"",c+='',c+='"},v.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var i=v.getModuleCount()*e+2*t,o=t,n=i-t;return y(i,i,function(t,i){if(o<=t&&t"};var $=function(e){for(var t="",i=0;i":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=o}}return t};return v.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,i,o,n,a,r=1*v.getModuleCount()+2*e,s=e,l=r-e,d={"██":"█","█ ":"▀"," █":"▄"," ":" "},c={"██":"▀","█ ":"▀"," █":" "," ":" "},u="";for(t=0;t=l?c[a]:d[a];u+="\n"}return r%2&&e>0?u.substring(0,u.length-r-1)+Array(r+1).join("▀"):u.substring(0,u.length-1)}(t);e-=1,t=void 0===t?2*e:t;var i,o,n,a,r=v.getModuleCount()*e+2*t,s=t,l=r-t,d=Array(e+1).join("██"),c=Array(e+1).join(" "),u="",p="";for(i=0;i>>8),t.push(255&r)):t.push(o)}}return t}};var t,i,o,n,a,r={L:1,M:0,Q:3,H:2},s=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],i=1335,o=7973,a=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(n={}).getBCHTypeInfo=function(e){for(var t=e<<10;a(t)-a(i)>=0;)t^=i<=0;)t^=o<5&&(i+=3+a-5)}for(o=0;o=256;)t-=255;return e[t]}}}();function d(e,t){if(void 0===e.length)throw e.length+"/"+t;var i=function(){for(var i=0;i>>7-t%8&1)},put:function(e,t){for(var o=0;o>>t-o-1&1))},getLengthInBits:function(){return t},putBit:function(i){var o=Math.floor(t/8);e.length<=o&&e.push(0),i&&(e[o]|=128>>>t%8),t+=1}};return i},p=function(e){var t=e,i={getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var i=t,n=0;n+2>>8&255)+(255&n),e.put(n,13),i+=2}if(i>>8)},writeBytes:function(e,i,o){i=i||0,o=o||e.length;for(var n=0;n0&&(t+=","),t+=e[i];return t+"]"}};return t},v=function(e){var t=e,i=0,o=0,n=0,a={read:function(){for(;n<8;){if(i>=t.length){if(0==n)return-1;throw"unexpected end of file./"+n}var e=t.charAt(i);if(i+=1,"="==e)return n=0,-1;e.match(/^\s$/)||(o=o<<6|r(e.charCodeAt(0)),n+=6)}var a=o>>>n-8&255;return n-=8,a}},r=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return a},y=function(e,t,i){for(var o=function(e,t){var i=e,o=t,n=new Array(e*t),a={setPixel:function(e,t,o){n[t*i+e]=o},write:function(e){e.writeString("GIF87a"),e.writeShort(i),e.writeShort(o),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(i),e.writeShort(o),e.writeByte(0);var t=r(2);e.writeByte(2);for(var n=0;t.length-n>255;)e.writeByte(255),e.writeBytes(t,n,255),n+=255;e.writeByte(t.length-n),e.writeBytes(t,n,t.length-n),e.writeByte(0),e.writeString(";")}},r=function(e){for(var t=1<>>t!=0)throw"length over";for(;d+t>=8;)l.writeByte(255&(e<>>=8-d,c=0,d=0;c|=e<0&&l.writeByte(c)}});p.write(t,o);var _=0,h=String.fromCharCode(n[_]);for(_+=1;_=6;)a(e>>>t-6),t-=6},n.flush=function(){if(t>0&&(a(e<<6-t),e=0,t=0),i%3!=0)for(var n=3-i%3,r=0;r>6,128|63&o):o<55296||o>=57344?t.push(224|o>>12,128|o>>6&63,128|63&o):(i++,o=65536+((1023&o)<<10|1023&e.charCodeAt(i)),t.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return t}(e)},void 0===(o="function"==typeof(i=function(){return n})?i.apply(t,[]):i)||(e.exports=o)}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};return(()=>{"use strict";i.d(o,{default:()=>$});const e=e=>!!e&&"object"==typeof e&&!Array.isArray(e);function t(i,...o){if(!o.length)return i;const n=o.shift();return void 0!==n&&e(i)&&e(n)?(i=Object.assign({},i),Object.keys(n).forEach(o=>{const a=i[o],r=n[o];Array.isArray(a)&&Array.isArray(r)?i[o]=r:e(a)&&e(r)?i[o]=t(Object.assign({},a),r):i[o]=r}),t(i,...o)):i}function n(e,t){const i=document.createElement("a");i.download=t,i.href=e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}const a={L:.07,M:.15,Q:.25,H:.3};class r{constructor({svg:e,type:t,window:i}){this._svg=e,this._type=t,this._window=i}draw(e,t,i,o){let n;switch(this._type){case"dots":n=this._drawDot;break;case"classy":n=this._drawClassy;break;case"classy-rounded":n=this._drawClassyRounded;break;case"rounded":n=this._drawRounded;break;case"extra-rounded":n=this._drawExtraRounded;break;default:n=this._drawSquare}n.call(this,{x:e,y:t,size:i,getNeighbor:o})}_rotateFigure({x:e,y:t,size:i,rotation:o=0,draw:n}){var a;const r=e+i/2,s=t+i/2;n(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*o/Math.PI},${r},${s})`)}_basicDot(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(i+t/2)),this._element.setAttribute("cy",String(o+t/2)),this._element.setAttribute("r",String(t/2))}}))}_basicSquare(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(i)),this._element.setAttribute("y",String(o)),this._element.setAttribute("width",String(t)),this._element.setAttribute("height",String(t))}}))}_basicSideRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h `+t/2+`a ${t/2} ${t/2}, 0, 0, 0, 0 ${-t}`)}}))}_basicCornerRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h ${t}v `+-t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${-t/2} ${-t/2}`)}}))}_basicCornerExtraRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h ${t}a ${t} ${t}, 0, 0, 0, ${-t} ${-t}`)}}))}_basicCornersRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v `+t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${t/2} ${t/2}h `+t/2+"v "+-t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${-t/2} ${-t/2}`)}}))}_drawDot({x:e,y:t,size:i}){this._basicDot({x:e,y:t,size:i,rotation:0})}_drawSquare({x:e,y:t,size:i}){this._basicSquare({x:e,y:t,size:i,rotation:0})}_drawRounded({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0,l=n+a+r+s;if(0!==l)if(l>2||n&&a||r&&s)this._basicSquare({x:e,y:t,size:i,rotation:0});else{if(2===l){let o=0;return n&&r?o=Math.PI/2:r&&a?o=Math.PI:a&&s&&(o=-Math.PI/2),void this._basicCornerRounded({x:e,y:t,size:i,rotation:o})}if(1===l){let o=0;return r?o=Math.PI/2:a?o=Math.PI:s&&(o=-Math.PI/2),void this._basicSideRounded({x:e,y:t,size:i,rotation:o})}}else this._basicDot({x:e,y:t,size:i,rotation:0})}_drawExtraRounded({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0,l=n+a+r+s;if(0!==l)if(l>2||n&&a||r&&s)this._basicSquare({x:e,y:t,size:i,rotation:0});else{if(2===l){let o=0;return n&&r?o=Math.PI/2:r&&a?o=Math.PI:a&&s&&(o=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:t,size:i,rotation:o})}if(1===l){let o=0;return r?o=Math.PI/2:a?o=Math.PI:s&&(o=-Math.PI/2),void this._basicSideRounded({x:e,y:t,size:i,rotation:o})}}else this._basicDot({x:e,y:t,size:i,rotation:0})}_drawClassy({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0;0!==n+a+r+s?n||r?a||s?this._basicSquare({x:e,y:t,size:i,rotation:0}):this._basicCornerRounded({x:e,y:t,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:t,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:t,size:i,rotation:Math.PI/2})}_drawClassyRounded({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0;0!==n+a+r+s?n||r?a||s?this._basicSquare({x:e,y:t,size:i,rotation:0}):this._basicCornerExtraRounded({x:e,y:t,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:t,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:t,size:i,rotation:Math.PI/2})}}const s={dot:"dot",square:"square",extraRounded:"extra-rounded"},l=Object.values(s);class d{constructor({svg:e,type:t,window:i}){this._svg=e,this._type=t,this._window=i}draw(e,t,i,o){let n;switch(this._type){case s.square:n=this._drawSquare;break;case s.extraRounded:n=this._drawExtraRounded;break;default:n=this._drawDot}n.call(this,{x:e,y:t,size:i,rotation:o})}_rotateFigure({x:e,y:t,size:i,rotation:o=0,draw:n}){var a;const r=e+i/2,s=t+i/2;n(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*o/Math.PI},${r},${s})`)}_basicDot(e){const{size:t,x:i,y:o}=e,n=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${i+t/2} ${o}a ${t/2} ${t/2} 0 1 0 0.1 0zm 0 ${n}a ${t/2-n} ${t/2-n} 0 1 1 -0.1 0Z`)}}))}_basicSquare(e){const{size:t,x:i,y:o}=e,n=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h ${t}v `+-t+"z"+`M ${i+n} ${o+n}h `+(t-2*n)+"v "+(t-2*n)+"h "+(2*n-t)+"z")}}))}_basicExtraRounded(e){const{size:t,x:i,y:o}=e,n=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${i} ${o+2.5*n}v `+2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*n} ${2.5*n}h `+2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*n} ${2.5*-n}v `+-2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*-n} ${2.5*-n}h `+-2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*-n} ${2.5*n}`+`M ${i+2.5*n} ${o+n}h `+2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*n} ${1.5*n}v `+2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*-n} ${1.5*n}h `+-2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*-n} ${1.5*-n}v `+-2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*n} ${1.5*-n}`)}}))}_drawDot({x:e,y:t,size:i,rotation:o}){this._basicDot({x:e,y:t,size:i,rotation:o})}_drawSquare({x:e,y:t,size:i,rotation:o}){this._basicSquare({x:e,y:t,size:i,rotation:o})}_drawExtraRounded({x:e,y:t,size:i,rotation:o}){this._basicExtraRounded({x:e,y:t,size:i,rotation:o})}}const c={dot:"dot",square:"square"},u=Object.values(c);class p{constructor({svg:e,type:t,window:i}){this._svg=e,this._type=t,this._window=i}draw(e,t,i,o){let n;n=this._type===c.square?this._drawSquare:this._drawDot,n.call(this,{x:e,y:t,size:i,rotation:o})}_rotateFigure({x:e,y:t,size:i,rotation:o=0,draw:n}){var a;const r=e+i/2,s=t+i/2;n(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*o/Math.PI},${r},${s})`)}_basicDot(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(i+t/2)),this._element.setAttribute("cy",String(o+t/2)),this._element.setAttribute("r",String(t/2))}}))}_basicSquare(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(i)),this._element.setAttribute("y",String(o)),this._element.setAttribute("width",String(t)),this._element.setAttribute("height",String(t))}}))}_drawDot({x:e,y:t,size:i,rotation:o}){this._basicDot({x:e,y:t,size:i,rotation:o})}_drawSquare({x:e,y:t,size:i,rotation:o}){this._basicSquare({x:e,y:t,size:i,rotation:o})}}const _="circle",h=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],m=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class g{constructor(e,t){this._roundSize=e=>this._options.dotsOptions.roundSize?Math.floor(e):e,this._window=t,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),e.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${e.width} ${e.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=e.image,this._instanceId=g.instanceCount++,this._options=e}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(e){const t=e.getModuleCount(),i=Math.min(this._options.width,this._options.height)-2*this._options.margin,o=this._options.shape===_?i/Math.sqrt(2):i,n=this._roundSize(o/t);let r={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=e,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:e,qrOptions:i}=this._options,o=e.imageSize*a[i.errorCorrectionLevel],s=Math.floor(o*t*t);r=function({originalHeight:e,originalWidth:t,maxHiddenDots:i,maxHiddenAxisDots:o,dotSize:n}){const a={x:0,y:0},r={x:0,y:0};if(e<=0||t<=0||i<=0||n<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const s=e/t;return a.x=Math.floor(Math.sqrt(i/s)),a.x<=0&&(a.x=1),o&&oi||o&&o{var o,n,a,s,l,d;return!(this._options.imageOptions.hideBackgroundDots&&e>=(t-r.hideYDots)/2&&e<(t+r.hideYDots)/2&&i>=(t-r.hideXDots)/2&&i<(t+r.hideXDots)/2||(null===(o=h[e])||void 0===o?void 0:o[i])||(null===(n=h[e-t+7])||void 0===n?void 0:n[i])||(null===(a=h[e])||void 0===a?void 0:a[i-t+7])||(null===(s=m[e])||void 0===s?void 0:s[i])||(null===(l=m[e-t+7])||void 0===l?void 0:l[i])||(null===(d=m[e])||void 0===d?void 0:d[i-t+7]))}),this.drawCorners(),this._options.image&&await this.drawImage({width:r.width,height:r.height,count:t,dotSize:n})}drawBackground(){var e,t,i;const o=this._element,n=this._options;if(o){const o=null===(e=n.backgroundOptions)||void 0===e?void 0:e.gradient,a=null===(t=n.backgroundOptions)||void 0===t?void 0:t.color;let r=n.height,s=n.width;if(o||a){const e=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),(null===(i=n.backgroundOptions)||void 0===i?void 0:i.round)&&(r=s=Math.min(n.width,n.height),e.setAttribute("rx",String(r/2*n.backgroundOptions.round))),e.setAttribute("x",String(this._roundSize((n.width-s)/2))),e.setAttribute("y",String(this._roundSize((n.height-r)/2))),e.setAttribute("width",String(s)),e.setAttribute("height",String(r)),this._backgroundClipPath.appendChild(e),this._createColor({options:o,color:a,additionalRotation:0,x:0,y:0,height:n.height,width:n.width,name:`background-color-${this._instanceId}`})}}}drawDots(e){var t,i;if(!this._qr)throw"QR code is not defined";const o=this._options,n=this._qr.getModuleCount();if(n>o.width||n>o.height)throw"The canvas is too small.";const a=Math.min(o.width,o.height)-2*o.margin,s=o.shape===_?a/Math.sqrt(2):a,l=this._roundSize(s/n),d=this._roundSize((o.width-n*l)/2),c=this._roundSize((o.height-n*l)/2),u=new r({svg:this._element,type:o.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(t=o.dotsOptions)||void 0===t?void 0:t.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:`dot-color-${this._instanceId}`});for(let t=0;t!(o+i<0||t+a<0||o+i>=n||t+a>=n)&&!(e&&!e(t+a,o+i))&&!!this._qr&&this._qr.isDark(t+a,o+i)),u._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(u._element));if(o.shape===_){const e=this._roundSize((a/l-n)/2),t=n+2*e,i=d-e*l,o=c-e*l,r=[],s=this._roundSize(t/2);for(let i=0;i=e-1&&i<=t-e&&o>=e-1&&o<=t-e||Math.sqrt((i-s)*(i-s)+(o-s)*(o-s))>s?r[i][o]=0:r[i][o]=this._qr.isDark(o-2*e<0?o:o>=n?o-2*e:o-e,i-2*e<0?i:i>=n?i-2*e:i-e)?1:0}for(let e=0;e{var o;return!!(null===(o=r[e+i])||void 0===o?void 0:o[n+t])}),u._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(u._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const e=this._element,t=this._options;if(!e)throw"Element code is not defined";const i=this._qr.getModuleCount(),o=Math.min(t.width,t.height)-2*t.margin,n=t.shape===_?o/Math.sqrt(2):o,a=this._roundSize(n/i),s=7*a,c=3*a,g=this._roundSize((t.width-i*a)/2),v=this._roundSize((t.height-i*a)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([e,o,n])=>{var _,y,f,b,w,k,x,S,z,A,$,C,T,P;const E=g+e*a*(i-7),I=v+o*a*(i-7);let D=this._dotsClipPath,M=this._dotsClipPath;if(((null===(_=t.cornersSquareOptions)||void 0===_?void 0:_.gradient)||(null===(y=t.cornersSquareOptions)||void 0===y?void 0:y.color))&&(D=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),D.setAttribute("id",`clip-path-corners-square-color-${e}-${o}-${this._instanceId}`),this._defs.appendChild(D),this._cornersSquareClipPath=this._cornersDotClipPath=M=D,this._createColor({options:null===(f=t.cornersSquareOptions)||void 0===f?void 0:f.gradient,color:null===(b=t.cornersSquareOptions)||void 0===b?void 0:b.color,additionalRotation:n,x:E,y:I,height:s,width:s,name:`corners-square-color-${e}-${o}-${this._instanceId}`})),(null===(w=t.cornersSquareOptions)||void 0===w?void 0:w.type)&&l.includes(t.cornersSquareOptions.type)){const e=new d({svg:this._element,type:t.cornersSquareOptions.type,window:this._window});e.draw(E,I,s,n),e._element&&D&&D.appendChild(e._element)}else{const e=new r({svg:this._element,type:(null===(k=t.cornersSquareOptions)||void 0===k?void 0:k.type)||t.dotsOptions.type,window:this._window});for(let t=0;t{var n;return!!(null===(n=h[t+o])||void 0===n?void 0:n[i+e])}),e._element&&D&&D.appendChild(e._element))}if(((null===(S=t.cornersDotOptions)||void 0===S?void 0:S.gradient)||(null===(z=t.cornersDotOptions)||void 0===z?void 0:z.color))&&(M=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),M.setAttribute("id",`clip-path-corners-dot-color-${e}-${o}-${this._instanceId}`),this._defs.appendChild(M),this._cornersDotClipPath=M,this._createColor({options:null===(A=t.cornersDotOptions)||void 0===A?void 0:A.gradient,color:null===($=t.cornersDotOptions)||void 0===$?void 0:$.color,additionalRotation:n,x:E+2*a,y:I+2*a,height:c,width:c,name:`corners-dot-color-${e}-${o}-${this._instanceId}`})),(null===(C=t.cornersDotOptions)||void 0===C?void 0:C.type)&&u.includes(t.cornersDotOptions.type)){const e=new p({svg:this._element,type:t.cornersDotOptions.type,window:this._window});e.draw(E+2*a,I+2*a,c,n),e._element&&M&&M.appendChild(e._element)}else{const e=new r({svg:this._element,type:(null===(T=t.cornersDotOptions)||void 0===T?void 0:T.type)||t.dotsOptions.type,window:this._window});for(let t=0;t{var n;return!!(null===(n=m[t+o])||void 0===n?void 0:n[i+e])}),e._element&&M&&M.appendChild(e._element))}})}loadImage(){return new Promise((e,t)=>{var i;const o=this._options;if(!o.image)return t("Image is not defined");if(null===(i=o.nodeCanvas)||void 0===i?void 0:i.loadImage)o.nodeCanvas.loadImage(o.image).then(t=>{var i,n;if(this._image=t,this._options.imageOptions.saveAsBlob){const e=null===(i=o.nodeCanvas)||void 0===i?void 0:i.createCanvas(this._image.width,this._image.height);null===(n=null==e?void 0:e.getContext("2d"))||void 0===n||n.drawImage(t,0,0),this._imageUri=null==e?void 0:e.toDataURL()}e()}).catch(t);else{const t=new this._window.Image;"string"==typeof o.imageOptions.crossOrigin&&(t.crossOrigin=o.imageOptions.crossOrigin),this._image=t,t.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await async function(e,t){return new Promise(i=>{const o=new t.XMLHttpRequest;o.onload=function(){const e=new t.FileReader;e.onloadend=function(){i(e.result)},e.readAsDataURL(o.response)},o.open("GET",e),o.responseType="blob",o.send()})}(o.image||"",this._window)),e()},t.src=o.image}})}async drawImage({width:e,height:t,count:i,dotSize:o}){const n=this._options,a=this._roundSize((n.width-i*o)/2),r=this._roundSize((n.height-i*o)/2),s=a+this._roundSize(n.imageOptions.margin+(i*o-e)/2),l=r+this._roundSize(n.imageOptions.margin+(i*o-t)/2),d=e-2*n.imageOptions.margin,c=t-2*n.imageOptions.margin,u=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");u.setAttribute("href",this._imageUri||""),u.setAttribute("xlink:href",this._imageUri||""),u.setAttribute("x",String(s)),u.setAttribute("y",String(l)),u.setAttribute("width",`${d}px`),u.setAttribute("height",`${c}px`),this._element.appendChild(u)}_createColor({options:e,color:t,additionalRotation:i,x:o,y:n,height:a,width:r,name:s}){const l=r>a?r:a,d=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(d.setAttribute("x",String(o)),d.setAttribute("y",String(n)),d.setAttribute("height",String(a)),d.setAttribute("width",String(r)),d.setAttribute("clip-path",`url('#clip-path-${s}')`),e){let t;if("radial"===e.type)t=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),t.setAttribute("id",s),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("fx",String(o+r/2)),t.setAttribute("fy",String(n+a/2)),t.setAttribute("cx",String(o+r/2)),t.setAttribute("cy",String(n+a/2)),t.setAttribute("r",String(l/2));else{const l=((e.rotation||0)+i)%(2*Math.PI),d=(l+2*Math.PI)%(2*Math.PI);let c=o+r/2,u=n+a/2,p=o+r/2,_=n+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(c-=r/2,u-=a/2*Math.tan(l),p+=r/2,_+=a/2*Math.tan(l)):d>.25*Math.PI&&d<=.75*Math.PI?(u-=a/2,c-=r/2/Math.tan(l),_+=a/2,p+=r/2/Math.tan(l)):d>.75*Math.PI&&d<=1.25*Math.PI?(c+=r/2,u+=a/2*Math.tan(l),p-=r/2,_-=a/2*Math.tan(l)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(u+=a/2,c+=r/2/Math.tan(l),_-=a/2,p-=r/2/Math.tan(l)),t=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),t.setAttribute("id",s),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("x1",String(Math.round(c))),t.setAttribute("y1",String(Math.round(u))),t.setAttribute("x2",String(Math.round(p))),t.setAttribute("y2",String(Math.round(_)))}e.colorStops.forEach(({offset:e,color:i})=>{const o=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");o.setAttribute("offset",100*e+"%"),o.setAttribute("stop-color",i),t.appendChild(o)}),d.setAttribute("fill",`url('#${s}')`),this._defs.appendChild(t)}else t&&d.setAttribute("fill",t);this._element.appendChild(d)}}g.instanceCount=0;const v=g,y="canvas",f={};for(let e=0;e<=40;e++)f[e]=e;const b={type:y,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:f[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function w(e){const t=Object.assign({},e);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map(e=>Object.assign(Object.assign({},e),{offset:Number(e.offset)})),t}function k(e){const t=Object.assign({},e);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=Object.assign(Object.assign({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=Object.assign({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=w(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=Object.assign({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=w(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=Object.assign({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=w(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=Object.assign({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=w(t.backgroundOptions.gradient))),t}var x=i(873),S=i.n(x);function z(e){if(!e)throw new Error("Extension must be defined");"."===e[0]&&(e=e.substring(1));const t={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[e.toLowerCase()];if(!t)throw new Error(`Extension "${e}" is not supported`);return t}class A{constructor(e){(null==e?void 0:e.jsdom)?this._window=new e.jsdom("",{resources:"usable"}).window:this._window=window,this._options=e?k(t(b,e)):b,this.update()}static _clearContainer(e){e&&(e.innerHTML="")}_setupSvg(){if(!this._qr)return;const e=new v(this._options,this._window);this._svg=e.getElement(),this._svgDrawingPromise=e.drawQR(this._qr).then(()=>{var t;this._svg&&(null===(t=this._extension)||void 0===t||t.call(this,e.getElement(),this._options))})}_setupCanvas(){var e,t;this._qr&&((null===(e=this._options.nodeCanvas)||void 0===e?void 0:e.createCanvas)?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then(()=>{var e;if(!this._svg)return;const t=this._svg,i=(new this._window.XMLSerializer).serializeToString(t),o=btoa(i),n=`data:${z("svg")};base64,${o}`;if(null===(e=this._options.nodeCanvas)||void 0===e?void 0:e.loadImage)return this._options.nodeCanvas.loadImage(n).then(e=>{var t,i;e.width=this._options.width,e.height=this._options.height,null===(i=null===(t=this._nodeCanvas)||void 0===t?void 0:t.getContext("2d"))||void 0===i||i.drawImage(e,0,0)});{const e=new this._window.Image;return new Promise(t=>{e.onload=()=>{var i,o;null===(o=null===(i=this._domCanvas)||void 0===i?void 0:i.getContext("2d"))||void 0===o||o.drawImage(e,0,0),t()},e.src=n})}}))}async _getElement(e="png"){if(!this._qr)throw"QR code is empty";return"svg"===e.toLowerCase()?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(e){A._clearContainer(this._container),this._options=e?k(t(this._options,e)):this._options,this._options.data&&(this._qr=S()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===y?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(e){if(e){if("function"!=typeof e.appendChild)throw"Container should be a single DOM node";this._options.type===y?this._domCanvas&&e.appendChild(this._domCanvas):this._svg&&e.appendChild(this._svg),this._container=e}}applyExtension(e){if(!e)throw"Extension function should be defined.";this._extension=e,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(e="png"){if(!this._qr)throw"QR code is empty";const t=await this._getElement(e),i=z(e);if(!t)return null;if("svg"===e.toLowerCase()){const e=`\r\n${(new this._window.XMLSerializer).serializeToString(t)}`;return"undefined"==typeof Blob||this._options.jsdom?Buffer.from(e):new Blob([e],{type:i})}return new Promise(e=>{const o=t;if("toBuffer"in o)if("image/png"===i)e(o.toBuffer(i));else if("image/jpeg"===i)e(o.toBuffer(i));else{if("application/pdf"!==i)throw Error("Unsupported extension");e(o.toBuffer(i))}else"toBlob"in o&&o.toBlob(e,i,1)})}async download(e){if(!this._qr)throw"QR code is empty";if("undefined"==typeof Blob)throw"Cannot download in Node.js, call getRawData instead.";let t="png",i="qr";"string"==typeof e?(t=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof e&&null!==e&&(e.name&&(i=e.name),e.extension&&(t=e.extension));const o=await this._getElement(t);if(o)if("svg"===t.toLowerCase()){let e=(new XMLSerializer).serializeToString(o);e='\r\n'+e,n(`data:${z(t)};charset=utf-8,${encodeURIComponent(e)}`,`${i}.svg`)}else n(o.toDataURL(z(t)),`${i}.${t}`)}}const $=A})(),o.default})(),e.exports=t()},5072(e){"use strict";var t=[];function i(e){for(var i=-1,o=0;o0?" ".concat(i.layer):""," {")),o+=i.css,n&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}");var a=i.sourceMap;a&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3917(e,t,i){"use strict";var o=i(2618),n=i(4791),a=function(e,t,i,o){var n,a=arguments.length,r=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let r=class extends o.WF{constructor(){super(...arguments),this.value="",this.label="Navigation Target",this.disabled=!1}_valueChanged(e){const t=e.detail.value;this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:t},bubbles:!0,composed:!0}))}render(){return o.qy` +(()=>{var e,t,i={4632(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,".swiper-fade {\n &.swiper-free-mode {\n .swiper-slide {\n transition-timing-function: ease-out;\n }\n }\n .swiper-slide {\n pointer-events: none;\n transition-property: opacity;\n .swiper-slide {\n pointer-events: none;\n }\n }\n .swiper-slide-active {\n pointer-events: auto;\n & .swiper-slide-active {\n pointer-events: auto;\n }\n }\n}\n",""]);const s=r},506(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,":root {\n --swiper-navigation-size: 44px;\n /*\n --swiper-navigation-top-offset: 50%;\n --swiper-navigation-sides-offset: 4px;\n --swiper-navigation-color: var(--swiper-theme-color);\n */\n}\n.swiper-button-prev,\n.swiper-button-next {\n position: absolute;\n\n width: var(--swiper-navigation-size);\n height: var(--swiper-navigation-size);\n\n z-index: 10;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n &.swiper-button-disabled {\n opacity: 0.35;\n cursor: auto;\n pointer-events: none;\n }\n &.swiper-button-hidden {\n opacity: 0;\n cursor: auto;\n pointer-events: none;\n }\n .swiper-navigation-disabled & {\n display: none !important;\n }\n\n ::slotted(svg),\n svg {\n width: 100%;\n height: 100%;\n object-fit: contain;\n transform-origin: center;\n fill: currentColor;\n pointer-events: none;\n }\n}\n\n.swiper-button-lock {\n display: none;\n}\n\n.swiper-button-prev,\n.swiper-button-next {\n top: var(--swiper-navigation-top-offset, 50%);\n margin-top: calc(0px - (var(--swiper-navigation-size) / 2));\n}\n.swiper-button-prev {\n left: var(--swiper-navigation-sides-offset, 4px);\n right: auto;\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(180deg);\n }\n}\n.swiper-button-next {\n right: var(--swiper-navigation-sides-offset, 4px);\n left: auto;\n}\n.swiper-horizontal {\n .swiper-button-prev,\n .swiper-button-next,\n ~ .swiper-button-prev,\n ~ .swiper-button-next {\n top: var(--swiper-navigation-top-offset, 50%);\n margin-top: calc(0px - (var(--swiper-navigation-size) / 2));\n margin-left: 0;\n }\n .swiper-button-prev,\n & ~ .swiper-button-prev,\n &.swiper-rtl .swiper-button-next,\n &.swiper-rtl ~ .swiper-button-next {\n left: var(--swiper-navigation-sides-offset, 4px);\n right: auto;\n }\n .swiper-button-next,\n & ~ .swiper-button-next,\n &.swiper-rtl .swiper-button-prev,\n &.swiper-rtl ~ .swiper-button-prev {\n right: var(--swiper-navigation-sides-offset, 4px);\n left: auto;\n }\n .swiper-button-prev,\n & ~ .swiper-button-prev,\n &.swiper-rtl .swiper-button-next,\n &.swiper-rtl ~ .swiper-button-next {\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(180deg);\n }\n }\n &.swiper-rtl .swiper-button-prev,\n &.swiper-rtl ~ .swiper-button-prev {\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(0deg);\n }\n }\n}\n.swiper-vertical {\n .swiper-button-prev,\n .swiper-button-next,\n ~ .swiper-button-prev,\n ~ .swiper-button-next {\n left: var(--swiper-navigation-top-offset, 50%);\n right: auto;\n margin-left: calc(0px - (var(--swiper-navigation-size) / 2));\n margin-top: 0;\n }\n .swiper-button-prev,\n ~ .swiper-button-prev {\n top: var(--swiper-navigation-sides-offset, 4px);\n bottom: auto;\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(-90deg);\n }\n }\n .swiper-button-next,\n ~ .swiper-button-next {\n bottom: var(--swiper-navigation-sides-offset, 4px);\n top: auto;\n ::slotted(.swiper-navigation-icon),\n .swiper-navigation-icon {\n transform: rotate(90deg);\n }\n }\n}\n",""]);const s=r},5124(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,":root {\n /*\n --swiper-pagination-color: var(--swiper-theme-color);\n --swiper-pagination-left: auto;\n --swiper-pagination-right: 8px;\n --swiper-pagination-bottom: 8px;\n --swiper-pagination-top: auto;\n --swiper-pagination-fraction-color: inherit;\n --swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);\n --swiper-pagination-progressbar-size: 4px;\n --swiper-pagination-bullet-size: 8px;\n --swiper-pagination-bullet-width: 8px;\n --swiper-pagination-bullet-height: 8px;\n --swiper-pagination-bullet-border-radius: 50%;\n --swiper-pagination-bullet-inactive-color: #000;\n --swiper-pagination-bullet-inactive-opacity: 0.2;\n --swiper-pagination-bullet-opacity: 1;\n --swiper-pagination-bullet-horizontal-gap: 4px;\n --swiper-pagination-bullet-vertical-gap: 6px;\n */\n}\n.swiper-pagination {\n position: absolute;\n text-align: center;\n transition: 300ms opacity;\n transform: translate3d(0, 0, 0);\n z-index: 10;\n &.swiper-pagination-hidden {\n opacity: 0;\n }\n .swiper-pagination-disabled > &,\n &.swiper-pagination-disabled {\n display: none !important;\n }\n}\n/* Common Styles */\n.swiper-pagination-fraction,\n.swiper-pagination-custom,\n.swiper-horizontal > .swiper-pagination-bullets,\n.swiper-pagination-bullets.swiper-pagination-horizontal {\n bottom: var(--swiper-pagination-bottom, 8px);\n top: var(--swiper-pagination-top, auto);\n left: 0;\n width: 100%;\n}\n/* Bullets */\n.swiper-pagination-bullets-dynamic {\n overflow: hidden;\n font-size: 0;\n .swiper-pagination-bullet {\n transform: scale(0.33);\n position: relative;\n }\n .swiper-pagination-bullet-active {\n transform: scale(1);\n }\n .swiper-pagination-bullet-active-main {\n transform: scale(1);\n }\n .swiper-pagination-bullet-active-prev {\n transform: scale(0.66);\n }\n .swiper-pagination-bullet-active-prev-prev {\n transform: scale(0.33);\n }\n .swiper-pagination-bullet-active-next {\n transform: scale(0.66);\n }\n .swiper-pagination-bullet-active-next-next {\n transform: scale(0.33);\n }\n}\n.swiper-pagination-bullet {\n width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));\n height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));\n display: inline-block;\n border-radius: var(--swiper-pagination-bullet-border-radius, 50%);\n background: var(--swiper-pagination-bullet-inactive-color, #000);\n opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);\n button& {\n border: none;\n margin: 0;\n padding: 0;\n box-shadow: none;\n appearance: none;\n }\n .swiper-pagination-clickable & {\n cursor: pointer;\n }\n\n &:only-child {\n display: none !important;\n }\n}\n.swiper-pagination-bullet-active {\n opacity: var(--swiper-pagination-bullet-opacity, 1);\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n}\n\n.swiper-vertical > .swiper-pagination-bullets,\n.swiper-pagination-vertical.swiper-pagination-bullets {\n right: var(--swiper-pagination-right, 8px);\n left: var(--swiper-pagination-left, auto);\n top: 50%;\n transform: translate3d(0px, -50%, 0);\n .swiper-pagination-bullet {\n margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;\n display: block;\n }\n &.swiper-pagination-bullets-dynamic {\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n .swiper-pagination-bullet {\n display: inline-block;\n transition:\n 200ms transform,\n 200ms top;\n }\n }\n}\n.swiper-horizontal > .swiper-pagination-bullets,\n.swiper-pagination-horizontal.swiper-pagination-bullets {\n .swiper-pagination-bullet {\n margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);\n }\n &.swiper-pagination-bullets-dynamic {\n left: 50%;\n transform: translateX(-50%);\n white-space: nowrap;\n .swiper-pagination-bullet {\n transition:\n 200ms transform,\n 200ms left;\n }\n }\n}\n.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n transition:\n 200ms transform,\n 200ms right;\n}\n/* Fraction */\n.swiper-pagination-fraction {\n color: var(--swiper-pagination-fraction-color, inherit);\n}\n/* Progress */\n.swiper-pagination-progressbar {\n background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));\n position: absolute;\n .swiper-pagination-progressbar-fill {\n background: var(--swiper-pagination-color, var(--swiper-theme-color));\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n transform: scale(0);\n transform-origin: left top;\n }\n .swiper-rtl & .swiper-pagination-progressbar-fill {\n transform-origin: right top;\n }\n .swiper-horizontal > &,\n &.swiper-pagination-horizontal,\n .swiper-vertical > &.swiper-pagination-progressbar-opposite,\n &.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {\n width: 100%;\n height: var(--swiper-pagination-progressbar-size, 4px);\n left: 0;\n top: 0;\n }\n .swiper-vertical > &,\n &.swiper-pagination-vertical,\n .swiper-horizontal > &.swiper-pagination-progressbar-opposite,\n &.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {\n width: var(--swiper-pagination-progressbar-size, 4px);\n height: 100%;\n left: 0;\n top: 0;\n }\n}\n.swiper-pagination-lock {\n display: none;\n}\n",""]);const s=r},3868(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,":root {\n /*\n --swiper-scrollbar-border-radius: 10px;\n --swiper-scrollbar-top: auto;\n --swiper-scrollbar-bottom: 4px;\n --swiper-scrollbar-left: auto;\n --swiper-scrollbar-right: 4px;\n --swiper-scrollbar-sides-offset: 1%;\n --swiper-scrollbar-bg-color: rgba(0, 0, 0, 0.1);\n --swiper-scrollbar-drag-bg-color: rgba(0, 0, 0, 0.5);\n --swiper-scrollbar-size: 4px;\n */\n}\n.swiper-scrollbar {\n border-radius: var(--swiper-scrollbar-border-radius, 10px);\n position: relative;\n touch-action: none;\n background: var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, 0.1));\n .swiper-scrollbar-disabled > &,\n &.swiper-scrollbar-disabled {\n display: none !important;\n }\n .swiper-horizontal > &,\n &.swiper-scrollbar-horizontal {\n position: absolute;\n left: var(--swiper-scrollbar-sides-offset, 1%);\n bottom: var(--swiper-scrollbar-bottom, 4px);\n top: var(--swiper-scrollbar-top, auto);\n z-index: 50;\n height: var(--swiper-scrollbar-size, 4px);\n width: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n }\n .swiper-vertical > &,\n &.swiper-scrollbar-vertical {\n position: absolute;\n left: var(--swiper-scrollbar-left, auto);\n right: var(--swiper-scrollbar-right, 4px);\n top: var(--swiper-scrollbar-sides-offset, 1%);\n z-index: 50;\n width: var(--swiper-scrollbar-size, 4px);\n height: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n }\n}\n.swiper-scrollbar-drag {\n height: 100%;\n width: 100%;\n position: relative;\n background: var(--swiper-scrollbar-drag-bg-color, rgba(0, 0, 0, 0.5));\n border-radius: var(--swiper-scrollbar-border-radius, 10px);\n left: 0;\n top: 0;\n}\n.swiper-scrollbar-cursor-drag {\n cursor: move;\n}\n.swiper-scrollbar-lock {\n display: none;\n}\n",""]);const s=r},2870(e,t,i){"use strict";i.d(t,{A:()=>s});var o=i(1601),n=i.n(o),a=i(6314),r=i.n(a)()(n());r.push([e.id,"/**\n * Swiper 12.2.0\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2026 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: May 27, 2026\n */\n\n:root {\n --swiper-theme-color: #007aff;\n /*\n --swiper-preloader-color: var(--swiper-theme-color);\n --swiper-wrapper-transition-timing-function: initial;\n */\n}\n:host {\n position: relative;\n display: block;\n margin-left: auto;\n margin-right: auto;\n z-index: 1;\n}\n.swiper {\n margin-left: auto;\n margin-right: auto;\n position: relative;\n overflow: hidden;\n list-style: none;\n padding: 0;\n /* Fix of Webkit flickering */\n z-index: 1;\n display: block;\n}\n.swiper-vertical > .swiper-wrapper {\n flex-direction: column;\n}\n.swiper-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n transition-property: transform;\n transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n box-sizing: content-box;\n}\n.swiper-android .swiper-slide,\n.swiper-ios .swiper-slide,\n.swiper-wrapper {\n transform: translate3d(0px, 0, 0);\n}\n.swiper-horizontal {\n touch-action: pan-y;\n}\n.swiper-vertical {\n touch-action: pan-x;\n}\n.swiper-slide {\n flex-shrink: 0;\n width: 100%;\n height: 100%;\n position: relative;\n transition-property: transform;\n display: block;\n}\n.swiper-slide-invisible-blank {\n visibility: hidden;\n}\n/* Auto Height */\n.swiper-autoheight,\n.swiper-autoheight .swiper-slide {\n height: auto;\n}\n.swiper-autoheight .swiper-wrapper {\n align-items: flex-start;\n transition-property: transform, height;\n}\n.swiper-backface-hidden .swiper-slide {\n transform: translateZ(0);\n backface-visibility: hidden;\n}\n/* 3D Effects */\n.swiper-3d.swiper-css-mode .swiper-wrapper {\n perspective: 1200px;\n}\n.swiper-3d .swiper-wrapper {\n transform-style: preserve-3d;\n}\n.swiper-3d {\n perspective: 1200px;\n .swiper-slide,\n .swiper-cube-shadow {\n transform-style: preserve-3d;\n }\n}\n\n/* CSS Mode */\n.swiper-css-mode {\n > .swiper-wrapper {\n overflow: auto;\n scrollbar-width: none; /* For Firefox */\n -ms-overflow-style: none; /* For Internet Explorer and Edge */\n &::-webkit-scrollbar {\n display: none;\n }\n }\n > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: start start;\n }\n &.swiper-horizontal {\n > .swiper-wrapper {\n scroll-snap-type: x mandatory;\n }\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-inline-start: var(--swiper-slides-offset-before);\n scroll-margin-inline-start: var(--swiper-slides-offset-before);\n }\n > .swiper-wrapper > .swiper-slide:last-child {\n margin-inline-end: var(--swiper-slides-offset-after);\n }\n }\n &.swiper-vertical {\n > .swiper-wrapper {\n scroll-snap-type: y mandatory;\n }\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-block-start: var(--swiper-slides-offset-before);\n scroll-margin-block-start: var(--swiper-slides-offset-before);\n }\n > .swiper-wrapper > .swiper-slide:last-child {\n margin-block-end: var(--swiper-slides-offset-after);\n }\n }\n &.swiper-free-mode {\n > .swiper-wrapper {\n scroll-snap-type: none;\n }\n > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: none;\n }\n }\n &.swiper-centered {\n > .swiper-wrapper::before {\n content: '';\n flex-shrink: 0;\n order: 9999;\n }\n > .swiper-wrapper > .swiper-slide {\n scroll-snap-align: center center;\n scroll-snap-stop: always;\n }\n }\n &.swiper-centered.swiper-horizontal {\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-inline-start: var(--swiper-centered-offset-before);\n }\n > .swiper-wrapper::before {\n height: 100%;\n min-height: 1px;\n width: var(--swiper-centered-offset-after);\n }\n }\n &.swiper-centered.swiper-vertical {\n > .swiper-wrapper > .swiper-slide:first-child {\n margin-block-start: var(--swiper-centered-offset-before);\n }\n > .swiper-wrapper::before {\n width: 100%;\n min-width: 1px;\n height: var(--swiper-centered-offset-after);\n }\n }\n}\n\n/* Slide styles start */\n/* 3D Shadows */\n.swiper-3d {\n .swiper-slide-shadow,\n .swiper-slide-shadow-left,\n .swiper-slide-shadow-right,\n .swiper-slide-shadow-top,\n .swiper-slide-shadow-bottom,\n .swiper-slide-shadow,\n .swiper-slide-shadow-left,\n .swiper-slide-shadow-right,\n .swiper-slide-shadow-top,\n .swiper-slide-shadow-bottom {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 10;\n }\n .swiper-slide-shadow {\n background: rgba(0, 0, 0, 0.15);\n }\n .swiper-slide-shadow-left {\n background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n .swiper-slide-shadow-right {\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n .swiper-slide-shadow-top {\n background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n .swiper-slide-shadow-bottom {\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n }\n}\n.swiper-lazy-preloader {\n width: 42px;\n height: 42px;\n position: absolute;\n left: 50%;\n top: 50%;\n margin-left: -21px;\n margin-top: -21px;\n z-index: 10;\n transform-origin: 50%;\n box-sizing: border-box;\n border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));\n border-radius: 50%;\n border-top-color: transparent;\n}\n.swiper:not(.swiper-watch-progress),\n.swiper-watch-progress .swiper-slide-visible {\n .swiper-lazy-preloader {\n animation: swiper-preloader-spin 1s infinite linear;\n }\n}\n.swiper-lazy-preloader-white {\n --swiper-preloader-color: #fff;\n}\n.swiper-lazy-preloader-black {\n --swiper-preloader-color: #000;\n}\n@keyframes swiper-preloader-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n/* Slide styles end */\n",""]);const s=r},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i}).join("")},t.i=function(e,i,o,n,a){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(o)for(var s=0;s0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=a),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},1601(e){"use strict";e.exports=function(e){return e[1]}},8153(e,t,i){"use strict";i.d(t,{forwardHaptic:()=>y,nu:()=>g,rC:()=>v});var o,n,a,r=function(e,t){return s(t).format(e)},s=function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric"})};(a=o||(o={})).language="language",a.system="system",a.comma_decimal="comma_decimal",a.decimal_comma="decimal_comma",a.space_comma="space_comma",a.none="none",function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(n||(n={}));var l=function(e){if(e.time_format===n.language||e.time_format===n.system){var t=e.time_format===n.language?e.language:void 0,i=(new Date).toLocaleString(t);return i.includes("AM")||i.includes("PM")}return e.time_format===n.am_pm},d=function(e,t){return c(t).format(e)},c=function(e){return new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:l(e)?"numeric":"2-digit",minute:"2-digit",hour12:l(e)})},u=function(e,t){return p(t).format(e)},p=function(e){return new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hour12:l(e)})};function _(){return(_=Object.assign||function(e){for(var t=1;t-1?e.split(".")[1].length:0;i.minimumFractionDigits=o,i.maximumFractionDigits=o}return i},g=function(e,t,i,o){var n=void 0!==o?o:t.state;if("unknown"===n||"unavailable"===n)return e("state.default."+n);if(function(e){return!!e.attributes.unit_of_measurement||!!e.attributes.state_class}(t)){if("monetary"===t.attributes.device_class)try{return h(n,i,{style:"currency",currency:t.attributes.unit_of_measurement})}catch(e){}return h(n,i)+(t.attributes.unit_of_measurement?" "+t.attributes.unit_of_measurement:"")}var a=function(e){return function(e){return e.substr(0,e.indexOf("."))}(e.entity_id)}(t);if("input_datetime"===a){var s;if(void 0===o)return t.attributes.has_date&&t.attributes.has_time?(s=new Date(t.attributes.year,t.attributes.month-1,t.attributes.day,t.attributes.hour,t.attributes.minute),d(s,i)):t.attributes.has_date?(s=new Date(t.attributes.year,t.attributes.month-1,t.attributes.day),r(s,i)):t.attributes.has_time?((s=new Date).setHours(t.attributes.hour,t.attributes.minute),u(s,i)):t.state;try{var l=o.split(" ");if(2===l.length)return d(new Date(l.join("T")),i);if(1===l.length){if(o.includes("-"))return r(new Date(o+"T00:00"),i);if(o.includes(":")){var c=new Date;return u(new Date(c.toISOString().split("T")[0]+"T"+o),i)}}return o}catch(e){return o}}return"humidifier"===a&&"on"===n&&t.attributes.humidity?t.attributes.humidity+" %":"counter"===a||"number"===a||"input_number"===a?h(n,i):t.attributes.device_class&&e("component."+a+".state."+t.attributes.device_class+"."+n)||e("component."+a+".state._."+n)||n},v=(new Set(["fan","input_boolean","light","switch","group","automation"]),function(e,t,i,o){o=o||{},i=null==i?{}:i;var n=new Event(t,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return n.detail=i,e.dispatchEvent(n),n});new Set(["call-service","divider","section","weblink","cast","select"]);var y=function(e){v(window,"haptic",e)}},3481(e,t){!function(e){"use strict";function t(e){var t,i,o,n;for(i=1,o=arguments.length;i0?Math.floor(e):Math.ceil(e)};function E(e,t,i){return e instanceof O?e:g(e)?new O(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new O(e.x,e.y):new O(e,t,i)}function I(e,t){if(e)for(var i=t?[e,t]:e,o=0,n=i.length;o=this.min.x&&i.x<=this.max.x&&t.y>=this.min.y&&i.y<=this.max.y},intersects:function(e){e=M(e);var t=this.min,i=this.max,o=e.min,n=e.max,a=n.x>=t.x&&o.x<=i.x,r=n.y>=t.y&&o.y<=i.y;return a&&r},overlaps:function(e){e=M(e);var t=this.min,i=this.max,o=e.min,n=e.max,a=n.x>t.x&&o.xt.y&&o.y=o.lat&&i.lat<=n.lat&&t.lng>=o.lng&&i.lng<=n.lng},intersects:function(e){e=j(e);var t=this._southWest,i=this._northEast,o=e.getSouthWest(),n=e.getNorthEast(),a=n.lat>=t.lat&&o.lat<=i.lat,r=n.lng>=t.lng&&o.lng<=i.lng;return a&&r},overlaps:function(e){e=j(e);var t=this._southWest,i=this._northEast,o=e.getSouthWest(),n=e.getNorthEast(),a=n.lat>t.lat&&o.latt.lng&&o.lng1,Ce=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",l,t),window.removeEventListener("testPassiveEventSupport",l,t)}catch(e){}return e}(),Te=!!document.createElement("canvas").getContext,Oe=!(!document.createElementNS||!K("svg").createSVGRect),Pe=!!Oe&&((Z=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(Z.firstChild&&Z.firstChild.namespaceURI)),Ee=!Oe&&function(){try{var e=document.createElement("div");e.innerHTML='';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}();function Ie(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Me={ie:X,ielt9:ee,edge:te,webkit:ie,android:oe,android23:ne,androidStock:re,opera:se,chrome:le,gecko:de,safari:ce,phantom:ue,opera12:pe,win:_e,ie3d:he,webkit3d:me,gecko3d:ge,any3d:ve,mobile:ye,mobileWebkit:fe,mobileWebkit3d:be,msPointer:we,pointer:ke,touch:Se,touchNative:xe,mobileOpera:ze,mobileGecko:Ae,retina:$e,passiveEvents:Ce,canvas:Te,svg:Oe,vml:Ee,inlineSvg:Pe,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},De=Me.msPointer?"MSPointerDown":"pointerdown",je=Me.msPointer?"MSPointerMove":"pointermove",Le=Me.msPointer?"MSPointerUp":"pointerup",Ue=Me.msPointer?"MSPointerCancel":"pointercancel",Re={touchstart:De,touchmove:je,touchend:Le,touchcancel:Ue},Ne={touchstart:function(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Lt(t),We(e,t)},touchmove:We,touchend:We,touchcancel:We},Be={},He=!1;function Fe(e,t,i){return"touchstart"===t&&(He||(document.addEventListener(De,qe,!0),document.addEventListener(je,Ve,!0),document.addEventListener(Le,Ge,!0),document.addEventListener(Ue,Ge,!0),He=!0)),Ne[t]?(i=Ne[t].bind(this,i),e.addEventListener(Re[t],i,!1),i):(console.warn("wrong event specified:",t),l)}function qe(e){Be[e.pointerId]=e}function Ve(e){Be[e.pointerId]&&(Be[e.pointerId]=e)}function Ge(e){delete Be[e.pointerId]}function We(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in t.touches=[],Be)t.touches.push(Be[i]);t.changedTouches=[t],e(t)}}var Je,Ke,Qe,Ze,Ye,Xe=mt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),et=mt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tt="webkitTransition"===et||"OTransition"===et?et+"End":"transitionend";function it(e){return"string"==typeof e?document.getElementById(e):e}function ot(e,t){var i=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!i||"auto"===i)&&document.defaultView){var o=document.defaultView.getComputedStyle(e,null);i=o?o[t]:null}return"auto"===i?null:i}function nt(e,t,i){var o=document.createElement(e);return o.className=t||"",i&&i.appendChild(o),o}function at(e){var t=e.parentNode;t&&t.removeChild(e)}function rt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function lt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function dt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var i=_t(e);return i.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(i)}function ct(e,t){if(void 0!==e.classList)for(var i=u(t),o=0,n=i.length;o0?2*window.devicePixelRatio:1;function Ht(e){return Me.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Bt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function Ft(e,t){var i=t.relatedTarget;if(!i)return!0;try{for(;i&&i!==e;)i=i.parentNode}catch(e){return!1}return i!==e}var qt={__proto__:null,on:$t,off:Tt,stopPropagation:Mt,disableScrollPropagation:Dt,disableClickPropagation:jt,preventDefault:Lt,stop:Ut,getPropagationPath:Rt,getMousePosition:Nt,getWheelDelta:Ht,isExternalTarget:Ft,addListener:$t,removeListener:Tt},Vt=T.extend({run:function(e,t,i,o){this.stop(),this._el=e,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=yt(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=S(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,i=1e3*this._duration;tthis.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var i=this.getCenter(),o=this._limitCenter(i,this._zoom,j(e));return i.equals(o)||this.panTo(o,t),this._enforcingBounds=!1,this},panInside:function(e,t){var i=E((t=t||{}).paddingTopLeft||t.padding||[0,0]),o=E(t.paddingBottomRight||t.padding||[0,0]),n=this.project(this.getCenter()),a=this.project(e),r=this.getPixelBounds(),s=M([r.min.add(i),r.max.subtract(o)]),l=s.getSize();if(!s.contains(a)){this._enforcingBounds=!0;var d=a.subtract(s.getCenter()),c=s.extend(a).getSize().subtract(l);n.x+=d.x<0?-c.x:c.x,n.y+=d.y<0?-c.y:c.y,this.panTo(this.unproject(n),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=t({animate:!1,pan:!0},!0===e?{animate:!0}:e);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),a=i.divideBy(2).round(),r=n.divideBy(2).round(),s=a.subtract(r);return s.x||s.y?(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=t({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,e):navigator.geolocation.getCurrentPosition(i,n,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,i=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new U(e.coords.latitude,e.coords.longitude),i=t.toBounds(2*e.coords.accuracy),o=this._locateOptions;if(o.setView){var n=this.getBoundsZoom(i);this.setView(t,o.maxZoom?Math.min(n,o.maxZoom):n)}var a={latlng:t,bounds:i,timestamp:e.timestamp};for(var r in e.coords)"number"==typeof e.coords[r]&&(a[r]=e.coords[r]);this.fire("locationfound",a)}},addHandler:function(e,t){if(!t)return this;var i=this[e]=new t(this);return this._handlers.push(i),this.options[e]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),at(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)at(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var i=nt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new D(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,i){e=j(e),i=E(i||[0,0]);var o=this.getZoom()||0,n=this.getMinZoom(),a=this.getMaxZoom(),r=e.getNorthWest(),s=e.getSouthEast(),l=this.getSize().subtract(i),d=M(this.project(s,o),this.project(r,o)).getSize(),c=Me.any3d?this.options.zoomSnap:1,u=l.x/d.x,p=l.y/d.y,_=t?Math.max(u,p):Math.min(u,p);return o=this.getScaleZoom(_,o),c&&(o=Math.round(o/(c/100))*(c/100),o=t?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(n,Math.min(a,o))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var i=this._getTopLeftPoint(e,t);return new I(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var i=this.options.crs;return t=void 0===t?this._zoom:t,i.scale(e)/i.scale(t)},getScaleZoom:function(e,t){var i=this.options.crs;t=void 0===t?this._zoom:t;var o=i.zoom(e*i.scale(t));return isNaN(o)?1/0:o},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(R(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(E(e),t)},layerPointToLatLng:function(e){var t=E(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(R(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(R(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(j(e))},distance:function(e,t){return this.options.crs.distance(R(e),R(t))},containerPointToLayerPoint:function(e){return E(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return E(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(E(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(e)))},mouseEventToContainerPoint:function(e){return Nt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=it(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");$t(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Me.any3d,ct(e,"leaflet-container"+(Me.touch?" leaflet-touch":"")+(Me.retina?" leaflet-retina":"")+(Me.ielt9?" leaflet-oldie":"")+(Me.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=ot(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),vt(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ct(e.markerPane,"leaflet-zoom-hide"),ct(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,i){vt(this._mapPane,new O(0,0));var o=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var n=this._zoom!==t;this._moveStart(n,i)._move(e,t)._moveEnd(n),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,i,o){void 0===t&&(t=this._zoom);var n=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),o?i&&i.pinch&&this.fire("zoom",i):((n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){vt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[a(this._container)]=this;var t=e?Tt:$t;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Me.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=S(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var i,o=[],n="mouseout"===t||"mouseover"===t,r=e.target||e.srcElement,s=!1;r;){if((i=this._targets[a(r)])&&("click"===t||"preclick"===t)&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(t,!0)){if(n&&!Ft(r,e))break;if(o.push(i),n)break}if(r===this._container)break;r=r.parentNode}return o.length||s||n||!this.listens(t,!0)||(o=[this]),o},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var i=e.type;"mousedown"===i&&kt(t),this._fireDOMEvent(e,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,i,o){if("click"===e.type){var n=t({},e);n.type="preclick",this._fireDOMEvent(n,n.type,o)}var a=this._findEventTargets(e,i);if(o){for(var r=[],s=0;s0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),i=this.getMaxZoom(),o=Me.any3d?this.options.zoomSnap:1;return o&&(e=Math.round(e/o)*o),Math.max(t,Math.min(i,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ut(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var i=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(i)||(this.panBy(i,t),0))},_createAnimProxy:function(){var e=this._proxy=nt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=Xe,i=this._proxy.style[t];gt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),i===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){at(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();gt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(t),n=this._getCenterOffset(e)._divideBy(1-1/o);return!(!0!==i.animate&&!this.getSize().contains(n)||(S(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(e,t,!0)},this),0))},_animateZoom:function(e,t,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,ct(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ut(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var Wt=$.extend({options:{position:"topright"},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),i=this.getPosition(),o=e._controlCorners[i];return ct(t,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(t,o.firstChild):o.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(at(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Jt=function(e){return new Wt(e)};Gt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",i=this._controlContainer=nt("div",t+"control-container",this._container);function o(o,n){var a=t+o+" "+t+n;e[o+n]=nt("div",a,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)at(this._controlCorners[e]);at(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Kt=Wt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,i,o){return i1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(a(e.target)),i=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;i&&this._map.fire(i,t)},_createRadioElement:function(e,t){var i='",o=document.createElement("div");return o.innerHTML=i,o.firstChild},_addItem:function(e){var t,i=document.createElement("label"),o=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=o):t=this._createRadioElement("leaflet-base-layers_"+a(this),o),this._layerControlInputs.push(t),t.layerId=a(e.layer),$t(t,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+e.name;var r=document.createElement("span");return i.appendChild(r),r.appendChild(t),r.appendChild(n),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var e,t,i=this._layerControlInputs,o=[],n=[];this._handlingClick=!0;for(var a=i.length-1;a>=0;a--)e=i[a],t=this._getLayer(e.layerId).layer,e.checked?o.push(t):e.checked||n.push(t);for(a=0;a=0;n--)e=i[n],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&ot.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,$t(e,"click",Lt),this.expand();var t=this;setTimeout(function(){Tt(e,"click",Lt),t._preventClick=!1})}}),Qt=Wt.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",i=nt("div",t+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,t+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,t+"-out",i,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,i,o,n){var a=nt("a",i,o);return a.innerHTML=e,a.href="#",a.title=t,a.setAttribute("role","button"),a.setAttribute("aria-label",t),jt(a),$t(a,"click",Ut),$t(a,"click",n,this),$t(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";ut(this._zoomInButton,t),ut(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(ct(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(ct(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});Gt.mergeOptions({zoomControl:!0}),Gt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qt,this.addControl(this.zoomControl))});var Zt=Wt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",i=nt("div",t),o=this.options;return this._addScales(o,t+"-line",i),e.on(o.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),i},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,i){e.metric&&(this._mScale=nt("div",t,i)),e.imperial&&(this._iScale=nt("div",t,i))},_update:function(){var e=this._map,t=e.getSize().y/2,i=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(i)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),i=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,i,t/e)},_updateImperial:function(e){var t,i,o,n=3.2808399*e;n>5280?(t=n/5280,i=this._getRoundNum(t),this._updateScale(this._iScale,i+" mi",i/t)):(o=this._getRoundNum(n),this._updateScale(this._iScale,o+" ft",o/n))},_updateScale:function(e,t,i){e.style.width=Math.round(this.options.maxWidth*i)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),i=e/t;return t*(i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),Yt=Wt.extend({options:{position:"bottomright",prefix:''+(Me.inlineSvg?' ':"")+"Leaflet"},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=nt("div","leaflet-control-attribution"),jt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}});Gt.mergeOptions({attributionControl:!0}),Gt.addInitHook(function(){this.options.attributionControl&&(new Yt).addTo(this)});Wt.Layers=Kt,Wt.Zoom=Qt,Wt.Scale=Zt,Wt.Attribution=Yt,Jt.layers=function(e,t,i){return new Kt(e,t,i)},Jt.zoom=function(e){return new Qt(e)},Jt.scale=function(e){return new Zt(e)},Jt.attribution=function(e){return new Yt(e)};var Xt=$.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Xt.addTo=function(e,t){return e.addHandler(t,this),this};var ei={Events:C},ti=Me.touch?"touchstart mousedown":"mousedown",ii=T.extend({options:{clickTolerance:3},initialize:function(e,t,i,o){p(this,o),this._element=e,this._dragStartTarget=t||e,this._preventOutline=i},enable:function(){this._enabled||($t(this._dragStartTarget,ti,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ii._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,ti,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!dt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)ii._dragging===this&&this.finishDrag();else if(!(ii._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(ii._dragging=this,this._preventOutline&&kt(this._element),bt(),Je(),this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,i=St(this._element);this._startPoint=new O(t.clientX,t.clientY),this._startPos=yt(this._element),this._parentScale=zt(i);var o="mousedown"===e.type;$t(document,o?"mousemove":"touchmove",this._onMove,this),$t(document,o?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,i=new O(t.clientX,t.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)t&&(i.push(e[o]),n=o);return nl&&(a=r,l=s);l>i&&(t[a]=1,ci(e,t,i,o,a),ci(e,t,i,a,n))}function ui(e,t,i,o,n){var a,r,s,l=o?ri:_i(e,i),d=_i(t,i);for(ri=d;;){if(!(l|d))return[e,t];if(l&d)return!1;s=_i(r=pi(e,t,a=l||d,i,n),i),a===l?(e=r,l=s):(t=r,d=s)}}function pi(e,t,i,o,n){var a,r,s=t.x-e.x,l=t.y-e.y,d=o.min,c=o.max;return 8&i?(a=e.x+s*(c.y-e.y)/l,r=c.y):4&i?(a=e.x+s*(d.y-e.y)/l,r=d.y):2&i?(a=c.x,r=e.y+l*(c.x-e.x)/s):1&i&&(a=d.x,r=e.y+l*(d.x-e.x)/s),new O(a,r,n)}function _i(e,t){var i=0;return e.xt.max.x&&(i|=2),e.yt.max.y&&(i|=8),i}function hi(e,t){var i=t.x-e.x,o=t.y-e.y;return i*i+o*o}function mi(e,t,i,o){var n,a=t.x,r=t.y,s=i.x-a,l=i.y-r,d=s*s+l*l;return d>0&&((n=((e.x-a)*s+(e.y-r)*l)/d)>1?(a=i.x,r=i.y):n>0&&(a+=s*n,r+=l*n)),s=e.x-a,l=e.y-r,o?s*s+l*l:new O(a,r)}function gi(e){return!g(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function vi(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gi(e)}function yi(e,t){var i,o,n,a,r,s,l,d;if(!e||0===e.length)throw new Error("latlngs not passed");gi(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var c=R([0,0]),u=j(e);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=ai(e));var p=e.length,_=[];for(i=0;io){l=(a-o)/n,d=[s.x-l*(s.x-r.x),s.y-l*(s.y-r.y)];break}var m=t.unproject(E(d));return R([m.lat+c.lat,m.lng+c.lng])}var fi={__proto__:null,simplify:li,pointToSegmentDistance:di,closestPointOnSegment:function(e,t,i){return mi(e,t,i)},clipSegment:ui,_getEdgeIntersection:pi,_getBitCode:_i,_sqClosestPointOnSegment:mi,isFlat:gi,_flat:vi,polylineCenter:yi},bi={project:function(e){return new O(e.lng,e.lat)},unproject:function(e){return new U(e.y,e.x)},bounds:new I([-180,-90],[180,90])},wi={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,i=this.R,o=e.lat*t,n=this.R_MINOR/i,a=Math.sqrt(1-n*n),r=a*Math.sin(o),s=Math.tan(Math.PI/4-o/2)/Math.pow((1-r)/(1+r),a/2);return o=-i*Math.log(Math.max(s,1e-10)),new O(e.lng*t*i,o)},unproject:function(e){for(var t,i=180/Math.PI,o=this.R,n=this.R_MINOR/o,a=Math.sqrt(1-n*n),r=Math.exp(-e.y/o),s=Math.PI/2-2*Math.atan(r),l=0,d=.1;l<15&&Math.abs(d)>1e-7;l++)t=a*Math.sin(s),t=Math.pow((1-t)/(1+t),a/2),s+=d=Math.PI/2-2*Math.atan(r*t)-s;return new U(s*i,e.x*i/o)}},ki={__proto__:null,LonLat:bi,Mercator:wi,SphericalMercator:q},xi=t({},H,{code:"EPSG:3395",projection:wi,transformation:function(){var e=.5/(Math.PI*wi.R);return G(e,.5,-e,.5)}()}),Si=t({},H,{code:"EPSG:4326",projection:bi,transformation:G(1/180,1,-1/180,.5)}),zi=t({},B,{projection:bi,transformation:G(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var i=t.lng-e.lng,o=t.lat-e.lat;return Math.sqrt(i*i+o*o)},infinite:!0});B.Earth=H,B.EPSG3395=xi,B.EPSG3857=W,B.EPSG900913=J,B.EPSG4326=Si,B.Simple=zi;var Ai=T.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[a(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[a(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var i=this.getEvents();t.on(i,this),this.once("remove",function(){t.off(i,this)},this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});Gt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=a(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=a(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return a(e)in this._layers},eachLayer:function(e,t){for(var i in this._layers)e.call(t,this._layers[i]);return this},_addLayers:function(e){for(var t=0,i=(e=e?g(e)?e:[e]:[]).length;tthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&t[0]instanceof U&&t[0].equals(t[i-1])&&t.pop(),t},_setLatLngs:function(e){ji.prototype._setLatLngs.call(this,e),gi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,i=new O(t,t);if(e=new I(e.min.subtract(i),e.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var o,n=0,a=this._rings.length;ne.y!=o.y>e.y&&e.x<(o.x-i.x)*(e.y-i.y)/(o.y-i.y)+i.x&&(d=!d);return d||ji.prototype._containsPoint.call(this,e,!0)}});var Ui=Ci.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,i,o,n=g(e)?e:e.features;if(n){for(t=0,i=n.length;t0&&n.push(n[0].slice()),n}function Vi(e,i){return e.feature?t({},e.feature,{geometry:i}):Gi(i)}function Gi(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var Wi={toGeoJSON:function(e){return Vi(this,{type:"Point",coordinates:Fi(this.getLatLng(),e)})}};function Ji(e,t){return new Ui(e,t)}Ei.include(Wi),Di.include(Wi),Mi.include(Wi),ji.include({toGeoJSON:function(e){var t=!gi(this._latlngs);return Vi(this,{type:(t?"Multi":"")+"LineString",coordinates:qi(this._latlngs,t?1:0,!1,e)})}}),Li.include({toGeoJSON:function(e){var t=!gi(this._latlngs),i=t&&!gi(this._latlngs[0]),o=qi(this._latlngs,i?2:t?1:0,!0,e);return t||(o=[o]),Vi(this,{type:(i?"Multi":"")+"Polygon",coordinates:o})}}),$i.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(i){t.push(i.toGeoJSON(e).geometry.coordinates)}),Vi(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var i="GeometryCollection"===t,o=[];return this.eachLayer(function(t){if(t.toGeoJSON){var n=t.toGeoJSON(e);if(i)o.push(n.geometry);else{var a=Gi(n);"FeatureCollection"===a.type?o.push.apply(o,a.features):o.push(a)}}}),i?Vi(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});var Ki=Ji,Qi=Ai.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,i){this._url=e,this._bounds=j(t),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ct(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){at(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&st(this._image),this},bringToBack:function(){return this._map&<(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=j(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:nt("img");ct(t,"leaflet-image-layer"),this._zoomAnimated&&ct(t,"leaflet-zoom-animated"),this.options.className&&ct(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onload=o(this.fire,this,"load"),t.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;gt(this._image,i,t)},_reset:function(){var e=this._image,t=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=t.getSize();vt(e,t.min),e.style.width=i.x+"px",e.style.height=i.y+"px"},_updateOpacity:function(){ht(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Zi=Qi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:nt("video");if(ct(t,"leaflet-image-layer"),this._zoomAnimated&&ct(t,"leaflet-zoom-animated"),this.options.className&&ct(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onloadeddata=o(this.fire,this,"load"),e){for(var i=t.getElementsByTagName("source"),n=[],a=0;a0?n:[t.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var r=0;rn?(t.height=n+"px",ct(e,a)):ut(e,a),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),i=this._getAnchor();vt(this._container,t.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(ot(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+t,o=this._containerWidth,n=new O(this._containerLeft,-i-this._containerBottom);n._add(yt(this._container));var a=e.layerPointToContainerPoint(n),r=E(this.options.autoPanPadding),s=E(this.options.autoPanPaddingTopLeft||r),l=E(this.options.autoPanPaddingBottomRight||r),d=e.getSize(),c=0,u=0;a.x+o+l.x>d.x&&(c=a.x+o-d.x+l.x),a.x-c-s.x<0&&(c=a.x-s.x),a.y+i+l.y>d.y&&(u=a.y+i-d.y+l.y),a.y-u-s.y<0&&(u=a.y-s.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return E(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Gt.mergeOptions({closePopupOnClick:!0}),Gt.include({openPopup:function(e,t,i){return this._initOverlay(eo,e,t,i).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Ai.include({bindPopup:function(e,t){return this._popup=this._initOverlay(eo,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Ci||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Ut(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof Ii?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var to=Xi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Xi.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Xi.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Xi.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=nt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,i,o=this._map,n=this._container,a=o.latLngToContainerPoint(o.getCenter()),r=o.layerPointToContainerPoint(e),s=this.options.direction,l=n.offsetWidth,d=n.offsetHeight,c=E(this.options.offset),u=this._getAnchor();"top"===s?(t=l/2,i=d):"bottom"===s?(t=l/2,i=0):"center"===s?(t=l/2,i=d/2):"right"===s?(t=0,i=d/2):"left"===s?(t=l,i=d/2):r.xthis.options.maxZoom||io&&this._retainParent(n,a,r,o))},_retainChildren:function(e,t,i,o){for(var n=2*e;n<2*e+2;n++)for(var a=2*t;a<2*t+2;a++){var r=new O(n,a);r.z=i+1;var s=this._tileCoordsToKey(r),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1this.options.maxZoom||void 0!==this.options.minZoom&&n1)this._setView(e,i);else{for(var u=n.min.y;u<=n.max.y;u++)for(var p=n.min.x;p<=n.max.x;p++){var _=new O(p,u);if(_.z=this._tileZoom,this._isValidTile(_)){var h=this._tiles[this._tileCoordsToKey(_)];h?h.current=!0:r.push(_)}}if(r.sort(function(e,t){return e.distanceTo(a)-t.distanceTo(a)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;pi.max.x)||!t.wrapLat&&(e.yi.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(e);return j(this.options.bounds).overlaps(o)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,i=this.getTileSize(),o=e.scaleBy(i),n=o.add(i);return[t.unproject(o,e.z),t.unproject(n,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),i=new D(t[0],t[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),i=new O(+t[0],+t[1]);return i.z=+t[2],i},_removeTile:function(e){var t=this._tiles[e];t&&(at(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){ct(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=l,e.onmousemove=l,Me.ielt9&&this.options.opacity<1&&ht(e,this.options.opacity)},_addTile:function(e,t){var i=this._getTilePos(e),n=this._tileCoordsToKey(e),a=this.createTile(this._wrapCoords(e),o(this._tileReady,this,e));this._initTile(a),this.createTile.length<2&&S(o(this._tileReady,this,e,null,a)),vt(a,i),this._tiles[n]={el:a,coords:e,current:!0},t.appendChild(a),this.fire("tileloadstart",{tile:a,coords:e})},_tileReady:function(e,t,i){t&&this.fire("tileerror",{error:t,tile:i,coords:e});var n=this._tileCoordsToKey(e);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ht(i.el,0),z(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),t||(ct(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Me.ielt9||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new O(this._wrapX?s(e.x,this._wrapX):e.x,this._wrapY?s(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new I(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});var no=oo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=p(this,t)).detectRetina&&Me.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var i=document.createElement("img");return $t(i,"load",o(this._tileOnLoad,this,t,i)),$t(i,"error",o(this._tileOnError,this,t,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(e),i},getTileUrl:function(e){var i={r:Me.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(i.y=o),i["-y"]=o}return m(this._url,t(i,this.options))},_tileOnLoad:function(e,t){Me.ielt9?setTimeout(o(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,i){var o=this.options.errorTileUrl;o&&t.getAttribute("src")!==o&&(t.src=o),e(i,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=l,t.onerror=l,!t.complete)){t.src=y;var i=this._tiles[e].coords;at(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:i})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",y),oo.prototype._removeTile.call(this,e)},_tileReady:function(e,t,i){if(this._map&&(!i||i.getAttribute("src")!==y))return oo.prototype._tileReady.call(this,e,t,i)}});function ao(e,t){return new no(e,t)}var ro=no.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,i){this._url=e;var o=t({},this.defaultWmsParams);for(var n in i)n in this.options||(o[n]=i[n]);var a=(i=p(this,i)).detectRetina&&Me.retina?2:1,r=this.getTileSize();o.width=r.x*a,o.height=r.y*a,this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,no.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),i=this._crs,o=M(i.project(t[0]),i.project(t[1])),n=o.min,a=o.max,r=(this._wmsVersion>=1.3&&this._crs===Si?[n.y,n.x,a.y,a.x]:[n.x,n.y,a.x,a.y]).join(","),s=no.prototype.getTileUrl.call(this,e);return s+_(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(e,i){return t(this.wmsParams,e),i||this.redraw(),this}});no.WMS=ro,ao.wms=function(e,t){return new ro(e,t)};var so=Ai.extend({options:{padding:.1},initialize:function(e){p(this,e),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ct(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var i=this._map.getZoomScale(t,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),n=this._map.project(this._center,t),a=o.multiplyBy(-i).add(n).subtract(this._map._getNewPixelOrigin(e,t));Me.any3d?gt(this._container,a,i):vt(this._container,a)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),i=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new I(i,i.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),lo=so.extend({options:{tolerance:0},getEvents:function(){var e=so.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){so.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");$t(e,"mousemove",this._onMouseMove,this),$t(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),$t(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,at(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){so.prototype._update.call(this);var e=this._bounds,t=this._container,i=e.getSize(),o=Me.retina?2:1;vt(t,e.min),t.width=o*i.x,t.height=o*i.y,t.style.width=i.x+"px",t.style.height=i.y+"px",Me.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){so.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[a(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,i=t.next,o=t.prev;i?i.prev=o:this._drawLast=o,o?o.next=i:this._drawFirst=i,delete e._order,delete this._layers[a(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,i,o=e.options.dashArray.split(/[, ]+/),n=[];for(i=0;i')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),po={_initContainer:function(){this._container=nt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(so.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=uo("shape");ct(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=uo("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;at(t),e.removeInteractiveTarget(t),delete this._layers[a(e)]},_updateStyle:function(e){var t=e._stroke,i=e._fill,o=e.options,n=e._container;n.stroked=!!o.stroke,n.filled=!!o.fill,o.stroke?(t||(t=e._stroke=uo("stroke")),n.appendChild(t),t.weight=o.weight+"px",t.color=o.color,t.opacity=o.opacity,o.dashArray?t.dashStyle=g(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=o.lineCap.replace("butt","flat"),t.joinstyle=o.lineJoin):t&&(n.removeChild(t),e._stroke=null),o.fill?(i||(i=e._fill=uo("fill")),n.appendChild(i),i.color=o.fillColor||o.color,i.opacity=o.fillOpacity):i&&(n.removeChild(i),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),i=Math.round(e._radius),o=Math.round(e._radiusY||i);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+i+","+o+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){st(e._container)},_bringToBack:function(e){lt(e._container)}},_o=Me.vml?uo:K,ho=so.extend({_initContainer:function(){this._container=_o("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=_o("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){at(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){so.prototype._update.call(this);var e=this._bounds,t=e.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,i.setAttribute("width",t.x),i.setAttribute("height",t.y)),vt(i,e.min),i.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=_o("path");e.options.className&&ct(t,e.options.className),e.options.interactive&&ct(t,"leaflet-interactive"),this._updateStyle(e),this._layers[a(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){at(e._path),e.removeInteractiveTarget(e._path),delete this._layers[a(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,i=e.options;t&&(i.stroke?(t.setAttribute("stroke",i.color),t.setAttribute("stroke-opacity",i.opacity),t.setAttribute("stroke-width",i.weight),t.setAttribute("stroke-linecap",i.lineCap),t.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?t.setAttribute("stroke-dasharray",i.dashArray):t.removeAttribute("stroke-dasharray"),i.dashOffset?t.setAttribute("stroke-dashoffset",i.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),i.fill?(t.setAttribute("fill",i.fillColor||i.color),t.setAttribute("fill-opacity",i.fillOpacity),t.setAttribute("fill-rule",i.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,Q(e._parts,t))},_updateCircle:function(e){var t=e._point,i=Math.max(Math.round(e._radius),1),o="a"+i+","+(Math.max(Math.round(e._radiusY),1)||i)+" 0 1,0 ",n=e._empty()?"M0 0":"M"+(t.x-i)+","+t.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(e,n)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){st(e._path)},_bringToBack:function(e){lt(e._path)}});function mo(e){return Me.svg||Me.vml?new ho(e):null}Me.vml&&ho.include(po),Gt.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&co(e)||mo(e)}});var go=Li.extend({initialize:function(e,t){Li.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=j(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});ho.create=_o,ho.pointsToPath=Q,Ui.geometryToLayer=Ri,Ui.coordsToLatLng=Bi,Ui.coordsToLatLngs=Hi,Ui.latLngToCoords=Fi,Ui.latLngsToCoords=qi,Ui.getFeature=Vi,Ui.asFeature=Gi,Gt.mergeOptions({boxZoom:!0});var vo=Xt.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){$t(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){at(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),Je(),bt(),this._startPoint=this._map.mouseEventToContainerPoint(e),$t(document,{contextmenu:Ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=nt("div","leaflet-zoom-box",this._container),ct(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new I(this._point,this._startPoint),i=t.getSize();vt(this._box,t.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(at(this._box),ut(this._container,"leaflet-crosshair")),Ke(),wt(),Tt(document,{contextmenu:Ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var t=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Gt.addInitHook("addHandler","boxZoom",vo),Gt.mergeOptions({doubleClickZoom:!0});var yo=Xt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,i=t.getZoom(),o=t.options.zoomDelta,n=e.originalEvent.shiftKey?i-o:i+o;"center"===t.options.doubleClickZoom?t.setZoom(n):t.setZoomAround(e.containerPoint,n)}});Gt.addInitHook("addHandler","doubleClickZoom",yo),Gt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var fo=Xt.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new ii(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}ct(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ut(this._map._container,"leaflet-grab"),ut(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=j(this._map.options.maxBounds);this._offsetLimit=M(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.xt.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),i=this._initialWorldOffset,o=this._draggable._newPos.x,n=(o-t+i)%e+t-i,a=(o+t+i)%e-t-i,r=Math.abs(n+i)0?a:-a))-t;this._delta=0,this._startTime=null,r&&("center"===e.options.scrollWheelZoom?e.setZoom(t+r):e.setZoomAround(this._lastMousePos,t+r))}});Gt.addInitHook("addHandler","scrollWheelZoom",wo);Gt.mergeOptions({tapHold:Me.touchNative&&Me.safari&&Me.mobile,tapTolerance:15});var ko=Xt.extend({addHooks:function(){$t(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new O(t.clientX,t.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&($t(document,"touchend",Lt),$t(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),600),$t(document,"touchend touchcancel contextmenu",this._cancel,this),$t(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Tt(document,"touchend",Lt),Tt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new O(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var i=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});i._simulated=!0,t.target.dispatchEvent(i)}});Gt.addInitHook("addHandler","tapHold",ko),Gt.mergeOptions({touchZoom:Me.touch,bounceAtZoomLimits:!0});var xo=Xt.extend({addHooks:function(){ct(this._map._container,"leaflet-touch-zoom"),$t(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ut(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var i=t.mouseEventToContainerPoint(e.touches[0]),o=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(i.add(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),$t(document,"touchmove",this._onTouchMove,this),$t(document,"touchend touchcancel",this._onTouchEnd,this),Lt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,i=t.mouseEventToContainerPoint(e.touches[0]),n=t.mouseEventToContainerPoint(e.touches[1]),a=i.distanceTo(n)/this._startDist;if(this._zoom=t.getScaleZoom(a,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoomt.getMaxZoom()&&a>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===a)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===a&&0===r.x&&0===r.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var s=o(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=S(s,this,!0),Lt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Gt.addInitHook("addHandler","touchZoom",xo),Gt.BoxZoom=vo,Gt.DoubleClickZoom=yo,Gt.Drag=fo,Gt.Keyboard=bo,Gt.ScrollWheelZoom=wo,Gt.TapHold=ko,Gt.TouchZoom=xo,e.Bounds=I,e.Browser=Me,e.CRS=B,e.Canvas=lo,e.Circle=Di,e.CircleMarker=Mi,e.Class=$,e.Control=Wt,e.DivIcon=io,e.DivOverlay=Xi,e.DomEvent=qt,e.DomUtil=At,e.Draggable=ii,e.Evented=T,e.FeatureGroup=Ci,e.GeoJSON=Ui,e.GridLayer=oo,e.Handler=Xt,e.Icon=Ti,e.ImageOverlay=Qi,e.LatLng=U,e.LatLngBounds=D,e.Layer=Ai,e.LayerGroup=$i,e.LineUtil=fi,e.Map=Gt,e.Marker=Ei,e.Mixin=ei,e.Path=Ii,e.Point=O,e.PolyUtil=si,e.Polygon=Li,e.Polyline=ji,e.Popup=eo,e.PosAnimation=Vt,e.Projection=ki,e.Rectangle=go,e.Renderer=so,e.SVG=ho,e.SVGOverlay=Yi,e.TileLayer=no,e.Tooltip=to,e.Transformation=V,e.Util=A,e.VideoOverlay=Zi,e.bind=o,e.bounds=M,e.canvas=co,e.circle=function(e,t,i){return new Di(e,t,i)},e.circleMarker=function(e,t){return new Mi(e,t)},e.control=Jt,e.divIcon=function(e){return new io(e)},e.extend=t,e.featureGroup=function(e,t){return new Ci(e,t)},e.geoJSON=Ji,e.geoJson=Ki,e.gridLayer=function(e){return new oo(e)},e.icon=function(e){return new Ti(e)},e.imageOverlay=function(e,t,i){return new Qi(e,t,i)},e.latLng=R,e.latLngBounds=j,e.layerGroup=function(e,t){return new $i(e,t)},e.map=function(e,t){return new Gt(e,t)},e.marker=function(e,t){return new Ei(e,t)},e.point=E,e.polygon=function(e,t){return new Li(e,t)},e.polyline=function(e,t){return new ji(e,t)},e.popup=function(e,t){return new eo(e,t)},e.rectangle=function(e,t){return new go(e,t)},e.setOptions=p,e.stamp=a,e.svg=mo,e.svgOverlay=function(e,t,i){return new Yi(e,t,i)},e.tileLayer=ao,e.tooltip=function(e,t){return new to(e,t)},e.transformation=G,e.version="1.9.4",e.videoOverlay=function(e,t,i){return new Zi(e,t,i)};var So=window.L;e.noConflict=function(){return window.L=So,this},window.L=e}(t)},7283(e){var t;t=()=>(()=>{var e={873:(e,t)=>{var i,o,n=function(){var e=function(e,t){var i=e,o=r[t],n=null,a=0,l=null,g=[],v={},f=function(e,t){n=function(e){for(var t=new Array(e),i=0;i=7&&x(e),null==l&&(l=A(i,o,g)),z(l,t)},b=function(e,t){for(var i=-1;i<=7;i+=1)if(!(e+i<=-1||a<=e+i))for(var o=-1;o<=7;o+=1)t+o<=-1||a<=t+o||(n[e+i][t+o]=0<=i&&i<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==i||6==i)||2<=i&&i<=4&&2<=o&&o<=4)},w=function(){for(var e=8;e>o&1);n[Math.floor(o/3)][o%3+a-8-3]=r}for(o=0;o<18;o+=1)r=!e&&1==(t>>o&1),n[o%3+a-8-3][Math.floor(o/3)]=r},S=function(e,t){for(var i=o<<3|t,r=s.getBCHTypeInfo(i),l=0;l<15;l+=1){var d=!e&&1==(r>>l&1);l<6?n[l][8]=d:l<8?n[l+1][8]=d:n[a-15+l][8]=d}for(l=0;l<15;l+=1)d=!e&&1==(r>>l&1),l<8?n[8][a-l-1]=d:l<9?n[8][15-l-1+1]=d:n[8][15-l-1]=d;n[a-8][8]=!e},z=function(e,t){for(var i=-1,o=a-1,r=7,l=0,d=s.getMaskFunction(t),c=a-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var u=0;u<2;u+=1)if(null==n[o][c-u]){var p=!1;l>>r&1)),d(o,c-u)&&(p=!p),n[o][c-u]=p,-1==(r-=1)&&(l+=1,r=7)}if((o+=i)<0||a<=o){o-=i,i=-i;break}}},A=function(e,t,i){for(var o=c.getRSBlocks(e,t),n=u(),a=0;a8*l)throw"code length overflow. ("+n.getLengthInBits()+">"+8*l+")";for(n.getLengthInBits()+4<=8*l&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*l||(n.put(236,8),n.getLengthInBits()>=8*l));)n.put(17,8);return function(e,t){for(var i=0,o=0,n=0,a=new Array(t.length),r=new Array(t.length),l=0;l=0?h.getAt(m):0}}var g=0;for(p=0;po)&&(e=o,t=i)}return t}())},v.createTableTag=function(e,t){e=e||2;var i="";i+='',i+="";for(var o=0;o";for(var n=0;n';i+=""}return(i+="")+"
"},v.createSvgTag=function(e,t,i,o){var n={};"object"==typeof arguments[0]&&(e=(n=arguments[0]).cellSize,t=n.margin,i=n.alt,o=n.title),e=e||2,t=void 0===t?4*e:t,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-description":null,(o="string"==typeof o?{text:o}:o||{}).text=o.text||null,o.id=o.text?o.id||"qrcode-title":null;var a,r,s,l,d=v.getModuleCount()*e+2*t,c="";for(l="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",c+=''+$(o.text)+"":"",c+=i.text?''+$(i.text)+"":"",c+='',c+='"},v.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var i=v.getModuleCount()*e+2*t,o=t,n=i-t;return y(i,i,function(t,i){if(o<=t&&t"};var $=function(e){for(var t="",i=0;i":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=o}}return t};return v.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,i,o,n,a,r=1*v.getModuleCount()+2*e,s=e,l=r-e,d={"██":"█","█ ":"▀"," █":"▄"," ":" "},c={"██":"▀","█ ":"▀"," █":" "," ":" "},u="";for(t=0;t=l?c[a]:d[a];u+="\n"}return r%2&&e>0?u.substring(0,u.length-r-1)+Array(r+1).join("▀"):u.substring(0,u.length-1)}(t);e-=1,t=void 0===t?2*e:t;var i,o,n,a,r=v.getModuleCount()*e+2*t,s=t,l=r-t,d=Array(e+1).join("██"),c=Array(e+1).join(" "),u="",p="";for(i=0;i>>8),t.push(255&r)):t.push(o)}}return t}};var t,i,o,n,a,r={L:1,M:0,Q:3,H:2},s=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],i=1335,o=7973,a=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(n={}).getBCHTypeInfo=function(e){for(var t=e<<10;a(t)-a(i)>=0;)t^=i<=0;)t^=o<5&&(i+=3+a-5)}for(o=0;o=256;)t-=255;return e[t]}}}();function d(e,t){if(void 0===e.length)throw e.length+"/"+t;var i=function(){for(var i=0;i>>7-t%8&1)},put:function(e,t){for(var o=0;o>>t-o-1&1))},getLengthInBits:function(){return t},putBit:function(i){var o=Math.floor(t/8);e.length<=o&&e.push(0),i&&(e[o]|=128>>>t%8),t+=1}};return i},p=function(e){var t=e,i={getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var i=t,n=0;n+2>>8&255)+(255&n),e.put(n,13),i+=2}if(i>>8)},writeBytes:function(e,i,o){i=i||0,o=o||e.length;for(var n=0;n0&&(t+=","),t+=e[i];return t+"]"}};return t},v=function(e){var t=e,i=0,o=0,n=0,a={read:function(){for(;n<8;){if(i>=t.length){if(0==n)return-1;throw"unexpected end of file./"+n}var e=t.charAt(i);if(i+=1,"="==e)return n=0,-1;e.match(/^\s$/)||(o=o<<6|r(e.charCodeAt(0)),n+=6)}var a=o>>>n-8&255;return n-=8,a}},r=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return a},y=function(e,t,i){for(var o=function(e,t){var i=e,o=t,n=new Array(e*t),a={setPixel:function(e,t,o){n[t*i+e]=o},write:function(e){e.writeString("GIF87a"),e.writeShort(i),e.writeShort(o),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(i),e.writeShort(o),e.writeByte(0);var t=r(2);e.writeByte(2);for(var n=0;t.length-n>255;)e.writeByte(255),e.writeBytes(t,n,255),n+=255;e.writeByte(t.length-n),e.writeBytes(t,n,t.length-n),e.writeByte(0),e.writeString(";")}},r=function(e){for(var t=1<>>t!=0)throw"length over";for(;d+t>=8;)l.writeByte(255&(e<>>=8-d,c=0,d=0;c|=e<0&&l.writeByte(c)}});p.write(t,o);var _=0,h=String.fromCharCode(n[_]);for(_+=1;_=6;)a(e>>>t-6),t-=6},n.flush=function(){if(t>0&&(a(e<<6-t),e=0,t=0),i%3!=0)for(var n=3-i%3,r=0;r>6,128|63&o):o<55296||o>=57344?t.push(224|o>>12,128|o>>6&63,128|63&o):(i++,o=65536+((1023&o)<<10|1023&e.charCodeAt(i)),t.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return t}(e)},void 0===(o="function"==typeof(i=function(){return n})?i.apply(t,[]):i)||(e.exports=o)}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};return(()=>{"use strict";i.d(o,{default:()=>$});const e=e=>!!e&&"object"==typeof e&&!Array.isArray(e);function t(i,...o){if(!o.length)return i;const n=o.shift();return void 0!==n&&e(i)&&e(n)?(i=Object.assign({},i),Object.keys(n).forEach(o=>{const a=i[o],r=n[o];Array.isArray(a)&&Array.isArray(r)?i[o]=r:e(a)&&e(r)?i[o]=t(Object.assign({},a),r):i[o]=r}),t(i,...o)):i}function n(e,t){const i=document.createElement("a");i.download=t,i.href=e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}const a={L:.07,M:.15,Q:.25,H:.3};class r{constructor({svg:e,type:t,window:i}){this._svg=e,this._type=t,this._window=i}draw(e,t,i,o){let n;switch(this._type){case"dots":n=this._drawDot;break;case"classy":n=this._drawClassy;break;case"classy-rounded":n=this._drawClassyRounded;break;case"rounded":n=this._drawRounded;break;case"extra-rounded":n=this._drawExtraRounded;break;default:n=this._drawSquare}n.call(this,{x:e,y:t,size:i,getNeighbor:o})}_rotateFigure({x:e,y:t,size:i,rotation:o=0,draw:n}){var a;const r=e+i/2,s=t+i/2;n(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*o/Math.PI},${r},${s})`)}_basicDot(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(i+t/2)),this._element.setAttribute("cy",String(o+t/2)),this._element.setAttribute("r",String(t/2))}}))}_basicSquare(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(i)),this._element.setAttribute("y",String(o)),this._element.setAttribute("width",String(t)),this._element.setAttribute("height",String(t))}}))}_basicSideRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h `+t/2+`a ${t/2} ${t/2}, 0, 0, 0, 0 ${-t}`)}}))}_basicCornerRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h ${t}v `+-t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${-t/2} ${-t/2}`)}}))}_basicCornerExtraRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h ${t}a ${t} ${t}, 0, 0, 0, ${-t} ${-t}`)}}))}_basicCornersRounded(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${i} ${o}v `+t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${t/2} ${t/2}h `+t/2+"v "+-t/2+`a ${t/2} ${t/2}, 0, 0, 0, ${-t/2} ${-t/2}`)}}))}_drawDot({x:e,y:t,size:i}){this._basicDot({x:e,y:t,size:i,rotation:0})}_drawSquare({x:e,y:t,size:i}){this._basicSquare({x:e,y:t,size:i,rotation:0})}_drawRounded({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0,l=n+a+r+s;if(0!==l)if(l>2||n&&a||r&&s)this._basicSquare({x:e,y:t,size:i,rotation:0});else{if(2===l){let o=0;return n&&r?o=Math.PI/2:r&&a?o=Math.PI:a&&s&&(o=-Math.PI/2),void this._basicCornerRounded({x:e,y:t,size:i,rotation:o})}if(1===l){let o=0;return r?o=Math.PI/2:a?o=Math.PI:s&&(o=-Math.PI/2),void this._basicSideRounded({x:e,y:t,size:i,rotation:o})}}else this._basicDot({x:e,y:t,size:i,rotation:0})}_drawExtraRounded({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0,l=n+a+r+s;if(0!==l)if(l>2||n&&a||r&&s)this._basicSquare({x:e,y:t,size:i,rotation:0});else{if(2===l){let o=0;return n&&r?o=Math.PI/2:r&&a?o=Math.PI:a&&s&&(o=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:t,size:i,rotation:o})}if(1===l){let o=0;return r?o=Math.PI/2:a?o=Math.PI:s&&(o=-Math.PI/2),void this._basicSideRounded({x:e,y:t,size:i,rotation:o})}}else this._basicDot({x:e,y:t,size:i,rotation:0})}_drawClassy({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0;0!==n+a+r+s?n||r?a||s?this._basicSquare({x:e,y:t,size:i,rotation:0}):this._basicCornerRounded({x:e,y:t,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:t,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:t,size:i,rotation:Math.PI/2})}_drawClassyRounded({x:e,y:t,size:i,getNeighbor:o}){const n=o?+o(-1,0):0,a=o?+o(1,0):0,r=o?+o(0,-1):0,s=o?+o(0,1):0;0!==n+a+r+s?n||r?a||s?this._basicSquare({x:e,y:t,size:i,rotation:0}):this._basicCornerExtraRounded({x:e,y:t,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:t,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:t,size:i,rotation:Math.PI/2})}}const s={dot:"dot",square:"square",extraRounded:"extra-rounded"},l=Object.values(s);class d{constructor({svg:e,type:t,window:i}){this._svg=e,this._type=t,this._window=i}draw(e,t,i,o){let n;switch(this._type){case s.square:n=this._drawSquare;break;case s.extraRounded:n=this._drawExtraRounded;break;default:n=this._drawDot}n.call(this,{x:e,y:t,size:i,rotation:o})}_rotateFigure({x:e,y:t,size:i,rotation:o=0,draw:n}){var a;const r=e+i/2,s=t+i/2;n(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*o/Math.PI},${r},${s})`)}_basicDot(e){const{size:t,x:i,y:o}=e,n=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${i+t/2} ${o}a ${t/2} ${t/2} 0 1 0 0.1 0zm 0 ${n}a ${t/2-n} ${t/2-n} 0 1 1 -0.1 0Z`)}}))}_basicSquare(e){const{size:t,x:i,y:o}=e,n=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${i} ${o}v ${t}h ${t}v `+-t+"z"+`M ${i+n} ${o+n}h `+(t-2*n)+"v "+(t-2*n)+"h "+(2*n-t)+"z")}}))}_basicExtraRounded(e){const{size:t,x:i,y:o}=e,n=t/7;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${i} ${o+2.5*n}v `+2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*n} ${2.5*n}h `+2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*n} ${2.5*-n}v `+-2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*-n} ${2.5*-n}h `+-2*n+`a ${2.5*n} ${2.5*n}, 0, 0, 0, ${2.5*-n} ${2.5*n}`+`M ${i+2.5*n} ${o+n}h `+2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*n} ${1.5*n}v `+2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*-n} ${1.5*n}h `+-2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*-n} ${1.5*-n}v `+-2*n+`a ${1.5*n} ${1.5*n}, 0, 0, 1, ${1.5*n} ${1.5*-n}`)}}))}_drawDot({x:e,y:t,size:i,rotation:o}){this._basicDot({x:e,y:t,size:i,rotation:o})}_drawSquare({x:e,y:t,size:i,rotation:o}){this._basicSquare({x:e,y:t,size:i,rotation:o})}_drawExtraRounded({x:e,y:t,size:i,rotation:o}){this._basicExtraRounded({x:e,y:t,size:i,rotation:o})}}const c={dot:"dot",square:"square"},u=Object.values(c);class p{constructor({svg:e,type:t,window:i}){this._svg=e,this._type=t,this._window=i}draw(e,t,i,o){let n;n=this._type===c.square?this._drawSquare:this._drawDot,n.call(this,{x:e,y:t,size:i,rotation:o})}_rotateFigure({x:e,y:t,size:i,rotation:o=0,draw:n}){var a;const r=e+i/2,s=t+i/2;n(),null===(a=this._element)||void 0===a||a.setAttribute("transform",`rotate(${180*o/Math.PI},${r},${s})`)}_basicDot(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(i+t/2)),this._element.setAttribute("cy",String(o+t/2)),this._element.setAttribute("r",String(t/2))}}))}_basicSquare(e){const{size:t,x:i,y:o}=e;this._rotateFigure(Object.assign(Object.assign({},e),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(i)),this._element.setAttribute("y",String(o)),this._element.setAttribute("width",String(t)),this._element.setAttribute("height",String(t))}}))}_drawDot({x:e,y:t,size:i,rotation:o}){this._basicDot({x:e,y:t,size:i,rotation:o})}_drawSquare({x:e,y:t,size:i,rotation:o}){this._basicSquare({x:e,y:t,size:i,rotation:o})}}const _="circle",h=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],m=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class g{constructor(e,t){this._roundSize=e=>this._options.dotsOptions.roundSize?Math.floor(e):e,this._window=t,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),e.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${e.width} ${e.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=e.image,this._instanceId=g.instanceCount++,this._options=e}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(e){const t=e.getModuleCount(),i=Math.min(this._options.width,this._options.height)-2*this._options.margin,o=this._options.shape===_?i/Math.sqrt(2):i,n=this._roundSize(o/t);let r={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=e,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:e,qrOptions:i}=this._options,o=e.imageSize*a[i.errorCorrectionLevel],s=Math.floor(o*t*t);r=function({originalHeight:e,originalWidth:t,maxHiddenDots:i,maxHiddenAxisDots:o,dotSize:n}){const a={x:0,y:0},r={x:0,y:0};if(e<=0||t<=0||i<=0||n<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const s=e/t;return a.x=Math.floor(Math.sqrt(i/s)),a.x<=0&&(a.x=1),o&&oi||o&&o{var o,n,a,s,l,d;return!(this._options.imageOptions.hideBackgroundDots&&e>=(t-r.hideYDots)/2&&e<(t+r.hideYDots)/2&&i>=(t-r.hideXDots)/2&&i<(t+r.hideXDots)/2||(null===(o=h[e])||void 0===o?void 0:o[i])||(null===(n=h[e-t+7])||void 0===n?void 0:n[i])||(null===(a=h[e])||void 0===a?void 0:a[i-t+7])||(null===(s=m[e])||void 0===s?void 0:s[i])||(null===(l=m[e-t+7])||void 0===l?void 0:l[i])||(null===(d=m[e])||void 0===d?void 0:d[i-t+7]))}),this.drawCorners(),this._options.image&&await this.drawImage({width:r.width,height:r.height,count:t,dotSize:n})}drawBackground(){var e,t,i;const o=this._element,n=this._options;if(o){const o=null===(e=n.backgroundOptions)||void 0===e?void 0:e.gradient,a=null===(t=n.backgroundOptions)||void 0===t?void 0:t.color;let r=n.height,s=n.width;if(o||a){const e=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),(null===(i=n.backgroundOptions)||void 0===i?void 0:i.round)&&(r=s=Math.min(n.width,n.height),e.setAttribute("rx",String(r/2*n.backgroundOptions.round))),e.setAttribute("x",String(this._roundSize((n.width-s)/2))),e.setAttribute("y",String(this._roundSize((n.height-r)/2))),e.setAttribute("width",String(s)),e.setAttribute("height",String(r)),this._backgroundClipPath.appendChild(e),this._createColor({options:o,color:a,additionalRotation:0,x:0,y:0,height:n.height,width:n.width,name:`background-color-${this._instanceId}`})}}}drawDots(e){var t,i;if(!this._qr)throw"QR code is not defined";const o=this._options,n=this._qr.getModuleCount();if(n>o.width||n>o.height)throw"The canvas is too small.";const a=Math.min(o.width,o.height)-2*o.margin,s=o.shape===_?a/Math.sqrt(2):a,l=this._roundSize(s/n),d=this._roundSize((o.width-n*l)/2),c=this._roundSize((o.height-n*l)/2),u=new r({svg:this._element,type:o.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(t=o.dotsOptions)||void 0===t?void 0:t.gradient,color:o.dotsOptions.color,additionalRotation:0,x:0,y:0,height:o.height,width:o.width,name:`dot-color-${this._instanceId}`});for(let t=0;t!(o+i<0||t+a<0||o+i>=n||t+a>=n)&&!(e&&!e(t+a,o+i))&&!!this._qr&&this._qr.isDark(t+a,o+i)),u._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(u._element));if(o.shape===_){const e=this._roundSize((a/l-n)/2),t=n+2*e,i=d-e*l,o=c-e*l,r=[],s=this._roundSize(t/2);for(let i=0;i=e-1&&i<=t-e&&o>=e-1&&o<=t-e||Math.sqrt((i-s)*(i-s)+(o-s)*(o-s))>s?r[i][o]=0:r[i][o]=this._qr.isDark(o-2*e<0?o:o>=n?o-2*e:o-e,i-2*e<0?i:i>=n?i-2*e:i-e)?1:0}for(let e=0;e{var o;return!!(null===(o=r[e+i])||void 0===o?void 0:o[n+t])}),u._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(u._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const e=this._element,t=this._options;if(!e)throw"Element code is not defined";const i=this._qr.getModuleCount(),o=Math.min(t.width,t.height)-2*t.margin,n=t.shape===_?o/Math.sqrt(2):o,a=this._roundSize(n/i),s=7*a,c=3*a,g=this._roundSize((t.width-i*a)/2),v=this._roundSize((t.height-i*a)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([e,o,n])=>{var _,y,f,b,w,k,x,S,z,A,$,C,T,O;const P=g+e*a*(i-7),E=v+o*a*(i-7);let I=this._dotsClipPath,M=this._dotsClipPath;if(((null===(_=t.cornersSquareOptions)||void 0===_?void 0:_.gradient)||(null===(y=t.cornersSquareOptions)||void 0===y?void 0:y.color))&&(I=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),I.setAttribute("id",`clip-path-corners-square-color-${e}-${o}-${this._instanceId}`),this._defs.appendChild(I),this._cornersSquareClipPath=this._cornersDotClipPath=M=I,this._createColor({options:null===(f=t.cornersSquareOptions)||void 0===f?void 0:f.gradient,color:null===(b=t.cornersSquareOptions)||void 0===b?void 0:b.color,additionalRotation:n,x:P,y:E,height:s,width:s,name:`corners-square-color-${e}-${o}-${this._instanceId}`})),(null===(w=t.cornersSquareOptions)||void 0===w?void 0:w.type)&&l.includes(t.cornersSquareOptions.type)){const e=new d({svg:this._element,type:t.cornersSquareOptions.type,window:this._window});e.draw(P,E,s,n),e._element&&I&&I.appendChild(e._element)}else{const e=new r({svg:this._element,type:(null===(k=t.cornersSquareOptions)||void 0===k?void 0:k.type)||t.dotsOptions.type,window:this._window});for(let t=0;t{var n;return!!(null===(n=h[t+o])||void 0===n?void 0:n[i+e])}),e._element&&I&&I.appendChild(e._element))}if(((null===(S=t.cornersDotOptions)||void 0===S?void 0:S.gradient)||(null===(z=t.cornersDotOptions)||void 0===z?void 0:z.color))&&(M=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),M.setAttribute("id",`clip-path-corners-dot-color-${e}-${o}-${this._instanceId}`),this._defs.appendChild(M),this._cornersDotClipPath=M,this._createColor({options:null===(A=t.cornersDotOptions)||void 0===A?void 0:A.gradient,color:null===($=t.cornersDotOptions)||void 0===$?void 0:$.color,additionalRotation:n,x:P+2*a,y:E+2*a,height:c,width:c,name:`corners-dot-color-${e}-${o}-${this._instanceId}`})),(null===(C=t.cornersDotOptions)||void 0===C?void 0:C.type)&&u.includes(t.cornersDotOptions.type)){const e=new p({svg:this._element,type:t.cornersDotOptions.type,window:this._window});e.draw(P+2*a,E+2*a,c,n),e._element&&M&&M.appendChild(e._element)}else{const e=new r({svg:this._element,type:(null===(T=t.cornersDotOptions)||void 0===T?void 0:T.type)||t.dotsOptions.type,window:this._window});for(let t=0;t{var n;return!!(null===(n=m[t+o])||void 0===n?void 0:n[i+e])}),e._element&&M&&M.appendChild(e._element))}})}loadImage(){return new Promise((e,t)=>{var i;const o=this._options;if(!o.image)return t("Image is not defined");if(null===(i=o.nodeCanvas)||void 0===i?void 0:i.loadImage)o.nodeCanvas.loadImage(o.image).then(t=>{var i,n;if(this._image=t,this._options.imageOptions.saveAsBlob){const e=null===(i=o.nodeCanvas)||void 0===i?void 0:i.createCanvas(this._image.width,this._image.height);null===(n=null==e?void 0:e.getContext("2d"))||void 0===n||n.drawImage(t,0,0),this._imageUri=null==e?void 0:e.toDataURL()}e()}).catch(t);else{const t=new this._window.Image;"string"==typeof o.imageOptions.crossOrigin&&(t.crossOrigin=o.imageOptions.crossOrigin),this._image=t,t.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await async function(e,t){return new Promise(i=>{const o=new t.XMLHttpRequest;o.onload=function(){const e=new t.FileReader;e.onloadend=function(){i(e.result)},e.readAsDataURL(o.response)},o.open("GET",e),o.responseType="blob",o.send()})}(o.image||"",this._window)),e()},t.src=o.image}})}async drawImage({width:e,height:t,count:i,dotSize:o}){const n=this._options,a=this._roundSize((n.width-i*o)/2),r=this._roundSize((n.height-i*o)/2),s=a+this._roundSize(n.imageOptions.margin+(i*o-e)/2),l=r+this._roundSize(n.imageOptions.margin+(i*o-t)/2),d=e-2*n.imageOptions.margin,c=t-2*n.imageOptions.margin,u=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");u.setAttribute("href",this._imageUri||""),u.setAttribute("xlink:href",this._imageUri||""),u.setAttribute("x",String(s)),u.setAttribute("y",String(l)),u.setAttribute("width",`${d}px`),u.setAttribute("height",`${c}px`),this._element.appendChild(u)}_createColor({options:e,color:t,additionalRotation:i,x:o,y:n,height:a,width:r,name:s}){const l=r>a?r:a,d=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(d.setAttribute("x",String(o)),d.setAttribute("y",String(n)),d.setAttribute("height",String(a)),d.setAttribute("width",String(r)),d.setAttribute("clip-path",`url('#clip-path-${s}')`),e){let t;if("radial"===e.type)t=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),t.setAttribute("id",s),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("fx",String(o+r/2)),t.setAttribute("fy",String(n+a/2)),t.setAttribute("cx",String(o+r/2)),t.setAttribute("cy",String(n+a/2)),t.setAttribute("r",String(l/2));else{const l=((e.rotation||0)+i)%(2*Math.PI),d=(l+2*Math.PI)%(2*Math.PI);let c=o+r/2,u=n+a/2,p=o+r/2,_=n+a/2;d>=0&&d<=.25*Math.PI||d>1.75*Math.PI&&d<=2*Math.PI?(c-=r/2,u-=a/2*Math.tan(l),p+=r/2,_+=a/2*Math.tan(l)):d>.25*Math.PI&&d<=.75*Math.PI?(u-=a/2,c-=r/2/Math.tan(l),_+=a/2,p+=r/2/Math.tan(l)):d>.75*Math.PI&&d<=1.25*Math.PI?(c+=r/2,u+=a/2*Math.tan(l),p-=r/2,_-=a/2*Math.tan(l)):d>1.25*Math.PI&&d<=1.75*Math.PI&&(u+=a/2,c+=r/2/Math.tan(l),_-=a/2,p-=r/2/Math.tan(l)),t=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),t.setAttribute("id",s),t.setAttribute("gradientUnits","userSpaceOnUse"),t.setAttribute("x1",String(Math.round(c))),t.setAttribute("y1",String(Math.round(u))),t.setAttribute("x2",String(Math.round(p))),t.setAttribute("y2",String(Math.round(_)))}e.colorStops.forEach(({offset:e,color:i})=>{const o=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");o.setAttribute("offset",100*e+"%"),o.setAttribute("stop-color",i),t.appendChild(o)}),d.setAttribute("fill",`url('#${s}')`),this._defs.appendChild(t)}else t&&d.setAttribute("fill",t);this._element.appendChild(d)}}g.instanceCount=0;const v=g,y="canvas",f={};for(let e=0;e<=40;e++)f[e]=e;const b={type:y,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:f[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function w(e){const t=Object.assign({},e);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map(e=>Object.assign(Object.assign({},e),{offset:Number(e.offset)})),t}function k(e){const t=Object.assign({},e);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=Object.assign(Object.assign({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=Object.assign({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=w(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=Object.assign({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=w(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=Object.assign({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=w(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=Object.assign({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=w(t.backgroundOptions.gradient))),t}var x=i(873),S=i.n(x);function z(e){if(!e)throw new Error("Extension must be defined");"."===e[0]&&(e=e.substring(1));const t={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[e.toLowerCase()];if(!t)throw new Error(`Extension "${e}" is not supported`);return t}class A{constructor(e){(null==e?void 0:e.jsdom)?this._window=new e.jsdom("",{resources:"usable"}).window:this._window=window,this._options=e?k(t(b,e)):b,this.update()}static _clearContainer(e){e&&(e.innerHTML="")}_setupSvg(){if(!this._qr)return;const e=new v(this._options,this._window);this._svg=e.getElement(),this._svgDrawingPromise=e.drawQR(this._qr).then(()=>{var t;this._svg&&(null===(t=this._extension)||void 0===t||t.call(this,e.getElement(),this._options))})}_setupCanvas(){var e,t;this._qr&&((null===(e=this._options.nodeCanvas)||void 0===e?void 0:e.createCanvas)?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then(()=>{var e;if(!this._svg)return;const t=this._svg,i=(new this._window.XMLSerializer).serializeToString(t),o=btoa(i),n=`data:${z("svg")};base64,${o}`;if(null===(e=this._options.nodeCanvas)||void 0===e?void 0:e.loadImage)return this._options.nodeCanvas.loadImage(n).then(e=>{var t,i;e.width=this._options.width,e.height=this._options.height,null===(i=null===(t=this._nodeCanvas)||void 0===t?void 0:t.getContext("2d"))||void 0===i||i.drawImage(e,0,0)});{const e=new this._window.Image;return new Promise(t=>{e.onload=()=>{var i,o;null===(o=null===(i=this._domCanvas)||void 0===i?void 0:i.getContext("2d"))||void 0===o||o.drawImage(e,0,0),t()},e.src=n})}}))}async _getElement(e="png"){if(!this._qr)throw"QR code is empty";return"svg"===e.toLowerCase()?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(e){A._clearContainer(this._container),this._options=e?k(t(this._options,e)):this._options,this._options.data&&(this._qr=S()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===y?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(e){if(e){if("function"!=typeof e.appendChild)throw"Container should be a single DOM node";this._options.type===y?this._domCanvas&&e.appendChild(this._domCanvas):this._svg&&e.appendChild(this._svg),this._container=e}}applyExtension(e){if(!e)throw"Extension function should be defined.";this._extension=e,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(e="png"){if(!this._qr)throw"QR code is empty";const t=await this._getElement(e),i=z(e);if(!t)return null;if("svg"===e.toLowerCase()){const e=`\r\n${(new this._window.XMLSerializer).serializeToString(t)}`;return"undefined"==typeof Blob||this._options.jsdom?Buffer.from(e):new Blob([e],{type:i})}return new Promise(e=>{const o=t;if("toBuffer"in o)if("image/png"===i)e(o.toBuffer(i));else if("image/jpeg"===i)e(o.toBuffer(i));else{if("application/pdf"!==i)throw Error("Unsupported extension");e(o.toBuffer(i))}else"toBlob"in o&&o.toBlob(e,i,1)})}async download(e){if(!this._qr)throw"QR code is empty";if("undefined"==typeof Blob)throw"Cannot download in Node.js, call getRawData instead.";let t="png",i="qr";"string"==typeof e?(t=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof e&&null!==e&&(e.name&&(i=e.name),e.extension&&(t=e.extension));const o=await this._getElement(t);if(o)if("svg"===t.toLowerCase()){let e=(new XMLSerializer).serializeToString(o);e='\r\n'+e,n(`data:${z(t)};charset=utf-8,${encodeURIComponent(e)}`,`${i}.svg`)}else n(o.toDataURL(z(t)),`${i}.${t}`)}}const $=A})(),o.default})(),e.exports=t()},5072(e){"use strict";var t=[];function i(e){for(var i=-1,o=0;o0?" ".concat(i.layer):""," {")),o+=i.css,n&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}");var a=i.sourceMap;a&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3917(e,t,i){"use strict";var o=i(2618),n=i(4791),a=function(e,t,i,o){var n,a=arguments.length,r=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};let r=class extends o.WF{constructor(){super(...arguments),this.value="",this.label="Navigation Target",this.disabled=!1}_valueChanged(e){const t=e.detail.value;this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:t},bubbles:!0,composed:!0}))}render(){return o.qy`