diff --git a/custom_components/album_slideshow/config_flow.py b/custom_components/album_slideshow/config_flow.py index 420def6..56a9562 100644 --- a/custom_components/album_slideshow/config_flow.py +++ b/custom_components/album_slideshow/config_flow.py @@ -52,6 +52,7 @@ from .const import ( CONF_ICLOUD_TOKEN, CONF_ICLOUD_IMAGE_SIZE, DEFAULT_ICLOUD_IMAGE_SIZE, + CONF_ICLOUD_BACKEND, ICLOUD_IMAGE_FULL, ICLOUD_IMAGE_PREVIEW, CONF_SYNOLOGY_URL, @@ -219,7 +220,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): if not ALBUM_URL_RE.match(url): errors[CONF_ALBUM_URL] = "invalid_album_url" else: - await self.async_set_unique_id(f"{DOMAIN}:{PROVIDER_GOOGLE_SHARED}:{url}") + await self.async_set_unique_id(f"{DOMAIN}:{PROVIDER_GOOGLE_SHARED}:{url}:{name}") self._abort_if_unique_id_configured() return self.async_create_entry( title=name, @@ -249,7 +250,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): if not path: errors[CONF_LOCAL_PATH] = "invalid_path" else: - await self.async_set_unique_id(f"{DOMAIN}:{PROVIDER_LOCAL_FOLDER}:{path}") + await self.async_set_unique_id(f"{DOMAIN}:{PROVIDER_LOCAL_FOLDER}:{path}:{name}") self._abort_if_unique_id_configured() return self.async_create_entry( title=name, @@ -283,7 +284,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): errors[CONF_MEDIA_CONTENT_ID] = "invalid_media_source" else: await self.async_set_unique_id( - f"{DOMAIN}:{PROVIDER_MEDIA_SOURCE}:{content_id}" + f"{DOMAIN}:{PROVIDER_MEDIA_SOURCE}:{content_id}:{name}" ) self._abort_if_unique_id_configured() return self.async_create_entry( @@ -395,7 +396,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): sel_id = json.dumps(selection, sort_keys=True) unique = ( f"{DOMAIN}:{PROVIDER_IMMICH}:{self._immich_url}:" - f"composite:{sel_id}:{raw_filter}" + f"composite:{sel_id}:{raw_filter}:{name}" ) await self.async_set_unique_id(unique) self._abort_if_unique_id_configured() @@ -574,7 +575,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): sel_id = json.dumps(selection, sort_keys=True) unique = ( f"{DOMAIN}:{PROVIDER_PHOTOPRISM}:{self._pp_url}:" - f"composite:{sel_id}:{raw_filter}" + f"composite:{sel_id}:{raw_filter}:{name}" ) await self.async_set_unique_id(unique) self._abort_if_unique_id_configured() @@ -659,18 +660,22 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): from . import icloud as icloud_api - token = icloud_api.parse_share_link(raw_url) - if not token: + parsed = icloud_api.parse_share(raw_url) + if not parsed: errors[CONF_ICLOUD_URL] = "invalid_icloud_url" else: - client = icloud_api.IcloudClient(self.hass, token) + token, backend = parsed + if backend == icloud_api.BACKEND_CLOUDKIT: + client = icloud_api.IcloudCloudKitClient(self.hass, token) + else: + client = icloud_api.IcloudClient(self.hass, token) try: await client.async_validate() except Exception: # noqa: BLE001 - any failure means bad/expired link errors["base"] = "icloud_cannot_connect" else: await self.async_set_unique_id( - f"{DOMAIN}:{PROVIDER_ICLOUD}:{token}" + f"{DOMAIN}:{PROVIDER_ICLOUD}:{token}:{name}" ) self._abort_if_unique_id_configured() return self.async_create_entry( @@ -678,6 +683,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): data={ CONF_PROVIDER: PROVIDER_ICLOUD, CONF_ICLOUD_TOKEN: token, + CONF_ICLOUD_BACKEND: backend, CONF_ICLOUD_IMAGE_SIZE: size, CONF_ALBUM_NAME: name, }, @@ -866,7 +872,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): sel_id = json.dumps(selection, sort_keys=True) unique = ( f"{DOMAIN}:{PROVIDER_SYNOLOGY}:{self._syn_url}:" - f"{self._syn_space}:{sel_id}" + f"{self._syn_space}:{sel_id}:{name}" ) await self.async_set_unique_id(unique) self._abort_if_unique_id_configured() @@ -957,7 +963,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): else: await self.async_set_unique_id( f"{DOMAIN}:{PROVIDER_NEXTCLOUD}:{client.base_url}:" - f"{username}:{client.folder}" + f"{username}:{client.folder}:{name}" ) self._abort_if_unique_id_configured() return self.async_create_entry( diff --git a/custom_components/album_slideshow/const.py b/custom_components/album_slideshow/const.py index b2f9c0f..d602112 100644 --- a/custom_components/album_slideshow/const.py +++ b/custom_components/album_slideshow/const.py @@ -129,6 +129,17 @@ CONF_ICLOUD_URL = "icloud_url" CONF_ICLOUD_TOKEN = "icloud_token" CONF_ICLOUD_IMAGE_SIZE = "icloud_image_size" +# Which iCloud backend serves the album. Older share links +# (``www.icloud.com/sharedalbum/#TOKEN``) use the legacy "shared streams" web +# API; iOS 26/macOS 26 and newer links +# (``photos.icloud.com/shared/album/TOKEN``) use CloudKit Web Services. Both are +# public and need no account. Entries created before this option existed default +# to the legacy backend. +CONF_ICLOUD_BACKEND = "icloud_backend" +ICLOUD_BACKEND_SHAREDSTREAMS = "sharedstreams" +ICLOUD_BACKEND_CLOUDKIT = "cloudkit" +DEFAULT_ICLOUD_BACKEND = ICLOUD_BACKEND_SHAREDSTREAMS + # ``full`` picks the largest derivative Apple generated (best for a slideshow, # usually ~2048px); ``preview`` picks the smallest (a thumbnail; fastest). ICLOUD_IMAGE_FULL = "full" diff --git a/custom_components/album_slideshow/coordinator.py b/custom_components/album_slideshow/coordinator.py index 8fb05b2..08dd588 100644 --- a/custom_components/album_slideshow/coordinator.py +++ b/custom_components/album_slideshow/coordinator.py @@ -44,6 +44,9 @@ from .const import ( CONF_ICLOUD_TOKEN, CONF_ICLOUD_IMAGE_SIZE, DEFAULT_ICLOUD_IMAGE_SIZE, + CONF_ICLOUD_BACKEND, + DEFAULT_ICLOUD_BACKEND, + ICLOUD_BACKEND_CLOUDKIT, CONF_SYNOLOGY_URL, CONF_SYNOLOGY_USERNAME, CONF_SYNOLOGY_PASSWORD, @@ -1523,18 +1526,23 @@ class AlbumCoordinator(DataUpdateCoordinator): async def _update_icloud(self) -> dict[str, Any]: """Fetch photos from a public iCloud Shared Album. - The webstream response carries capture date and caption inline, so - there is no enrichment pass. Signed image URLs are resolved up front - and expire after roughly a day, so they are refreshed on every album - refresh (like Google Photos). + Two public backends are supported: the legacy "shared streams" API and + the newer CloudKit backend used by iOS 26/macOS 26 share links. Both + carry capture date and caption inline, so there is no enrichment pass. + Signed image URLs are resolved up front and expire after a while, so + they are refreshed on every album refresh (like Google Photos). """ from . import icloud as icloud_api token = self.entry.data.get(CONF_ICLOUD_TOKEN) size = self.entry.data.get(CONF_ICLOUD_IMAGE_SIZE, DEFAULT_ICLOUD_IMAGE_SIZE) + backend = self.entry.data.get(CONF_ICLOUD_BACKEND, DEFAULT_ICLOUD_BACKEND) if not token: raise UpdateFailed("iCloud provider is missing the album token") + if backend == ICLOUD_BACKEND_CLOUDKIT: + return await self._update_icloud_cloudkit(icloud_api, token, size) + client = icloud_api.IcloudClient(self.hass, token) try: photos = await client.async_get_photos() @@ -1581,6 +1589,43 @@ class AlbumCoordinator(DataUpdateCoordinator): "items": items, } + async def _update_icloud_cloudkit( + self, icloud_api, token: str, size: str + ) -> dict[str, Any]: + """Fetch photos from a CloudKit-backed iCloud shared album.""" + client = icloud_api.IcloudCloudKitClient(self.hass, token) + try: + photos = await client.async_get_items(size) + except Exception as err: + raise UpdateFailed(f"Error querying iCloud album: {err}") from err + + if not photos: + raise UpdateFailed("No images found in the iCloud album") + + items: list[MediaItem] = [ + MediaItem( + url=p["url"], + width=p.get("width"), + height=p.get("height"), + mime_type=None, + filename=None, + captured_at=p.get("captured_at"), + description=p.get("description"), + source_id=p.get("source_id"), + exif_scanned=True, + ) + for p in photos + if p.get("url") + ] + + if not items: + raise UpdateFailed("Could not resolve any iCloud image URLs") + + return { + "title": self.entry.title, + "items": items, + } + async def _update_synology(self) -> dict[str, Any]: """Fetch photos from a Synology Photos library via its web API. diff --git a/custom_components/album_slideshow/icloud.py b/custom_components/album_slideshow/icloud.py index fa44325..296b7db 100644 --- a/custom_components/album_slideshow/icloud.py +++ b/custom_components/album_slideshow/icloud.py @@ -1,11 +1,11 @@ """iCloud Shared Album client and pure parsing helpers. -Talks to Apple's public "shared streams" web API for a shared photo album - -the same undocumented JSON endpoints the iCloud web album viewer uses. No -account or password is involved; the album's share token (the part after -``#`` in the share link) is the only credential. +Reads a public iCloud shared photo album. No account or password is involved; +the album's share token (from the share link) is the only credential. Apple +serves shared albums through two different public backends depending on when +the album was created, and this module speaks both: -API shape (POST, ``Content-Type: text/plain``, ``Origin: https://www.icloud.com``): +Legacy "shared streams" backend (``www.icloud.com/sharedalbum/#TOKEN``): - ``POST {base}/webstream`` ``{"streamCtag": null}`` -> ``{streamName, photos: [{photoGuid, derivatives:{:{checksum,width,height,fileSize}}, dateCreated, caption, width, height}]}``. May first answer with a @@ -16,13 +16,24 @@ API shape (POST, ``Content-Type: text/plain``, ``Origin: https://www.icloud.com` as ``https://{url_location}{url_path}``; it is a signed CDN link that expires after roughly a day, so it is refreshed on every album refresh. -Metadata: capture date (``dateCreated``) and caption are inline. Apple strips -GPS from shared-album web data, so there is no location. +CloudKit backend (``photos.icloud.com/shared/album/TOKEN``, iOS 26/macOS 26+): +- ``POST ckdatabasews.icloud.com/.../public/records/resolve?shortGUID=TOKEN`` + resolves the short link to a shared CloudKit zone and hands back an + anonymous ``publicAccessAuthToken`` plus the partition host to talk to. +- ``POST {partition}/.../shared/records/query`` with the anonymous token and + ``sharing_url_key`` returns ``CPLMaster``/``CPLAsset`` records; each + ``CPLMaster`` carries signed ``downloadURL`` derivatives directly. + +Both backends are POST with ``Content-Type: text/plain`` and +``Origin: https://www.icloud.com``. Metadata (capture date, caption) is inline; +Apple strips GPS from shared-album web data, so there is no location. """ from __future__ import annotations +import base64 from datetime import datetime, timezone from typing import Any +from urllib.parse import quote, urlencode import async_timeout from homeassistant.helpers.aiohttp_client import async_get_clientsession @@ -35,6 +46,12 @@ _URL_BATCH = 25 _BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +# Which iCloud backend serves an album. These string values match the +# ``ICLOUD_BACKEND_*`` constants in ``const.py``; they are duplicated here to +# keep this module free of a hard dependency on ``const``. +BACKEND_SHAREDSTREAMS = "sharedstreams" +BACKEND_CLOUDKIT = "cloudkit" + # Headers Apple's web endpoints expect for the shared-streams API. _API_HEADERS = { "Content-Type": "text/plain", @@ -42,6 +59,37 @@ _API_HEADERS = { "Accept": "application/json", } +# --- CloudKit backend constants ------------------------------------------- +_CK_RESOLVE_HOST = "https://ckdatabasews.icloud.com" +_CK_CONTAINER = "com.apple.photos.cloud" +_CK_BUILD = "2626" +# Sorted, non-hidden, non-deleted assets. Returns both CPLMaster (image +# resources) and CPLAsset (metadata) records in one query. +_CK_RECORD_TYPE = "CPLAssetAndMasterByAssetDateWithoutHiddenOrDeleted" +_CK_PAGE = 200 + +_CK_HEADERS = { + "Content-Type": "text/plain", + "Origin": "https://www.icloud.com", + "Referer": "https://www.icloud.com/", + "Accept": "application/json", +} + +# Image resource fields on a CPLMaster, in ascending size order, paired with +# their width/height sibling fields. +_CK_IMAGE_RES = ( + ("resJPEGThumbRes", "resJPEGThumbWidth", "resJPEGThumbHeight"), + ("resJPEGMedRes", "resJPEGMedWidth", "resJPEGMedHeight"), + ("resJPEGLargeRes", "resJPEGLargeWidth", "resJPEGLargeHeight"), + ("resOriginalRes", "resOriginalWidth", "resOriginalHeight"), +) +# Original item types a browser can display directly. The JPEG derivatives are +# always browser-safe; the original is only used as a fallback when it is one +# of these. +_CK_BROWSER_SAFE_ORIGINAL = {"public.jpeg", "public.png"} +# itemType substrings that mark a master as a video (skipped in a slideshow). +_CK_VIDEO_HINTS = ("movie", "video", "mpeg-4", "quicktime") + def _base62_to_int(value: str) -> int: result = 0 @@ -53,23 +101,51 @@ def _base62_to_int(value: str) -> int: def parse_share_link(url: str) -> str | None: """Extract the album share token from a pasted iCloud link. - Accepts a full ``https://www.icloud.com/sharedalbum/#TOKEN`` link or a - bare token. Returns ``None`` if nothing token-like is found. + Accepts a legacy ``https://www.icloud.com/sharedalbum/#TOKEN`` link, a new + ``https://photos.icloud.com/shared/album/TOKEN`` link, or a bare token. + Returns ``None`` if nothing token-like is found. """ if not url: return None text = url.strip() + # Legacy links carry the token in the fragment; new links carry it as the + # last path segment. if "#" in text: text = text.rsplit("#", 1)[1] elif "/" in text: text = text.rstrip("/").rsplit("/", 1)[1] - # Tokens are base62 and start with an uppercase letter (A, B, ...). + # Drop any leftover query string. + text = text.split("?", 1)[0] token = text.strip() + # Tokens are base62. Legacy tokens start with an uppercase letter; the new + # CloudKit short GUIDs may start with a digit, so no leading-char check. if token and all(ch in _BASE62 for ch in token): return token return None +def detect_backend(url: str) -> str: + """Return which iCloud backend a pasted share link belongs to. + + New ``photos.icloud.com/shared/album/...`` links use the CloudKit backend; + everything else (including bare tokens) defaults to the legacy shared + streams backend, preserving behaviour for links created before CloudKit. + """ + text = (url or "").lower() + if "/shared/album/" in text or "photos.icloud.com" in text: + return BACKEND_CLOUDKIT + return BACKEND_SHAREDSTREAMS + + +def parse_share(url: str) -> tuple[str, str] | None: + """Parse a share link into ``(token, backend)`` or ``None`` if invalid.""" + token = parse_share_link(url) + if not token: + return None + return token, detect_backend(url) + + + def partition_host(token: str) -> str: """Derive the shared-streams partition host for a token. @@ -250,3 +326,248 @@ class IcloudClient: raise RuntimeError(f"iCloud webstream failed: HTTP {status}") payload = _json.loads(raw) return payload.get("streamName") if isinstance(payload, dict) else None + + +# --- CloudKit backend helpers --------------------------------------------- + + +def _ck_value(fields: dict[str, Any], name: str) -> Any: + """Return the inner ``value`` of a CloudKit field, or ``None``.""" + field = fields.get(name) if isinstance(fields, dict) else None + return field.get("value") if isinstance(field, dict) else None + + +def _ck_decode_filename(fields: dict[str, Any]) -> str | None: + """Decode the (base64) ``filenameEnc`` field of a CPLMaster, if present.""" + raw = _ck_value(fields, "filenameEnc") + if isinstance(raw, str) and raw: + try: + return base64.b64decode(raw).decode("utf-8", "replace") + except (ValueError, TypeError): + return None + return None + + +def _ck_is_video(master_fields: dict[str, Any]) -> bool: + """Return ``True`` when a CPLMaster describes a video (not a still image). + + Only the ``itemType`` is used: Live Photos keep an image ``itemType`` (and + carry a non-zero asset duration), so they are treated as stills and shown. + """ + item_type = _ck_value(master_fields, "itemType") + if isinstance(item_type, str): + lowered = item_type.lower() + return any(hint in lowered for hint in _CK_VIDEO_HINTS) + return False + + +def pick_ck_resource( + master_fields: dict[str, Any], size: str +) -> tuple[str, Any, Any] | None: + """Pick a downloadable image derivative for the requested display ``size``. + + Returns ``(download_url, width, height)``. ``full`` selects the largest + available derivative (best for a slideshow); ``preview`` selects the + smallest. JPEG derivatives are always browser-safe; the original is only + considered when it is itself a browser-displayable format. + """ + if not isinstance(master_fields, dict): + return None + item_type = _ck_value(master_fields, "itemType") + item_type = item_type.lower() if isinstance(item_type, str) else "" + original_safe = item_type in _CK_BROWSER_SAFE_ORIGINAL + + candidates: list[tuple[int, str, Any, Any]] = [] + for res_key, w_key, h_key in _CK_IMAGE_RES: + res = master_fields.get(res_key) + if not isinstance(res, dict): + continue + val = res.get("value") + if not isinstance(val, dict): + continue + download_url = val.get("downloadURL") + if not download_url: + continue + if res_key == "resOriginalRes" and not original_safe: + continue + width = _ck_value(master_fields, w_key) + height = _ck_value(master_fields, h_key) + try: + rank = int(width) + except (TypeError, ValueError): + rank = 0 + candidates.append((rank, download_url, width, height)) + + if not candidates: + return None + candidates.sort(key=lambda c: c[0]) + _rank, download_url, width, height = candidates[0 if size == "preview" else -1] + return download_url, width, height + + +def build_ck_image_url(download_url: str | None, filename: str | None = None) -> str | None: + """Fill the ``${f}`` filename placeholder in a CloudKit download URL.""" + if not download_url: + return None + return download_url.replace("${f}", quote(filename or "image", safe="")) + + +def _ck_share_title(resolve_result: dict[str, Any]) -> str | None: + """Return the album title from a resolve result's share record, if any.""" + share = resolve_result.get("share") if isinstance(resolve_result, dict) else None + fields = share.get("fields") if isinstance(share, dict) else None + title = _ck_value(fields, "cloudkit.title") if isinstance(fields, dict) else None + if isinstance(title, str) and title.strip(): + return title.strip() + return None + + +def _to_int(value: Any) -> int | None: + return int(value) if isinstance(value, (int, float)) else None + + +def parse_ck_records(records: list[Any], size: str) -> list[dict[str, Any]]: + """Join CPLMaster + CPLAsset records into normalized photo dicts. + + Each returned dict has ``source_id``, ``url``, ``width``, ``height``, + ``captured_at`` (epoch ms) and ``description``. + """ + masters: dict[str, dict[str, Any]] = {} + assets: list[dict[str, Any]] = [] + for rec in records: + if not isinstance(rec, dict): + continue + if rec.get("recordType") == "CPLMaster": + masters[rec.get("recordName")] = rec.get("fields") or {} + elif rec.get("recordType") == "CPLAsset": + assets.append(rec) + + out: list[dict[str, Any]] = [] + seen: set[str] = set() + for asset in assets: + af = asset.get("fields") or {} + if _ck_value(af, "isHidden") or _ck_value(af, "trashReason"): + continue + ref = af.get("masterRef") + ref_val = ref.get("value") if isinstance(ref, dict) else None + master_name = ref_val.get("recordName") if isinstance(ref_val, dict) else None + master_fields = masters.get(master_name) + if not master_fields or _ck_is_video(master_fields): + continue + picked = pick_ck_resource(master_fields, size) + if not picked: + continue + download_url, width, height = picked + url = build_ck_image_url(download_url, _ck_decode_filename(master_fields)) + if not url: + continue + source_id = master_name or asset.get("recordName") + if not source_id or source_id in seen: + continue + seen.add(source_id) + out.append( + { + "source_id": source_id, + "url": url, + "width": _to_int(width), + "height": _to_int(height), + "captured_at": _to_int(_ck_value(af, "assetDate")), + "description": None, + } + ) + return out + + +class IcloudCloudKitClient: + """Async client for the CloudKit-backed iCloud shared album backend. + + Everything is anonymous: a ``resolve`` call turns the short share token + into a shared CloudKit zone plus a short-lived anonymous access token, and + a ``records/query`` call returns the album's photos with signed image URLs + already embedded. + """ + + def __init__(self, hass, token: str) -> None: + self.hass = hass + self.token = token + # Cached (zone, base_url, access_token, title) from the resolve call. + self._resolved: tuple[dict[str, Any], str, str, str | None] | None = None + + async def _post(self, url: str, body: dict[str, Any]) -> tuple[int, bytes]: + session = async_get_clientsession(self.hass) + async with async_timeout.timeout(_TIMEOUT): + async with session.post(url, json=body, headers=_CK_HEADERS) as resp: + return resp.status, await resp.read() + + async def _resolve(self) -> tuple[dict[str, Any], str, str, str | None]: + if self._resolved is not None: + return self._resolved + import json as _json + + url = ( + f"{_CK_RESOLVE_HOST}/database/1/{_CK_CONTAINER}/production" + f"/public/records/resolve?ckjsBuildVersion={_CK_BUILD}" + f"&shortGUID={self.token}" + ) + status, raw = await self._post(url, {"shortGUIDs": [{"value": self.token}]}) + if status != 200: + raise RuntimeError(f"iCloud resolve failed: HTTP {status}") + payload = _json.loads(raw) + results = payload.get("results") if isinstance(payload, dict) else None + if not results: + raise RuntimeError("iCloud share link did not resolve to an album") + result = results[0] + zone = result.get("zoneID") + access = result.get("anonymousPublicAccess") or {} + access_token = access.get("token") + partition = access.get("databasePartition") + if not zone or not access_token or not partition: + raise RuntimeError("iCloud shared album is not publicly accessible") + base = f"{partition}/database/1/{_CK_CONTAINER}/production" + self._resolved = (zone, base, access_token, _ck_share_title(result)) + return self._resolved + + def _query_url(self, base: str, access_token: str) -> str: + query = urlencode( + { + "remapEnums": "true", + "getCurrentSyncToken": "true", + "sharing_url_key": self.token, + "publicAccessAuthToken": access_token, + } + ) + return f"{base}/shared/records/query?{query}" + + async def async_validate(self) -> str | None: + """Return the album title if the share link resolves, else raise.""" + _zone, _base, _token, title = await self._resolve() + return title + + async def async_get_items(self, size: str) -> list[dict[str, Any]]: + """Return normalized photo dicts for the album (see ``parse_ck_records``).""" + import json as _json + + zone, base, access_token, _title = await self._resolve() + url = self._query_url(base, access_token) + records: list[Any] = [] + continuation: str | None = None + while len(records) < _MAX_ASSETS: + body: dict[str, Any] = { + "zoneID": zone, + "query": {"recordType": _CK_RECORD_TYPE}, + "resultsLimit": _CK_PAGE, + } + if continuation: + body["continuationMarker"] = continuation + status, raw = await self._post(url, body) + if status != 200: + raise RuntimeError(f"iCloud records query failed: HTTP {status}") + payload = _json.loads(raw) + batch = payload.get("records") if isinstance(payload, dict) else None + if not batch: + break + records.extend(batch) + continuation = payload.get("continuationMarker") if isinstance(payload, dict) else None + if not continuation: + break + return parse_ck_records(records, size) diff --git a/custom_components/album_slideshow/manifest.json b/custom_components/album_slideshow/manifest.json index 0fd19cf..90c1852 100644 --- a/custom_components/album_slideshow/manifest.json +++ b/custom_components/album_slideshow/manifest.json @@ -8,5 +8,5 @@ "iot_class": "cloud_polling", "issue_tracker": "https://github.com/eyalgal/album_slideshow/issues", "requirements": ["Pillow"], - "version": "1.6.2" + "version": "1.7.0" } diff --git a/custom_components/album_slideshow/strings.json b/custom_components/album_slideshow/strings.json index cf34134..a9daf99 100644 --- a/custom_components/album_slideshow/strings.json +++ b/custom_components/album_slideshow/strings.json @@ -78,7 +78,7 @@ }, "icloud": { "title": "iCloud Shared Album", - "description": "Paste the public link to an iCloud Shared Album (in Photos, open the album, tap the share icon, and copy the Public Website link). No Apple ID or password is needed - the link itself is the credential. Capture date and captions come through; Apple does not include location in shared albums.", + "description": "Paste the public link to an iCloud Shared Album (in Photos, open the album, tap the share icon, and copy the Public Website link). Both the older icloud.com/sharedalbum links and the newer photos.icloud.com/shared/album links work. No Apple ID or password is needed - the link itself is the credential. Capture date comes through; Apple does not include location in shared albums.", "data": { "album_name": "Album name", "icloud_url": "Shared album link", diff --git a/custom_components/album_slideshow/translations/en.json b/custom_components/album_slideshow/translations/en.json index cf34134..a9daf99 100644 --- a/custom_components/album_slideshow/translations/en.json +++ b/custom_components/album_slideshow/translations/en.json @@ -78,7 +78,7 @@ }, "icloud": { "title": "iCloud Shared Album", - "description": "Paste the public link to an iCloud Shared Album (in Photos, open the album, tap the share icon, and copy the Public Website link). No Apple ID or password is needed - the link itself is the credential. Capture date and captions come through; Apple does not include location in shared albums.", + "description": "Paste the public link to an iCloud Shared Album (in Photos, open the album, tap the share icon, and copy the Public Website link). Both the older icloud.com/sharedalbum links and the newer photos.icloud.com/shared/album links work. No Apple ID or password is needed - the link itself is the credential. Capture date comes through; Apple does not include location in shared albums.", "data": { "album_name": "Album name", "icloud_url": "Shared album link", diff --git a/custom_components/album_slideshow/www/album-slideshow-card.js b/custom_components/album_slideshow/www/album-slideshow-card.js index 6d8afda..40651a9 100644 --- a/custom_components/album_slideshow/www/album-slideshow-card.js +++ b/custom_components/album_slideshow/www/album-slideshow-card.js @@ -26,7 +26,7 @@ * tap_action: none # none | more-info */ -const VERSION = "1.6.2"; +const VERSION = "1.7.0"; const ANIMATED_TRANSITIONS = [ "fade", diff --git a/www/community/lovelace-mushroom/mushroom.js b/www/community/lovelace-mushroom/mushroom.js index 23ed580..17b19e8 100644 --- a/www/community/lovelace-mushroom/mushroom.js +++ b/www/community/lovelace-mushroom/mushroom.js @@ -1,78 +1,3727 @@ -var t,e,n,o,i,r,a,s,l,c,u,h,d,p,f,m,v,g,_,y,b,k,w,C,E,x,A,S,T,M,z,O,I,j,P,N,B,L,H,D,R,U,V,F,$,G,K,Y,q,W,X,Z,J,Q,tt,et,nt,ot,it,rt,at,st,lt,ct,ut,ht,dt,pt,ft,mt,vt,gt,_t,yt,bt,kt,wt,Ct,Et,xt,At,St,Tt,Mt,zt,Ot,It,jt,Pt,Nt,Bt,Lt,Ht,Dt,Rt,Ut,Vt,Ft,$t,Gt,Kt,Yt,qt,Wt,Xt,Zt,Jt,Qt,te,ee,ne,oe,ie,re,ae,se,le,ce,ue,he,de,pe,fe,me,ve,ge,_e,ye,be,ke,we,Ce,Ee,xe,Ae,Se,Te,Me,ze,Oe,Ie,je,Pe,Ne,Be,Le,He,De,Re,Ue,Ve,Fe,$e,Ge,Ke,Ye,qe,We,Xe,Ze,Je,Qe,tn,en,nn,on,rn,an,sn,ln,cn,un,hn,dn,pn,fn,mn,vn,gn,_n,yn,bn,kn,wn,Cn,En,xn,An,Sn,Tn,Mn,zn,On,In,jn,Pn,Nn,Bn,Ln,Hn,Dn,Rn,Un,Vn,Fn,$n,Gn,Kn,Yn,qn,Wn,Xn,Zn,Jn,Qn,to,eo,no,oo,io,ro,ao,so,lo,co,uo,ho,po,fo,mo,vo,go,_o,yo,bo,ko,wo,Co,Eo,xo,Ao,So,To,Mo,zo,Oo,Io,jo,Po,No,Bo,Lo,Ho,Do,Ro,Uo,Vo,Fo,$o,Go,Ko,Yo,qo,Wo,Xo,Zo,Jo,Qo,ti,ei,ni,oi,ii,ri,ai,si,li,ci,ui,hi,di,pi,fi,mi,vi,gi,_i,yi,bi,ki,wi,Ci,Ei,xi,Ai,Si,Ti,Mi,zi,Oi,Ii,ji,Pi,Ni,Bi=["message","explanation"];function Li(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Hi(t){return Xi(t)||Yi(t)||cr(t)||Wi()}function Di(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(mr(t)+" is not iterable")}var Ri=Zi().m(ds);function Ui(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Vi(t){for(var e=1;e3?(i=f===o)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=t):r[0]<=p&&((i=n<2&&po||o>f)&&(r[4]=n,r[5]=o,d.n=f,s=0))}if(i||n>1)return a;throw h=!0,o}return function(i,u,f){if(c>1)throw TypeError("Generator is already running");for(h&&1===u&&p(u,f),s=u,l=f;(e=s<2?t:l)||!h;){r||(s?s<3?(s>1&&(d.n=-1),p(s,l)):d.n=l:d.v=l);try{if(c=2,r){if(s||(i="next"),e=r[i]){if(!(e=e.call(r,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=r.return)&&e.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);r=t}else if((e=(h=d.n<0)?l:n.call(o,d))!==a)break}catch(e){r=t,s=1,l=e}finally{c=1}}return{value:e,done:h}}}(n,i,r),!0),c}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][o]?e(e([][o]())):(Ji(e={},o,(function(){return this})),e),h=c.prototype=s.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Ji(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return l.prototype=c,Ji(h,"constructor",c),Ji(c,"constructor",l),l.displayName="GeneratorFunction",Ji(c,i,"GeneratorFunction"),Ji(h),Ji(h,i,"Generator"),Ji(h,o,(function(){return this})),Ji(h,"toString",(function(){return"[object Generator]"})),(Zi=function(){return{w:r,m:d}})()}function Ji(t,e,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Ji=function(t,e,n,o){function r(e,n){Ji(t,e,(function(t){return this._invoke(e,n,t)}))}e?i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(r("next",0),r("throw",1),r("return",2))},Ji(t,e,n,o)}function Qi(t,e,n,o,i,r,a){try{var s=t[r](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(o,i)}function tr(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var r=t.apply(e,n);function a(t){Qi(r,o,i,a,s,"next",t)}function s(t){Qi(r,o,i,a,s,"throw",t)}a(void 0)}))}}function er(t,e,n){return e=sr(e),function(t,e){if(e&&("object"==mr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return nr(t)}(t,rr()?Reflect.construct(e,n||[],sr(t).constructor):e.apply(t,n))}function nr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function or(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ar(t,e)}function ir(t){var e="function"==typeof Map?new Map:void 0;return ir=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(rr())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var i=new(t.bind.apply(t,o));return n&&ar(i,n.prototype),i}(t,arguments,sr(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ar(n,t)},ir(t)}function rr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rr=function(){return!!t})()}function ar(t,e){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ar(t,e)}function sr(t){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sr(t)}function lr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=cr(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function cr(t,e){if(t){if("string"==typeof t)return ur(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(t,e):void 0}}function ur(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function kr(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i1?e-1:0),o=1;o0&&(this._$Ep=e)}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){if(Cr)t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet}));else{var n,o=lr(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,r=document.createElement("style"),a=wr.litNonce;void 0!==a&&r.setAttribute("nonce",a),r.textContent=i.cssText,t.appendChild(r)}}catch(t){o.e(t)}finally{o.f()}}}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$EO)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$EO)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ET",value:function(t,e){var n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(void 0!==o&&!0===n.reflect){var i,r=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:Ur).toAttribute(e,n.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}},{key:"_$AK",value:function(t,e){var n=this.constructor,o=n._$Eh.get(t);if(void 0!==o&&this._$Em!==o){var i,r,a,s=n.getPropertyOptions(o),l="function"==typeof s.converter?{fromAttribute:s.converter}:void 0!==(null===(i=s.converter)||void 0===i?void 0:i.fromAttribute)?s.converter:Ur;this._$Em=o;var c=l.fromAttribute(e,s.type);this[o]=null!==(r=null!=c?c:null===(a=this._$Ej)||void 0===a?void 0:a.get(o))&&void 0!==r?r:c,this._$Em=null}}},{key:"requestUpdate",value:function(t,e,n){if(void 0!==t){var o,i,r=this.constructor,a=this[t];if(null!=n||(n=r.getPropertyOptions(t)),!((null!==(o=n.hasChanged)&&void 0!==o?o:Vr)(a,e)||n.useDefault&&n.reflect&&a===(null===(i=this._$Ej)||void 0===i?void 0:i.get(t))&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(t,e,n,o){var i,r,a,s=n.useDefault,l=n.reflect,c=n.wrapped;s&&!(null!==(i=this._$Ej)&&void 0!==i?i:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!==(r=null!=o?o:e)&&void 0!==r?r:this[t]),!0!==c||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===l&&this._$Em!==t&&(null!==(a=this._$Eq)&&void 0!==a?a:this._$Eq=new Set).add(t))}},{key:"_$EP",value:(n=tr(Zi().m((function t(){var e,n;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:return this.isUpdatePending=!0,t.p=1,t.n=2,this._$ES;case 2:t.n=4;break;case 3:t.p=3,n=t.v,Promise.reject(n);case 4:if(null==(e=this.scheduleUpdate())){t.n=5;break}return t.n=5,e;case 5:return t.a(2,!this.isUpdatePending)}}),t,this,[[1,3]])}))),function(){return n.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){var e,n=lr(this._$Ep);try{for(n.s();!(e=n.n()).done;){var o=qi(e.value,2),i=o[0],r=o[1];this[i]=r}}catch(t){n.e(t)}finally{n.f()}this._$Ep=void 0}var a=this.constructor.elementProperties;if(a.size>0){var s,l=lr(a);try{for(l.s();!(s=l.n()).done;){var c=qi(s.value,2),u=c[0],h=c[1],d=h.wrapped,p=this[u];!0!==d||this._$AL.has(u)||void 0===p||this.C(u,void 0,h,p)}}catch(t){l.e(t)}finally{l.f()}}}var f=!1,m=this._$AL;try{var v;(f=this.shouldUpdate(m))?(this.willUpdate(m),null!==(v=this._$EO)&&void 0!==v&&v.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(m)):this._$EM()}catch(m){throw f=!1,this._$EM(),m}f&&this._$AE(m)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null!==(e=this._$EO)&&void 0!==e&&e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;this._$Eq&&(this._$Eq=this._$Eq.forEach((function(t){return e._$ET(t,e[t])}))),this._$EM()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&Ki(this._$Eh.keys())}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr;if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){var n=Symbol(),o=this.getPropertyDescriptor(t,n,e);void 0!==o&&Or(this.prototype,t,o)}}},{key:"getPropertyDescriptor",value:function(t,e,n){var o,i=null!==(o=Ir(this.prototype,t))&&void 0!==o?o:{get:function(){return this[e]},set:function(t){this[e]=t}},r=i.get,a=i.set;return{get:r,set:function(e){var o=null==r?void 0:r.call(this);null!=a&&a.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:Fr}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Rr("elementProperties"))){var t=Nr(this);t.finalize(),void 0!==t.l&&(this.l=Ki(t.l)),this.elementProperties=new Map(t.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Rr("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Rr("properties"))){var t,e=this.properties,n=lr([].concat(Ki(jr(e)),Ki(Pr(e))));try{for(n.s();!(t=n.n()).done;){var o=t.value;this.createProperty(o,e[o])}}catch(t){n.e(t)}finally{n.f()}}var i=this[Symbol.metadata];if(null!==i){var r=litPropertyMetadata.get(i);if(void 0!==r){var a,s=lr(r);try{for(s.s();!(a=s.n()).done;){var l=qi(a.value,2),c=l[0],u=l[1];this.elementProperties.set(c,u)}}catch(t){s.e(t)}finally{s.f()}}}this._$Eh=new Map;var h,d=lr(this.elementProperties);try{for(d.s();!(h=d.n()).done;){var p=qi(h.value,2),f=p[0],m=p[1],v=this._$Eu(f,m);void 0!==v&&this._$Eh.set(v,f)}}catch(t){d.e(t)}finally{d.f()}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,o=lr(new Set(t.flat(1/0).reverse()));try{for(o.s();!(n=o.n()).done;){var i=n.value;e.unshift(Mr(i))}}catch(t){o.e(t)}finally{o.f()}}else void 0!==t&&e.push(Mr(t));return e}},{key:"_$Eu",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]);var n}();$r.elementStyles=[],$r.shadowRootOptions={mode:"open"},$r[Rr("elementProperties")]=new Map,$r[Rr("finalized")]=new Map,null!=Dr&&Dr({ReactiveElement:$r}),(null!==(n=Br.reactiveElementVersions)&&void 0!==n?n:Br.reactiveElementVersions=[]).push("2.1.1"); -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var Gr=globalThis,Kr=Gr.trustedTypes,Yr=Kr?Kr.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,qr="$lit$",Wr="lit$".concat(Math.random().toFixed(9).slice(2),"$"),Xr="?"+Wr,Zr="<".concat(Xr,">"),Jr=document,Qr=function(){return Jr.createComment("")},ta=function(t){return null===t||"object"!=mr(t)&&"function"!=typeof t},ea=Array.isArray,na="[ \t\n\f\r]",oa=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ia=/-->/g,ra=/>/g,aa=RegExp(">|".concat(na,"(?:([^\\s\"'>=/]+)(").concat(na,"*=").concat(na,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),sa=/'/g,la=/"/g,ca=/^(?:script|style|textarea|title)$/i,ua=function(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i":3===e?"":"",a=oa,s=0;s"===u[0]?(a=null!=n?n:oa,h=-1):void 0===u[1]?h=-2:(h=a.lastIndex-u[2].length,c=u[1],a=void 0===u[3]?aa:'"'===u[3]?la:sa):a===la||a===sa?a=aa:a===ia||a===ra?a=oa:(a=aa,n=void 0);var p=a===aa&&t[s+1].startsWith("/>")?" ":"";r+=a===oa?l+Zr:h>=0?(i.push(c),l.slice(0,h)+qr+l.slice(h)+Wr+p):l+Wr+(-2===h?s:p)}return[ga(t,r+(t[o]||"")+(2===e?"":3===e?"":"")),i]},ya=function(){return pr((function t(e,n){var o,i=e.strings,r=e._$litType$;hr(this,t),this.parts=[];var a=0,s=0,l=i.length-1,c=this.parts,u=qi(_a(i,r),2),h=u[0],d=u[1];if(this.el=t.createElement(h,n),va.currentNode=this.el.content,2===r||3===r){var p=this.el.content.firstChild;p.replaceWith.apply(p,Ki(p.childNodes))}for(;null!==(o=va.nextNode())&&c.length0){o.textContent=Kr?Kr.emptyScript:"";for(var w=0;w2&&void 0!==arguments[2]?arguments[2]:t,l=arguments.length>3?arguments[3]:void 0;if(e===pa)return e;var c=void 0!==l?null===(n=s._$Co)||void 0===n?void 0:n[l]:s._$Cl,u=ta(e)?void 0:e._$litDirective$;return(null===(o=c)||void 0===o?void 0:o.constructor)!==u&&(null!==(i=c)&&void 0!==i&&null!==(r=i._$AO)&&void 0!==r&&r.call(i,!1),void 0===u?c=void 0:(c=new u(t))._$AT(t,s,l),void 0!==l?(null!==(a=s._$Co)&&void 0!==a?a:s._$Co=[])[l]=c:s._$Cl=c),void 0!==c&&(e=ba(t,c._$AS(t,e.values),c,l)),e}var ka=function(){return pr((function t(e,n){hr(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}),[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,o=n.el.content,i=n.parts,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:Jr).importNode(o,!0);va.currentNode=r;for(var a=va.nextNode(),s=0,l=0,c=i[0];void 0!==c;){var u;if(s===c.index){var h=void 0;2===c.type?h=new wa(a,a.nextSibling,this,t):1===c.type?h=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(h=new Sa(a,this,t)),this._$AV.push(h),c=i[++l]}s!==(null===(u=c)||void 0===u?void 0:u.index)&&(a=va.nextNode(),s++)}return va.currentNode=Jr,r}},{key:"p",value:function(t){var e,n=0,o=lr(this._$AV);try{for(o.s();!(e=o.n()).done;){var i=e.value;void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}catch(t){o.e(t)}finally{o.f()}}}])}(),wa=function(){function t(e,n,o,i){var r;hr(this,t),this.type=2,this._$AH=fa,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=o,this.options=i,this._$Cv=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}return pr(t,[{key:"_$AU",get:function(){var t,e;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cv}},{key:"parentNode",get:function(){var t,e=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(t=e)||void 0===t?void 0:t.nodeType)&&(e=n.parentNode),e}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=ba(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),ta(t)?t===fa||null==t||""===t?(this._$AH!==fa&&this._$AR(),this._$AH=fa):t!==this._$AH&&t!==pa&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):function(t){return ea(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])}(t)?this.k(t):this._(t)}},{key:"O",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"T",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}},{key:"_",value:function(t){this._$AH!==fa&&ta(this._$AH)?this._$AA.nextSibling.data=t:this.T(Jr.createTextNode(t)),this._$AH=t}},{key:"$",value:function(t){var e,n=t.values,o=t._$litType$,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=ya.createElement(ga(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.p(n);else{var r=new ka(i,this),a=r.u(this.options);r.p(n),this.T(a),this._$AH=r}}},{key:"_$AC",value:function(t){var e=ma.get(t.strings);return void 0===e&&ma.set(t.strings,e=new ya(t)),e}},{key:"k",value:function(e){ea(this._$AH)||(this._$AH=[],this._$AR());var n,o,i=this._$AH,r=0,a=lr(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;r===i.length?i.push(n=new t(this.O(Qr()),this.O(Qr()),this,this.options)):n=i[r],n._$AI(s),r++}}catch(t){a.e(t)}finally{a.f()}r0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t!==this._$AB;){var n,o=t.nextSibling;t.remove(),t=o}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cv=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}])}(),Ca=function(){return pr((function t(e,n,o,i,r){hr(this,t),this.type=1,this._$AH=fa,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=fa}),[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=this.strings,r=!1;if(void 0===i)t=ba(this,t,e,0),(r=!ta(t)||t!==this._$AH&&t!==pa)&&(this._$AH=t);else{var a,s,l=t;for(t=i[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:fa)!==pa){var n=this._$AH,o=t===fa&&n!==fa||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==fa&&(n===fa||o);o&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(n=this.options)||void 0===n?void 0:n.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}])}(),Sa=function(){return pr((function t(e,n,o){hr(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=o}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){ba(this,t)}}])}(),Ta=Gr.litHtmlPolyfillSupport;null!=Ta&&Ta(ya,wa),(null!==(o=Gr.litHtmlVersions)&&void 0!==o?o:Gr.litHtmlVersions=[]).push("3.3.1");var Ma=globalThis,za=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).renderOptions={host:nr(t)},t._$Do=void 0,t}return or(e,$r),pr(e,[{key:"createRenderRoot",value:function(){var t,n,o=$i(e,"createRenderRoot",this,3)([]);return null!==(n=(t=this.renderOptions).renderBefore)&&void 0!==n||(t.renderBefore=o.firstChild),o}},{key:"update",value:function(t){var n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),$i(e,"update",this,3)([t]),this._$Do=function(t,e,n){var o,i=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:e,r=i._$litPart$;if(void 0===r){var a,s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;i._$litPart$=r=new wa(e.insertBefore(Qr(),s),s,void 0,null!=n?n:{})}return r._$AI(t),r}(n,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;$i(e,"connectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;$i(e,"disconnectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return pa}}])}(); -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */za._$litElement$=!0,za.finalized=!0,null===(i=Ma.litElementHydrateSupport)||void 0===i||i.call(Ma,{LitElement:za});var Oa=Ma.litElementPolyfillSupport;null==Oa||Oa({LitElement:za}),(null!==(r=Ma.litElementVersions)&&void 0!==r?r:Ma.litElementVersions=[]).push("4.2.1"); -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var Ia=function(t){return function(e,n){void 0!==n?n.addInitializer((function(){customElements.define(t,e)})):customElements.define(t,e)}},ja={attribute:!0,type:String,converter:Ur,reflect:!1,hasChanged:Vr},Pa=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ja,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=n.kind,i=n.metadata,r=globalThis.litPropertyMetadata.get(i);if(void 0===r&&globalThis.litPropertyMetadata.set(i,r=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),r.set(n.name,t),"accessor"===o){var a=n.name;return{set:function(n){var o=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,o,t)},init:function(e){return void 0!==e&&this.C(a,void 0,t,e),e}}}if("setter"===o){var s=n.name;return function(n){var o=this[s];e.call(this,n),this.requestUpdate(s,o,t)}}throw Error("Unsupported decorator location: "+o)}; -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */function Na(t){return function(e,n){return"object"==mr(n)?Pa(t,e,n):function(t,e,n){var o=e.hasOwnProperty(n);return e.constructor.createProperty(n,t),o?Object.getOwnPropertyDescriptor(e,n):void 0}(t,e,n)}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */function Ba(t){return Na(Vi(Vi({},t),{},{state:!0,attribute:!1}))} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -function La(t,e){return function(e,n,o){return function(t,e,n){return n.configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=mr(e)&&Object.defineProperty(t,e,n),n}(e,n,{get:function(){return function(e){var n,o;return null!==(n=null===(o=e.renderRoot)||void 0===o?void 0:o.querySelector(t))&&void 0!==n?n:null}(this)}})}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */var Ha,Da,Ra,Ua,Va,Fa=1,$a=function(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return o}return or(e,Ga),pr(e,[{key:"render",value:function(t){return" "+Object.keys(t).filter((function(e){return t[e]})).join(" ")+" "}},{key:"update",value:function(t,e){var n=qi(e,1)[0];if(void 0===this.st){for(var o in this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((function(t){return""!==t})))),n){var i;n[o]&&(null===(i=this.nt)||void 0===i||!i.has(o))&&this.st.add(o)}return this.render(n)}var r,a=t.element.classList,s=lr(this.st);try{for(s.s();!(r=s.n()).done;){var l=r.value;l in n||(a.remove(l),this.st.delete(l))}}catch(t){s.e(t)}finally{s.f()}for(var c in n){var u,h=!!n[c];h===this.st.has(c)||(null===(u=this.nt)||void 0===u?void 0:u.has(c))||(h?(a.add(c),this.st.add(c)):(a.remove(c),this.st.delete(c)))}return pa}}])}()),Ya="important",qa=" !"+Ya,Wa=$a(function(t){function e(t){var n,o;if(hr(this,e),o=er(this,e,[t]),t.type!==Fa||"style"!==t.name||(null===(n=t.strings)||void 0===n?void 0:n.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return o}return or(e,Ga),pr(e,[{key:"render",value:function(t){return Object.keys(t).reduce((function(e,n){var o=t[n];return null==o?e:e+"".concat(n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(o,";")}),"")}},{key:"update",value:function(t,e){var n=qi(e,1)[0],o=t.element.style;if(void 0===this.ft)return this.ft=new Set(Object.keys(n)),this.render(n);var i,r=lr(this.ft);try{for(r.s();!(i=r.n()).done;){var a=i.value;null==n[a]&&(this.ft.delete(a),a.includes("-")?o.removeProperty(a):o[a]=null)}}catch(t){r.e(t)}finally{r.f()}for(var s in n){var l=n[s];if(null!=l){this.ft.add(s);var c="string"==typeof l&&l.endsWith(qa);s.includes("-")||c?o.setProperty(s,c?l.slice(0,-11):l,c?Ya:""):o[s]=l}}return pa}}])}()),Xa=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"]),Za=function(t,e,n,o){o=o||{},n=null==n?{}:n;var i=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return i.detail=n,t.dispatchEvent(i),i},Ja=function(t){return t.substr(0,t.indexOf("."))},Qa=function(t){return Ja(t.entity_id)},ts=function(t,e){return es(t.attributes,e)},es=function(t,e){return 0!=(t.supported_features&e)},ns=function(t,e,n){return Math.min(Math.max(t,e),n)};!function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(Ha||(Ha={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(Da||(Da={})),function(t){t.local="local",t.server="server"}(Ra||(Ra={})),function(t){t.language="language",t.system="system",t.DMY="DMY",t.MDY="MDY",t.YMD="YMD"}(Ua||(Ua={})),function(t){t.language="language",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday",t.sunday="sunday"}(Va||(Va={}));var os=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},is=function(t,e,n){var o=e?function(t){switch(t.number_format){case Ha.comma_decimal:return["en-US","en"];case Ha.decimal_comma:return["de","es","it"];case Ha.space_comma:return["fr","sv","cs"];case Ha.system:return;default:return t.language}}(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==Ha.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(o,rs(t,n)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,rs(t,n)).format(Number(t))}return"string"==typeof t?t:"".concat(os(t,null==n?void 0:n.maximumFractionDigits).toString()).concat("currency"===(null==n?void 0:n.style)?" ".concat(n.currency):"")},rs=function(t,e){var n=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return n;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){var o=t.indexOf(".")>-1?t.split(".")[1].length:0;n.minimumFractionDigits=o,n.maximumFractionDigits=o}return n},as=function(t){function e(t,n){var o,i;hr(this,e);var r=t.message,a=t.explanation,s=function(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(-1!==e.indexOf(o))continue;n[o]=t[o]}return n}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return Zi().m((function o(){var i,r,a,s,l,c,u,h,d,p,f,m,v,g,_,y,b,k,w,C,E,x,A,S,T,M,z,O,I,j;return Zi().w((function(o){for(;;)switch(o.p=o.n){case 0:i=n.path,r=void 0===i?[]:i,a=n.branch,s=void 0===a?[t]:a,l=n.coerce,c=void 0!==l&&l,u=n.mask,d={path:r,branch:s,mask:h=void 0!==u&&u},c&&(t=e.coercer(t,d)),p="valid",f=lr(e.validator(t,d)),o.p=1,f.s();case 2:if((m=f.n()).done){o.n=4;break}return(v=m.value).explanation=n.message,p="not_valid",o.n=3,[v,void 0];case 3:o.n=2;break;case 4:o.n=6;break;case 5:o.p=5,z=o.v,f.e(z);case 6:return o.p=6,f.f(),o.f(6);case 7:g=lr(e.entries(t,d)),o.p=8,g.s();case 9:if((_=g.n()).done){o.n=19;break}y=qi(_.value,3),b=y[0],k=y[1],w=y[2],C=ps(k,w,{path:void 0===b?r:[].concat(Ki(r),[b]),branch:void 0===b?s:[].concat(Ki(s),[k]),coerce:c,mask:h,message:n.message}),E=lr(C),o.p=10,E.s();case 11:if((x=E.n()).done){o.n=15;break}if(!(A=x.value)[0]){o.n=13;break}return p=null!=A[0].refinement?"not_refined":"not_valid",o.n=12,[A[0],void 0];case 12:o.n=14;break;case 13:c&&(k=A[1],void 0===b?t=k:t instanceof Map?t.set(b,k):t instanceof Set?t.add(k):ls(t)&&(void 0!==k||b in t)&&(t[b]=k));case 14:o.n=11;break;case 15:o.n=17;break;case 16:o.p=16,O=o.v,E.e(O);case 17:return o.p=17,E.f(),o.f(17);case 18:o.n=9;break;case 19:o.n=21;break;case 20:o.p=20,I=o.v,g.e(I);case 21:return o.p=21,g.f(),o.f(21);case 22:if("not_valid"===p){o.n=29;break}S=lr(e.refiner(t,d)),o.p=23,S.s();case 24:if((T=S.n()).done){o.n=26;break}return(M=T.value).explanation=n.message,p="not_refined",o.n=25,[M,void 0];case 25:o.n=24;break;case 26:o.n=28;break;case 27:o.p=27,j=o.v,S.e(j);case 28:return o.p=28,S.f(),o.f(28);case 29:if("valid"!==p){o.n=30;break}return o.n=30,[void 0,t];case 30:return o.a(2)}}),o,null,[[23,27,28,29],[10,16,17,18],[8,20,21,22],[1,5,6,7]])}))()}var fs=function(){return pr((function t(e){var n=this;hr(this,t);var o=e.type,i=e.schema,r=e.validator,a=e.refiner,s=e.coercer,l=void 0===s?function(t){return t}:s,c=e.entries,u=void 0===c?Zi().m((function t(){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2)}),t)})):c;this.type=o,this.schema=i,this.entries=u,this.coercer=l,this.validator=r?function(t,e){return ds(r(t,e),e,n,t)}:function(){return[]},this.refiner=a?function(t,e){return ds(a(t,e),e,n,t)}:function(){return[]}}),[{key:"assert",value:function(t,e){return ms(t,this,e)}},{key:"create",value:function(t,e){return function(t,e,n){var o=vs(t,e,{coerce:!0,message:n});if(o[0])throw o[0];return o[1]}(t,this,e)}},{key:"is",value:function(t){return function(t,e){var n=vs(t,e);return!n[0]}(t,this)}},{key:"mask",value:function(t,e){return function(t,e,n){var o=vs(t,e,{coerce:!0,mask:!0,message:n});if(o[0])throw o[0];return o[1]}(t,this,e)}},{key:"validate",value:function(t){return vs(t,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}])}();function ms(t,e,n){var o=vs(t,e,{message:n});if(o[0])throw o[0]}function vs(t,e){var n=ps(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),o=function(t){var e=t.next(),n=e.done,o=e.value;return n?void 0:o}(n);return o[0]?[new as(o[0],Zi().m((function t(){var e,o,i,r;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:e=lr(n),t.p=1,e.s();case 2:if((o=e.n()).done){t.n=4;break}if(!(i=o.value)[0]){t.n=3;break}return t.n=3,i[0];case 3:t.n=2;break;case 4:t.n=6;break;case 5:t.p=5,r=t.v,e.e(r);case 6:return t.p=6,e.f(),t.f(6);case 7:return t.a(2)}}),t,null,[[1,5,6,7]])}))),void 0]:[void 0,o[1]]}function gs(){for(var t=arguments.length,e=new Array(t),n=0;n0||navigator.msMaxTouchPoints>0,nl=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).holdTime=500,t.held=!1,t.cancelled=!1,t}return or(e,ir(HTMLElement)),pr(e,[{key:"connectedCallback",value:function(){var t=this;Object.assign(this.style,{position:"fixed",width:el?"100px":"50px",height:el?"100px":"50px",transform:"translate(-50%, -50%) scale(0)",pointerEvents:"none",zIndex:"999",background:"var(--primary-color)",display:null,opacity:"0.2",borderRadius:"50%",transition:"transform 180ms ease-in-out"}),["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach((function(e){document.addEventListener(e,(function(){t.cancelled=!0,t.timer&&(t._stopAnimation(),clearTimeout(t.timer),t.timer=void 0)}),{passive:!0})}))}},{key:"bind",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.actionHandler&&js(n,t.actionHandler.options)||(t.actionHandler?(t.removeEventListener("touchstart",t.actionHandler.start),t.removeEventListener("touchend",t.actionHandler.end),t.removeEventListener("touchcancel",t.actionHandler.end),t.removeEventListener("mousedown",t.actionHandler.start),t.removeEventListener("click",t.actionHandler.end),t.removeEventListener("keydown",t.actionHandler.handleKeyDown)):t.addEventListener("contextmenu",(function(t){var e=t||window.event;return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,e.returnValue=!1,!1})),t.actionHandler={options:n},n.disabled||(t.actionHandler.start=function(t){var o,i;e.cancelled=!1,t.touches?(o=t.touches[0].clientX,i=t.touches[0].clientY):(o=t.clientX,i=t.clientY),n.hasHold&&(e.held=!1,e.timer=window.setTimeout((function(){e._startAnimation(o,i),e.held=!0}),e.holdTime))},t.actionHandler.end=function(t){if(!("touchcancel"===t.type||"touchend"===t.type&&e.cancelled)){var o=t.target;t.cancelable&&t.preventDefault(),n.hasHold&&(clearTimeout(e.timer),e._stopAnimation(),e.timer=void 0),n.hasHold&&e.held?Za(o,"action",{action:"hold"}):n.hasDoubleClick?"click"===t.type&&t.detail<2||!e.dblClickTimeout?e.dblClickTimeout=window.setTimeout((function(){e.dblClickTimeout=void 0,!1!==n.hasTap&&Za(o,"action",{action:"tap"})}),250):(clearTimeout(e.dblClickTimeout),e.dblClickTimeout=void 0,Za(o,"action",{action:"double_tap"})):!1!==n.hasTap&&Za(o,"action",{action:"tap"})}},t.actionHandler.handleKeyDown=function(t){["Enter"," "].includes(t.key)&&t.currentTarget.actionHandler.end(t)},t.addEventListener("touchstart",t.actionHandler.start,{passive:!0}),t.addEventListener("touchend",t.actionHandler.end),t.addEventListener("touchcancel",t.actionHandler.end),t.addEventListener("mousedown",t.actionHandler.start,{passive:!0}),t.addEventListener("click",t.actionHandler.end),t.addEventListener("keydown",t.actionHandler.handleKeyDown)))}},{key:"_startAnimation",value:function(t,e){Object.assign(this.style,{left:"".concat(t,"px"),top:"".concat(e,"px"),transform:"translate(-50%, -50%) scale(1)"})}},{key:"_stopAnimation",value:function(){Object.assign(this.style,{left:null,top:null,transform:"translate(-50%, -50%) scale(0)"})}}])}(),ol=function(t,e){var n=function(){var t=document.body;if(t.querySelector("action-handler"))return t.querySelector("action-handler");customElements.get("action-handler")||customElements.define("action-handler",nl);var e=document.createElement("action-handler");return t.appendChild(e),e}();n&&n.bind(t,e)},il=$a(function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,Ga),pr(e,[{key:"update",value:function(t,e){var n=qi(e,1)[0];return ol(t.element,n),pa}},{key:"render",value:function(t){}}])}()),rl=function(){var t=tr(Zi().m((function t(e,n,o,i){return Zi().w((function(t){for(;;)switch(t.n){case 0:Za(e,"hass-action",{config:o,action:i});case 1:return t.a(2)}}),t)})));return function(e,n,o,i){return t.apply(this,arguments)}}();function al(t){return void 0!==t&&"none"!==t.action}var sl=As({user:Ts()}),ll=zs([ws(),As({text:Ss(Ts()),excemptions:Ss(ks(sl))})]),cl=As({action:Es("url"),url_path:Ts(),confirmation:Ss(ll)}),ul=As({action:Cs(["call-service","perform-action"]),service:Ss(Ts()),perform_action:Ss(Ts()),service_data:Ss(As()),data:Ss(As()),target:Ss(As({entity_id:Ss(zs([Ts(),ks(Ts())])),device_id:Ss(zs([Ts(),ks(Ts())])),area_id:Ss(zs([Ts(),ks(Ts())])),floor_id:Ss(zs([Ts(),ks(Ts())])),label_id:Ss(zs([Ts(),ks(Ts())]))})),confirmation:Ss(ll)}),hl=As({action:Es("navigate"),navigation_path:Ts(),confirmation:Ss(ll)}),dl=Ms({action:Es("assist"),pipeline_id:Ss(Ts()),start_listening:Ss(ws())}),pl=Ms({action:Es("fire-dom-event")}),fl=As({action:Cs(["none","toggle","more-info","call-service","perform-action","url","navigate","assist"]),confirmation:Ss(ll)}),ml=ys((function(t){if(t&&"object"===mr(t)&&"action"in t)switch(t.action){case"call-service":case"perform-action":return ul;case"fire-dom-event":return pl;case"navigate":return hl;case"url":return cl;case"assist":return dl}return fl})),vl=Tr(a||(a=Li(['\n #sortable a:nth-of-type(2n) paper-icon-item {\n animation-name: keyframes1;\n animation-iteration-count: infinite;\n transform-origin: 50% 10%;\n animation-delay: -0.75s;\n animation-duration: 0.25s;\n }\n\n #sortable a:nth-of-type(2n-1) paper-icon-item {\n animation-name: keyframes2;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n transform-origin: 30% 5%;\n animation-delay: -0.5s;\n animation-duration: 0.33s;\n }\n\n #sortable a {\n height: 48px;\n display: flex;\n }\n\n #sortable {\n outline: none;\n display: block !important;\n }\n\n .hidden-panel {\n display: flex !important;\n }\n\n .sortable-fallback {\n display: none;\n }\n\n .sortable-ghost {\n opacity: 0.4;\n }\n\n .sortable-fallback {\n opacity: 0;\n }\n\n @keyframes keyframes1 {\n 0% {\n transform: rotate(-1deg);\n animation-timing-function: ease-in;\n }\n\n 50% {\n transform: rotate(1.5deg);\n animation-timing-function: ease-out;\n }\n }\n\n @keyframes keyframes2 {\n 0% {\n transform: rotate(1deg);\n animation-timing-function: ease-in;\n }\n\n 50% {\n transform: rotate(-1.5deg);\n animation-timing-function: ease-out;\n }\n }\n\n .show-panel,\n .hide-panel {\n display: none;\n position: absolute;\n top: 0;\n right: 4px;\n --mdc-icon-button-size: 40px;\n }\n\n :host([rtl]) .show-panel {\n right: initial;\n left: 4px;\n }\n\n .hide-panel {\n top: 4px;\n right: 8px;\n }\n\n :host([rtl]) .hide-panel {\n right: initial;\n left: 8px;\n }\n\n :host([expanded]) .hide-panel {\n display: block;\n }\n\n :host([expanded]) .show-panel {\n display: inline-flex;\n }\n\n paper-icon-item.hidden-panel,\n paper-icon-item.hidden-panel span,\n paper-icon-item.hidden-panel ha-icon[slot="item-icon"] {\n color: var(--secondary-text-color);\n cursor: pointer;\n }\n']))),gl=function(t,e,n,o){var i=qi(t.split(".",3),3),r=i[0],a=i[1];i[2];return Number(r)>e||Number(r)===e&&Number(a)>=n||void 0!==o},_l=function(t,e){return t.callWS({type:"config/entity_registry/get",entity_id:e})};Ws((function(t){var e,n={},o=lr(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;n[i.entity_id]=i}}catch(t){o.e(t)}finally{o.f()}return n})),Ws((function(t){var e,n={},o=lr(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;n[i.id]=i}}catch(t){o.e(t)}finally{o.f()}return n}));var yl={armed_home:{feature:1,service:"alarm_arm_home",icon:"mdi:home"},armed_away:{feature:2,service:"alarm_arm_away",icon:"mdi:lock"},armed_night:{feature:4,service:"alarm_arm_night",icon:"mdi:moon-waning-crescent"},armed_vacation:{feature:32,service:"alarm_arm_vacation",icon:"mdi:airplane"},armed_custom_bypass:{feature:16,service:"alarm_arm_custom_bypass",icon:"mdi:shield"},disarmed:{service:"alarm_disarm",icon:"mdi:shield-off"}},bl=function(){var t=tr(Zi().m((function t(e,n,o,i){var r,a,s,l,c,u,h,d;return Zi().w((function(t){for(;;)switch(t.n){case 0:if(s=yl[i].service,!("disarmed"!==i&&o.attributes.code_arm_required||"disarmed"===i&&o.attributes.code_format)){t.n=5;break}return t.n=1,_l(n,o.entity_id).catch((function(){}));case 1:if(c=t.v,null===(a=null===(r=null==c?void 0:c.options)||void 0===r?void 0:r.alarm_control_panel)||void 0===a?void 0:a.default_code){t.n=5;break}return u="disarmed"===i,t.n=2,window.loadCardHelpers();case 2:return h=t.v,t.n=3,h.showEnterCodeDialog(e,{codeFormat:o.attributes.code_format,title:n.localize("ui.card.alarm_control_panel.".concat(u?"disarm":"arm")),submitText:n.localize("ui.card.alarm_control_panel.".concat(u?"disarm":"arm"))});case 3:if(null!=(d=t.v)){t.n=4;break}throw new Error("Code dialog closed");case 4:l=d;case 5:return t.n=6,n.callService("alarm_control_panel",s,{entity_id:o.entity_id,code:l});case 6:return t.a(2)}}),t)})));return function(e,n,o,i){return t.apply(this,arguments)}}(),kl=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).icon="",t}return or(e,za),pr(e,[{key:"render",value:function(){return ha(s||(s=Li(['\n
\n \n ',"\n ","\n
\n "])),null!==(t=this.primary)&&void 0!==t?t:"",this.secondary?ha(C||(C=Li(['',""])),this.multiline_secondary?" multiline_secondary":"",this.secondary):fa)}}],[{key:"styles",get:function(){return Tr(E||(E=Li(["\n .container {\n min-width: 0;\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .primary {\n font-weight: var(--card-primary-font-weight);\n font-size: var(--card-primary-font-size);\n line-height: var(--card-primary-line-height);\n color: var(--card-primary-color);\n letter-spacing: var(--card-primary-letter-spacing);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .secondary {\n font-weight: var(--card-secondary-font-weight);\n font-size: var(--card-secondary-font-size);\n line-height: var(--card-secondary-line-height);\n color: var(--card-secondary-color);\n letter-spacing: var(--card-secondary-letter-spacing);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .multiline_secondary {\n white-space: pre-wrap;\n }\n "])))}}])}();br([Na({attribute:!1})],Ml.prototype,"primary",void 0),br([Na({attribute:!1})],Ml.prototype,"secondary",void 0),br([Na({type:Boolean})],Ml.prototype,"multiline_secondary",void 0),Ml=br([Ia("mushroom-state-info")],Ml);var zl=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"render",value:function(){var t,e,n,o;return ha(x||(x=Li(["\n \n ","\n ","\n \n "])),Ka({container:!0,vertical:"vertical"===(null===(t=this.appearance)||void 0===t?void 0:t.layout)}),"none"!==(null===(e=this.appearance)||void 0===e?void 0:e.icon_type)?ha(A||(A=Li(['\n
\n \n \n
\n ']))):fa,"none"!==(null===(n=this.appearance)||void 0===n?void 0:n.primary_info)||"none"!==(null===(o=this.appearance)||void 0===o?void 0:o.secondary_info)?ha(S||(S=Li(['\n
\n \n
\n ']))):fa)}}],[{key:"styles",get:function(){return Tr(T||(T=Li(['\n :host {\n display: block;\n height: 100%;\n }\n .container {\n height: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: var(--spacing);\n gap: var(--spacing);\n }\n .icon {\n position: relative;\n }\n .icon ::slotted(*[slot="badge"]) {\n position: absolute;\n top: -3px;\n right: -3px;\n }\n :host([rtl]) .icon ::slotted(*[slot="badge"]) {\n right: initial;\n left: -3px;\n }\n .info {\n min-width: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n .container.vertical {\n flex-direction: column;\n }\n .container.vertical .info {\n text-align: center;\n }\n '])))}}])}();function Ol(t){var e,n;return{layout:null!==(e=t.layout)&&void 0!==e?e:Il(t),fill_container:null!==(n=t.fill_container)&&void 0!==n&&n,primary_info:t.primary_info||Pl(t),secondary_info:t.secondary_info||Nl(t),icon_type:t.icon_type||jl(t)}}function Il(t){return t.vertical?"vertical":"default"}function jl(t){return t.hide_icon?"none":t.use_entity_picture||t.use_media_artwork?"entity-picture":"icon"}function Pl(t){return t.hide_name?"none":"name"}function Nl(t){return t.hide_state?"none":"state"}function Bl(t,e){var n=e&&e.cache?e.cache:Kl,o=e&&e.serializer?e.serializer:$l;return(e&&e.strategy?e.strategy:Rl)(t,{cache:n,serializer:o})}function Ll(t,e,n,o){var i,r=null==(i=o)||"number"==typeof i||"boolean"==typeof i?o:n(o),a=e.get(r);return void 0===a&&(a=t.call(this,o),e.set(r,a)),a}function Hl(t,e,n){var o=Array.prototype.slice.call(arguments,3),i=n(o),r=e.get(i);return void 0===r&&(r=t.apply(this,o),e.set(i,r)),r}function Dl(t,e,n,o,i){return n.bind(e,t,o,i)}function Rl(t,e){return Dl(t,this,1===t.length?Ll:Hl,e.cache.create(),e.serializer)}br([Na()],zl.prototype,"appearance",void 0),zl=br([Ia("mushroom-state-item")],zl);var Ul,Vl,Fl,$l=function(){return JSON.stringify(arguments)},Gl=function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){this.cache[t]=e},t}(),Kl={create:function(){return new Gl}},Yl={variadic:function(t,e){return Dl(t,this,Hl,e.cache.create(),e.serializer)}};function ql(t){return t.type===Vl.literal}function Wl(t){return t.type===Vl.argument}function Xl(t){return t.type===Vl.number}function Zl(t){return t.type===Vl.date}function Jl(t){return t.type===Vl.time}function Ql(t){return t.type===Vl.select}function tc(t){return t.type===Vl.plural}function ec(t){return t.type===Vl.pound}function nc(t){return t.type===Vl.tag}function oc(t){return!(!t||"object"!==mr(t)||t.type!==Fl.number)}function ic(t){return!(!t||"object"!==mr(t)||t.type!==Fl.dateTime)}!function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Ul||(Ul={})),function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"}(Vl||(Vl={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(Fl||(Fl={}));var rc=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ac=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function sc(t){var e={};return t.replace(ac,(function(t){var n=t.length;switch(t[0]){case"G":e.era=4===n?"long":5===n?"narrow":"short";break;case"y":e.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}var lc=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var cc=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,uc=/^(@+)?(\+|#+)?[rs]?$/g,hc=/(\*)(0+)|(#+)(0+)|(0+)/g,dc=/^(0+)$/;function pc(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(uc,(function(t,n,o){return"string"!=typeof o?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):"+"===o?e.minimumSignificantDigits=n.length:"#"===n[0]?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+("string"==typeof o?o.length:0)),""})),e}function fc(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function mc(t){var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if("+!"===n?(e.signDisplay="always",t=t.slice(2)):"+?"===n&&(e.signDisplay="exceptZero",t=t.slice(2)),!dc.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function vc(t){var e=fc(t);return e||{}}function gc(t){for(var e={},n=0,o=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(hc,(function(t,n,o,i,r,a){if(n)e.minimumIntegerDigits=o.length;else{if(i&&r)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(dc.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(cc.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(cc,(function(t,n,o,i,r,a){return"*"===o?e.minimumFractionDigits=n.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:r&&a?(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length+a.length):(e.minimumFractionDigits=n.length,e.maximumFractionDigits=n.length),""}));var r=i.options[0];"w"===r?e=yr(yr({},e),{trailingZeroDisplay:"stripIfInteger"}):r&&(e=yr(yr({},e),pc(r)))}else if(uc.test(i.stem))e=yr(yr({},e),pc(i.stem));else{var a=fc(i.stem);a&&(e=yr(yr({},e),a));var s=mc(i.stem);s&&(e=yr(yr({},e),s))}}return e}var _c,yc={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function bc(t){var e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,o=t.language;return"root"!==o&&(n=t.maximize().region),(yc[n||""]||yc[o||""]||yc["".concat(o,"-001")]||yc["001"])[0]}var kc=new RegExp("^".concat(rc.source,"*")),wc=new RegExp("".concat(rc.source,"*$"));function Cc(t,e){return{start:t,end:e}}var Ec=!!String.prototype.startsWith&&"_a".startsWith("a",1),xc=!!String.fromCodePoint,Ac=!!Object.fromEntries,Sc=!!String.prototype.codePointAt,Tc=!!String.prototype.trimStart,Mc=!!String.prototype.trimEnd,zc=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Oc=!0;try{Oc="a"===(null===(_c=Dc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===_c?void 0:_c[0])}catch(ra){Oc=!1}var Ic,jc=Ec?function(t,e,n){return t.startsWith(e,n)}:function(t,e,n){return t.slice(n,n+e.length)===e},Pc=xc?String.fromCodePoint:function(){for(var t=[],e=0;er;){if((n=t[r++])>1114111)throw RangeError(n+" is not a valid code point");o+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return o},Nc=Ac?Object.fromEntries:function(t){for(var e={},n=0,o=t;n=n)){var o,i=t.charCodeAt(e);return i<55296||i>56319||e+1===n||(o=t.charCodeAt(e+1))<56320||o>57343?i:o-56320+(i-55296<<10)+65536}},Lc=Tc?function(t){return t.trimStart()}:function(t){return t.replace(kc,"")},Hc=Mc?function(t){return t.trimEnd()}:function(t){return t.replace(wc,"")};function Dc(t,e){return new RegExp(t,e)}if(Oc){var Rc=Dc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ic=function(t,e){var n;return Rc.lastIndex=e,null!==(n=Rc.exec(t)[1])&&void 0!==n?n:""}}else Ic=function(t,e){for(var n=[];;){var o=Bc(t,e);if(void 0===o||Gc(o)||Kc(o))break;n.push(o),e+=o>=65536?2:1}return Pc.apply(void 0,n)};var Uc,Vc=function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,n){for(var o=[];!this.isEOF();){var i=this.char();if(123===i){if((r=this.parseArgument(t,n)).err)return r;o.push(r.val)}else{if(125===i&&t>0)break;if(35!==i||"plural"!==e&&"selectordinal"!==e){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Ul.UNMATCHED_CLOSING_TAG,Cc(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&Fc(this.peek()||0)){if((r=this.parseTag(t,e)).err)return r;o.push(r.val)}else{var r;if((r=this.parseLiteral(t,e)).err)return r;o.push(r.val)}}else{var a=this.clonePosition();this.bump(),o.push({type:Vl.pound,location:Cc(a,this.clonePosition())})}}}return{val:o,err:null}},t.prototype.parseTag=function(t,e){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Vl.literal,value:"<".concat(o,"/>"),location:Cc(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;var r=i.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:Vl.tag,value:o,children:r,location:Cc(n,this.clonePosition())},err:null}:this.error(Ul.INVALID_TAG,Cc(a,this.clonePosition())))}return this.error(Ul.UNCLOSED_TAG,Cc(n,this.clonePosition()))}return this.error(Ul.INVALID_TAG,Cc(n,this.clonePosition()))},t.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&$c(this.char());)this.bump();return this.message.slice(t,this.offset())},t.prototype.parseLiteral=function(t,e){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(e);if(i)o+=i;else{var r=this.tryParseUnquoted(t,e);if(r)o+=r;else{var a=this.tryParseLeftAngleBracket();if(!a)break;o+=a}}}var s=Cc(n,this.clonePosition());return{val:{type:Vl.literal,value:o,location:s},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Fc(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},t.prototype.tryParseQuote=function(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(n);this.bump()}return Pc.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===e||"selectordinal"===e)||125===n&&t>0?null:(this.bump(),Pc(n))},t.prototype.parseArgument=function(t,e){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ul.EXPECT_ARGUMENT_CLOSING_BRACE,Cc(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(Ul.EMPTY_ARGUMENT,Cc(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(Ul.MALFORMED_ARGUMENT,Cc(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ul.EXPECT_ARGUMENT_CLOSING_BRACE,Cc(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Vl.argument,value:o,location:Cc(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ul.EXPECT_ARGUMENT_CLOSING_BRACE,Cc(n,this.clonePosition())):this.parseArgumentOptions(t,e,o,n);default:return this.error(Ul.MALFORMED_ARGUMENT,Cc(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=Ic(this.message,e),o=e+n.length;return this.bumpTo(o),{value:n,location:Cc(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,n,o){var i,r=this.clonePosition(),a=this.parseIdentifierIfPossible().value,s=this.clonePosition();switch(a){case"":return this.error(Ul.EXPECT_ARGUMENT_TYPE,Cc(r,s));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((g=this.parseSimpleArgStyleIfPossible()).err)return g;if(0===(p=Hc(g.val)).length)return this.error(Ul.EXPECT_ARGUMENT_STYLE,Cc(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Cc(c,this.clonePosition())}}if((_=this.tryParseArgumentClose(o)).err)return _;var u=Cc(o,this.clonePosition());if(l&&jc(null==l?void 0:l.style,"::",0)){var h=Lc(l.style.slice(2));if("number"===a)return(g=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?g:{val:{type:Vl.number,value:n,location:u,style:g.val},err:null};if(0===h.length)return this.error(Ul.EXPECT_DATE_TIME_SKELETON,u);var d=h;this.locale&&(d=function(t,e){for(var n="",o=0;o>1),l=bc(e);for("H"!=l&&"k"!=l||(s=0);s-- >0;)n+="a";for(;a-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(h,this.locale));var p={type:Fl.dateTime,pattern:d,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?sc(d):{}};return{val:{type:"date"===a?Vl.date:Vl.time,value:n,location:u,style:p},err:null}}return{val:{type:"number"===a?Vl.number:"date"===a?Vl.date:Vl.time,value:n,location:u,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var f=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ul.EXPECT_SELECT_ARGUMENT_OPTIONS,Cc(f,yr({},f)));this.bumpSpace();var m=this.parseIdentifierIfPossible(),v=0;if("select"!==a&&"offset"===m.value){if(!this.bumpIf(":"))return this.error(Ul.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Cc(this.clonePosition(),this.clonePosition()));var g;if(this.bumpSpace(),(g=this.tryParseDecimalInteger(Ul.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ul.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return g;this.bumpSpace(),m=this.parseIdentifierIfPossible(),v=g.val}var _,y=this.tryParsePluralOrSelectOptions(t,a,e,m);if(y.err)return y;if((_=this.tryParseArgumentClose(o)).err)return _;var b=Cc(o,this.clonePosition());return"select"===a?{val:{type:Vl.select,value:n,options:Nc(y.val),location:b},err:null}:{val:{type:Vl.plural,value:n,options:Nc(y.val),offset:v,pluralType:"plural"===a?"cardinal":"ordinal",location:b},err:null};default:return this.error(Ul.INVALID_ARGUMENT_TYPE,Cc(r,s))}},t.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(Ul.EXPECT_ARGUMENT_CLOSING_BRACE,Cc(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ul.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Cc(n,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var n=[];try{n=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=t.split(lc).filter((function(t){return t.length>0})),n=[],o=0,i=e;o=48&&a<=57))break;i=!0,r=10*r+(a-48),this.bump()}var s=Cc(o,this.clonePosition());return i?zc(r*=n)?{val:r,err:null}:this.error(e,s):this.error(t,s)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=Bc(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},t.prototype.bumpIf=function(t){if(jc(this.message,t,this.offset())){for(var e=0;e=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Gc(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),n=this.message.charCodeAt(e+(t>=65536?2:1));return null!=n?n:null},t}();function Fc(t){return t>=97&&t<=122||t>=65&&t<=90}function $c(t){return 45===t||46===t||t>=48&&t<=57||95===t||t>=97&&t<=122||t>=65&&t<=90||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Gc(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function Kc(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function Yc(t){t.forEach((function(t){if(delete t.location,Ql(t)||tc(t))for(var e in t.options)delete t.options[e].location,Yc(t.options[e].value);else Xl(t)&&oc(t.style)||(Zl(t)||Jl(t))&&ic(t.style)?delete t.style.location:nc(t)&&Yc(t.children)}))}function qc(t,e){void 0===e&&(e={}),e=yr({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new Vc(t,e).parse();if(n.err){var o=SyntaxError(Ul[n.err.kind]);throw o.location=n.err.location,o.originalMessage=n.err.message,o}return(null==e?void 0:e.captureLocation)||Yc(n.val),n.val}!function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"}(Uc||(Uc={}));var Wc,Xc=function(t){function e(e,n,o){var i=t.call(this,e)||this;return i.code=n,i.originalMessage=o,i}return _r(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),Zc=function(t){function e(e,n,o,i){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Uc.INVALID_VALUE,i)||this}return _r(e,t),e}(Xc),Jc=function(t){function e(e,n,o){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),Uc.INVALID_VALUE,o)||this}return _r(e,t),e}(Xc),Qc=function(t){function e(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),Uc.MISSING_VALUE,n)||this}return _r(e,t),e}(Xc);function tu(t){return"function"==typeof t}function eu(t,e,n,o,i,r,a){if(1===t.length&&ql(t[0]))return[{type:Wc.literal,value:t[0].value}];for(var s=[],l=0,c=t;l0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])}},t.__parse=qc,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}(),ru={not_found:"لم يتم العثور على الكيان"},au={card:{chips:{alignment:"محاذاة"},climate:{hvac_modes:"أوضاع HVAC",show_temperature_control:"التحكم في درجة الحرارة؟"},cover:{show_buttons_control:"أزرار التحكم؟",show_position_control:"التحكم في الموقع؟",show_tilt_position_control:"التحكم في الإمالة؟"},empty:{no_config_options:"لا تحتوي هذه البطاقة على خيارات التكوين."},fan:{show_direction_control:"التحكم بالإتجاه؟",show_oscillate_control:"التحكم في التذبذب؟",show_percentage_control:"التحكم في النسبة المئوية؟"},generic:{collapsible_controls:"تصغير عناصر التحكم عند الإيقاف",color:"اللون",content_info:"المحتوى",fill_container:"ملئ الحاوية",icon_animation:"تحريك الرمز عندما يكون نشطًا؟",icon_color:"لون الأيقونة",icon_type:"نوع الأيقونة",layout:"التخطيط",primary_info:"المعلومات الأساسية",secondary_info:"المعلومات الفرعية",use_entity_picture:"استخدم صورة الكيان؟"},humidifier:{show_target_humidity_control:"التحكم في الرطوبة؟?"},light:{incompatible_controls:"قد لا يتم عرض بعض عناصر التحكم إذا كان الضوء الخاص بك لا يدعم الميزة.",show_brightness_control:"التحكم في السطوع؟",show_color_control:"التحكم في اللون؟",show_color_temp_control:"التحكم في درجة حرارة اللون؟",use_light_color:"استخدم لون فاتح"},lock:{lock:"مقفل",open:"مفتوح",unlock:"إلغاء قفل"},"media-player":{media_controls:"التحكم في الوسائط",media_controls_list:{next:"التالي",on_off:"تشغيل/إيقاف",play_pause_stop:"تشغيل/إيقاف مؤقت/إيقاف",previous:"السابق",repeat:"وضع التكرار",shuffle:"خلط"},show_volume_level:"إظهار مستوى الصوت",use_media_artwork:"استخدم صورة الوسائط",use_media_info:"استخدم معلومات الوسائط",volume_controls:"التحكم في الصوت",volume_controls_list:{volume_buttons:"أزرار الصوت",volume_mute:"كتم",volume_set:"مستوى الصوت"}},number:{display_mode:"وضع العرض",display_mode_list:{buttons:"الأزرار",default:"الافتراضي(سحب)",slider:"سحب"}},template:{badge_color:"لون الشارة",badge_icon:"أيقونة الشارة",content:"المحتوى",entity_extra:"تستخدم في القوالب والإجراءات",label:"التسمية",multiline_secondary:"متعدد الأسطر الثانوية؟",picture:"صورة (ستحل محل الأيقونة)",primary:"المعلومات الأساسية",secondary:"المعلومات الثانوية"},title:{subtitle:"العنوان الفرعي",subtitle_tap_action:"إجراء النقر على العنوان الفرعي",title:"العنوان",title_tap_action:"إجراء النقر على العنوان"},update:{show_buttons_control:"أزرار التحكم؟"},vacuum:{commands:"الاوامر",commands_list:{on_off:"تشغيل/إيقاف"}},weather:{show_conditions:"الأحوال الجوية؟",show_temperature:"الطقس؟"}},chip:{"chip-picker":{add:"أضف رقاقة",chips:"رقاقات",clear:"مسح",edit:"تعديل",select:"اختر الرقاقة",types:{action:"إجراء","alarm-control-panel":"تنبيه",back:"رجوع",conditional:"مشروط",entity:"الكيان",light:"مظيء",menu:"القائمة",quickbar:"تبويب سريع",spacer:"مساحة",template:"قالب",weather:"الطقس"}},conditional:{chip:"رقاقة"},sub_element_editor:{title:"محرر الرقاقة"}},form:{alignment_picker:{values:{center:"توسيط",default:"المحاذاة الافتراضية",end:"نهاية",justify:"مساواة",start:"بداية"}},color_picker:{values:{default:"اللون الإفتراضي"}},icon_type_picker:{values:{default:"النوع افتراضي","entity-picture":"صورة الكيان",icon:"أيقونة",none:"لا شئ"}},info_picker:{values:{default:"المعلومات الافتراضية","last-changed":"آخر تغيير","last-updated":"آخر تحديث",name:"الإسم",none:"لا شئ",state:"الحالة"}},layout_picker:{values:{default:"تخطيط افتراضي",horizontal:"تخطيط أفقي",vertical:"تخطيط رأسي"}}}},su={card:ru,editor:au},lu=Object.freeze({__proto__:null,card:ru,default:su,editor:au}),cu={card:{chips:{alignment:"Подравняване"},climate:{hvac_modes:"HVAC Режими",show_temperature_control:"Контрол на температурата?"},cover:{show_buttons_control:"Контролни бутони?",show_position_control:"Контрол на позицията?",show_tilt_position_control:"Контрол на наклона?"},fan:{show_oscillate_control:"Контрол на трептенето?",show_percentage_control:"Процентов контрол?"},generic:{collapsible_controls:"Свий контролите при изключен",content_info:"Съдържание",fill_container:"Изпълване на контейнера",icon_animation:"Анимирай иконата при активен?",icon_color:"Цвят на икона",icon_type:"Тип на икона",layout:"Оформление",primary_info:"Първостепенна информация",secondary_info:"Второстепенна информация",use_entity_picture:"Използвай снимката на обекта?"},humidifier:{show_target_humidity_control:"Контрол на влажността?"},light:{incompatible_controls:"Някои опции могат да бъдат скрити при условие че осветителното тяло не поддържа фунцията.",show_brightness_control:"Контрол на яркостта?",show_color_control:"Контрол на цвета?",show_color_temp_control:"Контрол на температурата?",use_light_color:"Използвай цвета на светлината"},lock:{lock:"Заключен",open:"Отворен",unlock:"Отключен"},"media-player":{media_controls:"Контрол на Медиата",media_controls_list:{next:"Следващ",on_off:"Вкл./Изкл.",play_pause_stop:"Пусни/пауза/стоп",previous:"Предишен",repeat:"Повтаряне",shuffle:"Разбъркано"},show_volume_level:"Покажи контрола за звук",use_media_artwork:"Използвай визуалните детайли от медията",use_media_info:"Използвай информация от медията",volume_controls:"Контрол на звука",volume_controls_list:{volume_buttons:"Бутони за звук",volume_mute:"Заглуши",volume_set:"Ниво на звука"}},template:{badge_color:"Цвят на значка",badge_icon:"Икона на значка",content:"Съдържание",entity_extra:"Използван в шаблони и действия",multiline_secondary:"Много-редова второстепенна информация?",picture:"Картина (ще замени иконата)",primary:"Първостепенна информация",secondary:"Второстепенна информация"},title:{subtitle:"Подзаглавие",title:"Заглавие"},update:{show_buttons_control:"Контролни бутони?"},vacuum:{commands:"Конади",commands_list:{on_off:"Вкл./Изкл."}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добави чип",chips:"Чипове",clear:"Изчисти",edit:"Редактирай",select:"Избери чип",types:{action:"Действия","alarm-control-panel":"Аларма",back:"Назад",conditional:"Условни",entity:"Обект",light:"Осветление",menu:"Меню",template:"Шаблон",weather:"Време"}},conditional:{chip:"Чип"},sub_element_editor:{title:"Чип редактор"}},form:{alignment_picker:{values:{center:"Център",default:"Основно подравняване",end:"Край",justify:"Подравнен",start:"Старт"}},color_picker:{values:{default:"Основен цвят"}},icon_type_picker:{values:{default:"Основен тип","entity-picture":"Картина на обекта",icon:"Икона",none:"Липсва"}},info_picker:{values:{default:"Основна информация","last-changed":"Последно Променен","last-updated":"Последно Актуализиран",name:"Име",none:"Липсва",state:"Състояние"}},layout_picker:{values:{default:"Основно оформление",horizontal:"Хоризонтално оформление",vertical:"Вертикално оформление"}}}},uu={editor:cu},hu=Object.freeze({__proto__:null,default:uu,editor:cu}),du={not_found:"No s'ha trobat l'entitat"},pu={card:{chips:{alignment:"Alineació"},climate:{hvac_modes:"Modes HVAC",show_temperature_control:"Control de temperatura?"},cover:{show_buttons_control:"Botons de control?",show_position_control:"Control de posició?",show_tilt_position_control:"Control d'inclinació?"},fan:{show_oscillate_control:"Control d'oscil·lació?",show_percentage_control:"Control de percentatge?"},generic:{collapsible_controls:"Amaga els controls en desactivar",color:"Color",content_info:"Contingut",fill_container:"Emplena el contenidor",icon_animation:"Animar icona en activar?",icon_color:"Color d'icona",icon_type:"Tipus d'icona",layout:"Distribució",primary_info:"Informació primaria",secondary_info:"Informació secundaria",use_entity_picture:"Fer servir la imatge de l'entitat?"},humidifier:{show_target_humidity_control:"Control d'humitat?"},light:{incompatible_controls:"Alguns controls no es mostraran si l'entitat no suporta eixa funció.",show_brightness_control:"Control de brillantor?",show_color_control:"Control de color?",show_color_temp_control:"Control de la temperatura del color?",use_light_color:"Fes servir el color del llum"},lock:{lock:"Bloqueja",open:"Obri",unlock:"Desbloqueja"},"media-player":{media_controls:"Controls multimèdia",media_controls_list:{next:"Pista següent",on_off:"Engegar/Apagar",play_pause_stop:"Reproduïr/Pausar/Detindre",previous:"Pista anterior",repeat:"Mode de repetició",shuffle:"Mesclar"},show_volume_level:"Mostra el nivell de volum",use_media_artwork:"Fes servir l'art multimèdia",use_media_info:"Empra la informació multimèdia",volume_controls:"Controls de volum",volume_controls_list:{volume_buttons:"Botons de volum",volume_mute:"Silenci",volume_set:"Nivell de volum"}},number:{display_mode:"Mode de visualització",display_mode_list:{buttons:"Botons",default:"Per defecte (lliscant)",slider:"Lliscant"}},template:{badge_color:"Color de la insígnia",badge_icon:"Icona de la insígnia",content:"Contingut",entity_extra:"Utilitzats en plantilles i accions",label:"Etiqueta",multiline_secondary:"Secundaria en varies línies?",picture:"Imatge (reemplaçarà la icona)",primary:"Informació primaria",secondary:"Informació secundaria"},title:{subtitle:"Subtítol",subtitle_tap_action:"Acció en tocar el subtítol",title:"Títol",title_tap_action:"Acció en tocar el títol"},update:{show_buttons_control:"Botons de control?"},vacuum:{commands:"Comandaments",commands_list:{on_off:"Engegar/Apagar"}},weather:{show_conditions:"Condicions?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Afegir xip",chips:"Xips",clear:"Buidar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acció","alarm-control-panel":"Alarma",back:"Tornar",conditional:"Condicional",entity:"Entitat",light:"Llum",menu:"Menú",spacer:"Espai",template:"Plantilla",weather:"Oratge"}},conditional:{chip:"Xip"},sub_element_editor:{title:"Editor de xips"}},form:{alignment_picker:{values:{center:"Centre",default:"Alineació per defecte",end:"Final",justify:"Justifica",start:"Inici"}},color_picker:{values:{default:"Color per defecte"}},icon_type_picker:{values:{default:"Tipus per defecte","entity-picture":"Entitat d'imatge",icon:"Icona",none:"Cap"}},info_picker:{values:{default:"Informació per defecte","last-changed":"Últim Canvi","last-updated":"Última Actualització",name:"Nom",none:"Cap",state:"Estat"}},layout_picker:{values:{default:"Distribució per defecte",horizontal:"Distribució horitzontal",vertical:"Distribució vertical"}}}},fu={card:du,editor:pu},mu=Object.freeze({__proto__:null,card:du,default:fu,editor:pu}),vu={not_found:"Entita nebyla nalezena"},gu={card:{chips:{alignment:"Zarovnání"},climate:{hvac_modes:"Režimy HVAC",show_temperature_control:"Ovládání teploty?"},cover:{show_buttons_control:"Zobrazit ovládací tlačítka?",show_position_control:"Zobrazit ovládání polohy?",show_tilt_position_control:"Zobrazit ovládání náklonu?"},fan:{show_oscillate_control:"Ovládání oscilaceM",show_percentage_control:"Ovládání v procentech?"},generic:{collapsible_controls:"Pokud je vypnuto, skrýt ovládací prvky",content_info:"Obsah",fill_container:"Vyplnit prostor",icon_animation:"Pokud je aktivní, animovat ikonu?",icon_color:"Barva ikony",icon_type:"Typ ikony",layout:"Rozložení",primary_info:"Primární informace",secondary_info:"Sekundární informace",use_entity_picture:"Použít ikonu entity?"},humidifier:{show_target_humidity_control:"Ovládání vlhkosti?"},light:{incompatible_controls:"Některé ovládací prvky se nemusí zobrazit, pokud vaše světlo tuto funkci nepodporuje.",show_brightness_control:"Ovládání jasu?",show_color_control:"Ovládání barvy světla?",show_color_temp_control:"Ovládání teploty světla?",use_light_color:"Ikona podle barvy světla?"},lock:{lock:"Zamčeno",open:"Otevřeno",unlock:"Odemčeno"},"media-player":{media_controls:"Ovládání médií",media_controls_list:{next:"Další stopa",on_off:"Zapnout/Vypnout",play_pause_stop:"Přehrát/Pauza/Zastavit",previous:"Předchozí stopa",repeat:"Režim opakování",shuffle:"Zamíchat"},show_volume_level:"Zobrazit úroveň hlasitosti",use_media_artwork:"Použít artwork z média",use_media_info:"Použít informace z média",volume_controls:"Ovládání hlasitosti",volume_controls_list:{volume_buttons:"Tlačítka hlasitosti",volume_mute:"Ztlumit",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazení",display_mode_list:{buttons:"Tlačítka",default:"Výchozí (posuvník)",slider:"Posuvník"}},template:{badge_color:"Barva odznaku",badge_icon:"Ikona odznaku",content:"Obsah",entity_extra:"Použito v šablonách a akcích",multiline_secondary:"Víceřádková sekundární informace?",picture:"Obrázek (nahradí ikonu)",primary:"Primární informace",secondary:"Sekundární informace"},title:{subtitle:"Popis",subtitle_tap_action:"Akce při klepnutí na popis",title:"Nadpis",title_tap_action:"Akce při klepnutí na nadpis"},update:{show_buttons_control:"Zobrazit ovládací tlačítka?"},vacuum:{commands:"Příkazy",commands_list:{on_off:"Zapnout/Vypnout"}},weather:{show_conditions:"Zobrazit podmínky?",show_temperature:"Zobrazit teplotu?"}},chip:{"chip-picker":{add:"Přidat tlačítko",chips:"Tlačítka",clear:"Vymazat",edit:"Upravit",select:"Vybrat tlačítko",types:{action:"Akce","alarm-control-panel":"Alarm",back:"Zpět",conditional:"Podmínka",entity:"Entita",light:"Světlo",menu:"Menu",spacer:"Mezera",template:"Šablona",weather:"Počasí"}},conditional:{chip:"Tlačítko"},sub_element_editor:{title:"Editor tlačítek"}},form:{alignment_picker:{values:{center:"Na střed",default:"Výchozí zarovnání",end:"Na konec",justify:"Do bloku",start:"Na začátek"}},color_picker:{values:{default:"Výchozí barva"}},icon_type_picker:{values:{default:"Výchozí typ","entity-picture":"Ikona entity",icon:"Ikona",none:"Nic"}},info_picker:{values:{default:"Výchozí informace","last-changed":"Poslední změna","last-updated":"Poslední aktualizace",name:"Název",none:"Nic",state:"Stav"}},layout_picker:{values:{default:"Výchozí rozložení",horizontal:"Vodorovné rozložení",vertical:"Svislé rozložení"}}}},_u={card:vu,editor:gu},yu=Object.freeze({__proto__:null,card:vu,default:_u,editor:gu}),bu={not_found:"Enhed ikke fundet"},ku={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-tilstande",show_temperature_control:"Temperaturkontrol?"},cover:{show_buttons_control:"Betjeningsknapper?",show_position_control:"Positionskontrol?",show_tilt_position_control:"Tiltkontrol?"},fan:{show_oscillate_control:"Oscillationskontrol?",show_percentage_control:"Procentkontrol?"},generic:{collapsible_controls:"Skjul kontroller når slukket",color:"Farve",content_info:"Indhold",fill_container:"Fyld container",icon_animation:"Animér ikon når aktiv?",icon_color:"Ikon farve",icon_type:"Ikon type",layout:"Layout",primary_info:"Primær information",secondary_info:"Sekundær information",use_entity_picture:"Brug enhedsbillede?"},humidifier:{show_target_humidity_control:"Luftfugtighedskontrol?"},light:{incompatible_controls:"Nogle kontroller vises muligvis ikke, hvis dit lys ikke understøtter funktionen.",show_brightness_control:"Lysstyrkekontrol?",show_color_control:"Farvekontrol?",show_color_temp_control:"Temperaturfarvekontrol?",use_light_color:"Brug lysfarve"},lock:{lock:"Lås",open:"Åben",unlock:"Lås op"},"media-player":{media_controls:"Mediekontrol",media_controls_list:{next:"Næste nummer",on_off:"Tænd/Sluk",play_pause_stop:"Afspil/Pause/Stop",previous:"Forrige nummer",repeat:"Gentagelsestilstand",shuffle:"Bland"},show_volume_level:"Vis lydstyrke",use_media_artwork:"Brug mediebilleder",use_media_info:"Brug medieinformation",volume_controls:"Lydstyrkekontrol",volume_controls_list:{volume_buttons:"Lydstyrkeknapper",volume_mute:"Lydløs",volume_set:"Lydstyrke"}},number:{display_mode:"Visningstilstand",display_mode_list:{buttons:"Knapper",default:"Standard (slider)",slider:"Slider"}},template:{badge_color:"Badge farve",badge_icon:"Badge ikon",content:"Indhold",entity_extra:"Anvendes i skabeloner og handlinger",label:"Label",multiline_secondary:"Multi-linje sekundær?",picture:"Billede (erstatter ikonet)",primary:"Primær information",secondary:"Sekundær information"},title:{subtitle:"Undertitel",subtitle_tap_action:"Undertitel tryk handling",title:"Titel",title_tap_action:"Title tryk handling"},update:{show_buttons_control:"Betjeningsknapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå til/fra"}},weather:{show_conditions:"Vejrforhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Tilføj chip",chips:"Chips",clear:"Nulstil",edit:"Rediger",select:"Vælg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbage",conditional:"Betinget",entity:"Enhed",light:"Lys",menu:"Menu",spacer:"Afstand",template:"Skabelon",weather:"Vejr"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Centrer",default:"Standard justering",end:"Slut",justify:"Lige margener",start:"Start"}},color_picker:{values:{default:"Standardfarve"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhedsbillede",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard information","last-changed":"Sidst ændret","last-updated":"Sidst opdateret",name:"Navn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard layout",horizontal:"Horisontal layout",vertical:"Vertikal layout"}}}},wu={card:bu,editor:ku},Cu=Object.freeze({__proto__:null,card:bu,default:wu,editor:ku}),Eu={not_found:"Entität nicht gefunden"},xu={card:{chips:{alignment:"Ausrichtung"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatursteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?",show_tilt_position_control:"Winkelsteuerung?"},empty:{no_config_options:"Diese Karte hat keine Optionen."},fan:{show_direction_control:"Richtungssteuerung?",show_oscillate_control:"Oszillationssteuerung?",show_percentage_control:"Prozentuale Kontrolle?"},generic:{collapsible_controls:"Schieberegler einklappen, wenn aus",color:"Farbe",content_info:"Inhalt",fill_container:"Container ausfüllen",icon_animation:"Icon animieren, wenn aktiv?",icon_color:"Icon-Farbe",icon_type:"Icon-Typ",layout:"Layout",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",use_entity_picture:"Entitätsbild verwenden?"},humidifier:{show_target_humidity_control:"Luftfeuchtigkeitssteuerung?"},light:{incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt.",show_brightness_control:"Helligkeitsregelung?",show_color_control:"Farbsteuerung?",show_color_temp_control:"Farbtemperatursteuerung?",use_light_color:"Farbsteuerung verwenden"},lock:{lock:"Verriegeln",open:"Öffnen",unlock:"Entriegeln"},"media-player":{media_controls:"Mediensteuerung",media_controls_list:{next:"Nächster Titel",on_off:"Ein/Aus",play_pause_stop:"Play/Pause/Stop",previous:"Vorheriger Titel",repeat:"Wiederholen",shuffle:"Zufällige Wiedergabe"},show_volume_level:"Lautstärke-Level anzeigen",use_media_artwork:"Mediengrafik verwenden",use_media_info:"Medieninfos verwenden",volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke-Buttons",volume_mute:"Stumm",volume_set:"Lautstärke-Level"}},number:{display_mode:"Anzeigemodus",display_mode_list:{buttons:"Buttons",default:"Standard (Schieberegler)",slider:"Schieberegler"}},template:{badge_color:"Badge-Farbe",badge_icon:"Badge-Icon",content:"Inhalt",entity_extra:"Wird in Vorlagen und Aktionen verwendet",label:"Beschriftung",multiline_secondary:"Mehrzeilig sekundär?",picture:"Bild (ersetzt das Icon)",primary:"Primäre Information",secondary:"Sekundäre Information"},title:{subtitle:"Untertitel",subtitle_tap_action:"Untertitel Tipp-Aktion",title:"Titel",title_tap_action:"Titel Tipp-Aktion"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle",commands_list:{on_off:"An/Ausschalten"}},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Chip hinzufügen",chips:"Chips",clear:"Löschen",edit:"Editieren",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",quickbar:"Quickbar",spacer:"Abstand",template:"Vorlage",weather:"Wetter"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip Editor"}},form:{alignment_picker:{values:{center:"Mitte",default:"Standard",end:"Ende",justify:"Ausrichten",start:"Anfang"}},color_picker:{values:{default:"Standardfarbe"}},icon_type_picker:{values:{default:"Standard-Typ","entity-picture":"Entitätsbild",icon:"Icon",none:"Keines"}},info_picker:{values:{default:"Standard-Information","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",name:"Name",none:"Keine",state:"Zustand"}},layout_picker:{values:{default:"Standard-Layout",horizontal:"Horizontales Layout",vertical:"Vertikales Layout"}}}},Au={card:Eu,editor:xu},Su=Object.freeze({__proto__:null,card:Eu,default:Au,editor:xu}),Tu={card:{chips:{alignment:"Ευθυγράμμιση"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},fan:{show_oscillate_control:"Έλεγχος ταλάντωσης;",show_percentage_control:"Έλεγχος ποσοστού;"},generic:{content_info:"Περιεχόμενο",icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;",icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",use_entity_picture:"Χρήση εικόνας οντότητας;"},light:{incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία.",show_brightness_control:"Έλεγχος φωτεινότητας;",show_color_control:"Έλεγχος χρώματος;",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",use_light_color:"Χρήση χρώματος φωτος"},"media-player":{media_controls:"Έλεγχος πολυμέσων",media_controls_list:{next:"Επόμενο κομμάτι",on_off:"Ενεργοποίηση/απενεργοποίηση",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",previous:"Προηγούμενο κομμάτι",repeat:"Λειτουργία επανάληψης",shuffle:"Τυχαία σειρά"},use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",use_media_info:"Χρήση πληροφοριών πολυμέσων",volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_mute:"Σίγαση",volume_set:"Επίπεδο έντασης ήχου"}},template:{content:"Περιεχόμενο",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες"},title:{subtitle:"Υπότιτλος",title:"Τίτλος"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"}},chip:{"chip-picker":{add:"Προσθήκη chip",chips:"Chips",clear:"Καθαρισμός",edit:"Επεξεργασία",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Επεξεργαστής Chip"}},form:{alignment_picker:{values:{center:"Στοίχιση στο κέντρο",default:"Προεπιλεγμένη στοίχιση",end:"Στοίχιση δεξιά",justify:"Πλήρης στοίχιση",start:"Στοίχιση αριστερά"}},color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",name:"Όνομα",none:"Τίποτα",state:"Κατάσταση"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",horizontal:"Οριζόντια διάταξη",vertical:"Κάθετη διάταξη"}}}},Mu={editor:Tu},zu=Object.freeze({__proto__:null,default:Mu,editor:Tu}),Ou={not_found:"Entity not found"},Iu={section:{context:"Context",content:"Content",features:"Features",interactions:"Interactions",layout:"Layout",badge:"Badge"},card:{chips:{alignment:"Alignment"},climate:{hvac_modes:"HVAC Modes",show_temperature_control:"Temperature control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?",show_tilt_position_control:"Tilt control?"},empty:{no_config_options:"This card has no config options."},fan:{show_direction_control:"Direction control?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Percentage control?"},generic:{entity:"Entity",area:"Area",color:"Color",content_info:"Content",fill_container:"Fill container",icon_animation:"Animate icon when active?",icon_color:"Icon color",icon_type:"Icon type",layout:"Layout",primary_info:"Primary information",secondary_info:"Secondary information",use_entity_picture:"Use entity picture?",collapsible_controls:"Collapse controls when off",picture:"Picture",picture_helper:"If set, it will replace the icon."},humidifier:{show_target_humidity_control:"Humidity control?"},light:{incompatible_controls:"Some controls may not be displayed if your light does not support the feature.",show_brightness_control:"Brightness control?",show_color_control:"Color control?",show_color_temp_control:"Color temperature control?",use_light_color:"Use light color"},lock:{lock:"Lock",open:"Open",unlock:"Unlock"},"media-player":{media_controls:"Media controls",media_controls_list:{next:"Next track",on_off:"Turn on/off",play_pause_stop:"Play/pause/stop",previous:"Previous track",repeat:"Repeat mode",shuffle:"Shuffle"},show_volume_level:"Show volume level",use_media_artwork:"Use media artwork",use_media_info:"Use media info",volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_mute:"Mute",volume_set:"Volume level"}},number:{display_mode:"Display Mode",display_mode_list:{buttons:"Buttons",default:"Default (slider)",slider:"Slider"}},template:{area_helper:"Used in templates and features",area:"Area",badge_color:"Badge color",badge_icon:"Badge icon",badge_text_helper:"If set, it will replace the icon.",badge_text:"Badge text",badge:"Badge",content:"Content",entity_helper:"Used in templates, interactions and features",entity_helper_legacy:"Used in templates and interactions",label:"Label",layout:"Layout",multiline_secondary_helper:"The card may be taller to fit the text and will not always align with the grid system.",multiline_secondary:"Allow multiline secondary information",primary:"Primary information",secondary:"Secondary information"},title:{alignment:"Alignment",subtitle:"Subtitle",subtitle_tap_action:"Subtitle tap action",title:"Title",title_tap_action:"Title tap action"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands",commands_list:{on_off:"Turn on/off"}},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"}},badge:{template:{label:"Label",content:"Content",entity_helper:"Used in templates and interactions",area_helper:"Used in templates"}},chip:{"chip-picker":{add:"Add chip",chips:"Chips",clear:"Clear",edit:"Edit",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",quickbar:"Quickbar",spacer:"Spacer",template:"Template",weather:"Weather"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip editor"}},form:{alignment_picker:{values:{center:"Center",default:"Default alignment",end:"End",justify:"Justify",start:"Start"}},color_picker:{values:{default:"Default color"}},icon_type_picker:{values:{default:"Default type","entity-picture":"Entity picture",icon:"Icon",none:"None"}},info_picker:{values:{default:"Default information","last-changed":"Last Changed","last-updated":"Last Updated",name:"Name",none:"None",state:"State"}},layout_picker:{values:{default:"Default layout",horizontal:"Horizontal layout",vertical:"Vertical layout"}}}},ju={title:"Card updated",description:"Your card’s configuration has been migrated to the new version. You can find more information about the changes in {link}.",post:"the GitHub post",revert:"Revert",ok:"Ok"},Pu={card:Ou,editor:Iu,migration:ju},Nu=Object.freeze({__proto__:null,card:Ou,default:Pu,editor:Iu,migration:ju}),Bu={not_found:"Entidad no encontrada"},Lu={card:{chips:{alignment:"Alineación"},climate:{hvac_modes:"Modos de climatización",show_temperature_control:"¿Control de temperatura?"},cover:{show_buttons_control:"¿Botones de control?",show_position_control:"¿Control de posición?",show_tilt_position_control:"¿Control de inclinación?"},empty:{no_config_options:"Esta carta no tiene opciones de config."},fan:{show_direction_control:"¿Control de dirección?",show_oscillate_control:"¿Controlar oscilación?",show_percentage_control:"¿Controlar porcentaje?"},generic:{collapsible_controls:"Contraer controles cuando está apagado",color:"Color",content_info:"Contenido",fill_container:"Rellenar",icon_animation:"¿Icono animado cuando está activo?",icon_color:"Color de icono",icon_type:"Tipo de icono",layout:"Diseño",primary_info:"Información primaria",secondary_info:"Información secundaria",use_entity_picture:"¿Usar imagen de entidad?"},humidifier:{show_target_humidity_control:"¿Controlar humedad?"},light:{incompatible_controls:"Es posible que algunos controles no se muestren si la luz no es compatible con esta función.",show_brightness_control:"¿Controlar brillo?",show_color_control:"¿Controlar color?",show_color_temp_control:"¿Controlar temperatura del color?",use_light_color:"Usar color de la luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles multimedia",media_controls_list:{next:"Pista siguiente",on_off:"Activar/desactivar",play_pause_stop:"Reproducir/pausa/parar",previous:"Pista anterior",repeat:"Modo de repetición",shuffle:"Aleatoria"},show_volume_level:"Mostrar nivel de volumen",use_media_artwork:"Usar ilustraciones multimedia",use_media_info:"Usar información multimedia",volume_controls:"Controles de volumen",volume_controls_list:{volume_buttons:"Botones de volumen",volume_mute:"Silenciar",volume_set:"Nivel de volumen"}},number:{display_mode:"Modo de visualización",display_mode_list:{buttons:"Botones",default:"Por defecto (deslizante)",slider:"Control deslizante"}},template:{badge_color:"Color del distintivo",badge_icon:"Icono del distintivo",content:"Contenido",entity_extra:"Utilizado en plantillas y acciones",label:"Etiqueta",multiline_secondary:"¿Secundaria multilínea?",picture:"Imagen (sustituirá al icono)",primary:"Información primaria",secondary:"Información secundaria"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Acción al tocar el subtítulo",title:"Título",title_tap_action:"Acción al tocar el título"},update:{show_buttons_control:"¿Botones de control?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Activar/desactivar"}},weather:{show_conditions:"¿Condiciones?",show_temperature:"¿Temperatura?"}},chip:{"chip-picker":{add:"Añadir chip",chips:"Chips",clear:"Limpiar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acción","alarm-control-panel":"Alarma",back:"Volver",conditional:"Condicional",entity:"Entidad",light:"Luz",menu:"Menú",spacer:"Espaciador",template:"Plantilla",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alineación predeterminada",end:"Final",justify:"Justificado",start:"Inicio"}},color_picker:{values:{default:"Color predeterminado"}},icon_type_picker:{values:{default:"Por defecto","entity-picture":"Imagen de entidad",icon:"Icono",none:"Ninguno"}},info_picker:{values:{default:"Información predeterminada","last-changed":"Último cambio","last-updated":"Última actualización",name:"Nombre",none:"Ninguno",state:"Estado"}},layout_picker:{values:{default:"Diseño predeterminado",horizontal:"Diseño horizontal",vertical:"Diseño vertical"}}}},Hu={card:Bu,editor:Lu},Du=Object.freeze({__proto__:null,card:Bu,default:Hu,editor:Lu}),Ru={not_found:"Entiteettiä ei löytynyt"},Uu={card:{chips:{alignment:"Asettelu"},climate:{hvac_modes:"HVAC-tilat",show_temperature_control:"Lämpötilan säätö?"},cover:{show_buttons_control:"Toimintopainikkeet?",show_position_control:"Sijainnin hallinta?",show_tilt_position_control:"Kallistuksen säätö?"},fan:{show_oscillate_control:"Oskillaation säätö?",show_percentage_control:"Prosentuaalinen säätö?"},generic:{collapsible_controls:"Supista säätimet ollessa pois-tilassa",color:"Väri",content_info:"Sisältö",fill_container:"Täytä alue",icon_animation:"Animoi kuvake, kun aktiivinen?",icon_color:"Ikonin väri",icon_type:"Kuvakkeen tyyppi",layout:"Asettelu",primary_info:"Ensisijaiset tiedot",secondary_info:"Toissijaiset tiedot",use_entity_picture:"Käytä kohteen kuvaa?"},humidifier:{show_target_humidity_control:"Kosteudenhallinta?"},light:{incompatible_controls:"Jotkin toiminnot eivät näy, jos valaisimesi ei tue niitä.",show_brightness_control:"Kirkkauden säätö?",show_color_control:"Värin säätö?",show_color_temp_control:"Värilämpötilan säätö?",use_light_color:"Käytä valaisimen väriä"},lock:{lock:"Lukitse",open:"Avaa",unlock:"Poista lukitus"},"media-player":{media_controls:"Toiminnot",media_controls_list:{next:"Seuraava kappale",on_off:"Päälle/pois",play_pause_stop:"Toista/keskeytä/pysäytä",previous:"Edellinen kappale",repeat:"Jatkuva toisto",shuffle:"Sekoita"},show_volume_level:"Näytä äänenvoimakkuuden hallinta",use_media_artwork:"Käytä median kuvituksia",use_media_info:"Käytä median tietoja",volume_controls:"Äänenvoimakkuuden hallinta",volume_controls_list:{volume_buttons:"Äänenvoimakkuuspainikkeet",volume_mute:"Mykistä",volume_set:"Äänenvoimakkuus"}},number:{display_mode:"Näyttötila",display_mode_list:{buttons:"Painikkeet",default:"Oletus (liukusäädin)",slider:"Liukusäädin"}},template:{badge_color:"Merkin väri",badge_icon:"Merkin kuvake",content:"Sisältö",entity_extra:"Käytetään malleissa ja toiminnoissa",label:"Nimiö",multiline_secondary:"Monirivinen toissijainen tieto?",picture:"Kuva (korvaa kuvakkeen)",primary:"Ensisijaiset tiedot",secondary:"Toissijaiset tiedot"},title:{subtitle:"Tekstitys",subtitle_tap_action:"Alaotsikon napautustoiminto",title:"Otsikko",title_tap_action:"Otsikkonapautustoiminto"},update:{show_buttons_control:"Toimintopainikkeet?"},vacuum:{commands:"Komennot",commands_list:{on_off:"Kytke päälle/pois"}},weather:{show_conditions:"Ehdot?",show_temperature:"Lämpötila?"}},chip:{"chip-picker":{add:"Lisää merkki",chips:"Merkit",clear:"Tyhjennä",edit:"Muokkaa",select:"Valitse merkki",types:{action:"Toiminto","alarm-control-panel":"Hälytys",back:"Takaisin",conditional:"Ehdollinen",entity:"Kohde",light:"Valaisin",menu:"Valikko",spacer:"Välikappale",template:"Malli",weather:"Sää"}},conditional:{chip:"Merkki"},sub_element_editor:{title:"Merkkieditori"}},form:{alignment_picker:{values:{center:"Keskitä",default:"Keskitys",end:"Loppu",justify:"Sovita",start:"Alku"}},color_picker:{values:{default:"Oletusväri"}},icon_type_picker:{values:{default:"Oletustyyppi","entity-picture":"Kohteen kuva",icon:"Kuvake",none:"Ei mitään"}},info_picker:{values:{default:"Oletustiedot","last-changed":"Viimeksi muuttunut","last-updated":"Viimeksi päivittynyt",name:"Nimi",none:"Ei mitään",state:"Tila"}},layout_picker:{values:{default:"Oletusasettelu",horizontal:"Vaakasuuntainen",vertical:"Pystysuuntainen"}}}},Vu={card:Ru,editor:Uu},Fu=Object.freeze({__proto__:null,card:Ru,default:Vu,editor:Uu}),$u={not_found:"Entité inconnue"},Gu={badge:{template:{area_helper:"Utilisée dans les modèles",content:"Contenu",entity_helper:"Utilisée dans les modèles et les interactions",label:"Libellé"}},card:{chips:{alignment:"Alignement"},climate:{hvac_modes:"Modes du thermostat",show_temperature_control:"Contrôle de la température ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?",show_tilt_position_control:"Contrôle de l'inclinaison ?"},empty:{no_config_options:"Cette carte n'a pas de paramètres."},fan:{show_direction_control:"Contrôle de la direction ?",show_oscillate_control:"Contrôle de l'oscillation ?",show_percentage_control:"Contrôle de la vitesse ?"},generic:{area:"Pièce",collapsible_controls:"Reduire les contrôles quand éteint",color:"Couleur",content_info:"Contenu",entity:"Entité",fill_container:"Remplir le conteneur",icon_animation:"Animation de l'icône ?",icon_color:"Couleur de l'icône",icon_type:"Type d'icône",layout:"Disposition",picture:"Image",picture_helper:"Si définie, elle remplacera l'icône.",primary_info:"Information principale",secondary_info:"Information secondaire",use_entity_picture:"Utiliser l'image de l'entité ?"},humidifier:{show_target_humidity_control:"Contrôle d'humidité ?"},light:{incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité.",show_brightness_control:"Contrôle de luminosité ?",show_color_control:"Contrôle de la couleur ?",show_color_temp_control:"Contrôle de la température ?",use_light_color:"Utiliser la couleur de la lumière"},lock:{lock:"Verrouiller",open:"Ouvrir",unlock:"Déverrouiller"},"media-player":{media_controls:"Contrôles du media",media_controls_list:{next:"Suivant",on_off:"Allumer/Éteindre",play_pause_stop:"Lecture/pause/stop",previous:"Précédent",repeat:"Mode de répétition",shuffle:"Lecture aléatoire"},show_volume_level:"Afficher le niveau de volume",use_media_artwork:"Utiliser l'illustration du media",use_media_info:"Utiliser les informations du media",volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_mute:"Muet",volume_set:"Niveau de volume"}},number:{display_mode:"Mode d'affichage",display_mode_list:{buttons:"Boutons",default:"Par défaut (Curseur)",slider:"Curseur"}},template:{area:"Pièce",area_helper:"Utilisée dans les modèles et les fonctionnalités",badge:"Badge",badge_color:"Couleur du badge",badge_icon:"Icône du badge",badge_text:"Texte du badge",badge_text_helper:"Si définie, elle remplacera l'icône.",content:"Contenu",entity_extra:"Utilisée pour les modèles et les actions",entity_helper:"Utilisée dans les modèles, les interactions et les fonctionnalités",entity_helper_legacy:"Utilisé dans les modèles et les interactions",label:"Libellé",layout:"Disposition",multiline_secondary:"Autoriser les informations secondaires sur plusieurs lignes",multiline_secondary_helper:"La carte peut être plus haute pour s'adapter au texte et ne s'alignera pas toujours avec le système de grille.",picture:"Image (remplacera l'icône)",primary:"Information principale",secondary:"Information secondaire"},title:{subtitle:"Sous-titre",subtitle_tap_action:"Appui sur le sous-titre",title:"Titre",title_tap_action:"Appui sur le titre"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes",commands_list:{on_off:"Allumer/Éteindre"}},weather:{show_conditions:"Conditions ?",show_conditons:"Conditions ?",show_temperature:"Température ?"}},chip:{"chip-picker":{add:'Ajouter une "chip"',chips:'"Chips"',clear:"Effacer",edit:"Modifier",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",quickbar:"Barre d'accès rapide",spacer:"Espacement",template:"Modèle",weather:"Météo"}},conditional:{chip:"Chip"},sub_element_editor:{title:'Éditeur de "chip"'}},form:{alignment_picker:{values:{center:"Centré",default:"Alignement par défaut",end:"Fin",justify:"Justifié",start:"Début"}},color_picker:{values:{default:"Couleur par défaut"}},icon_type_picker:{values:{default:"Type par défaut","entity-picture":"Image de l'entité",icon:"Icône",none:"Aucune"}},info_picker:{values:{default:"Information par défaut","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",name:"Nom",none:"Aucune",state:"État"}},layout_picker:{values:{default:"Disposition par défault",horizontal:"Disposition horizontale",vertical:"Disposition verticale"}}},section:{badge:"Badge",content:"Contenu",context:"Contexte",features:"Fonctionnalités",interactions:"Interactions",layout:"Disposition"}},Ku={description:"La configuration de votre carte a été migrée vers la nouvelle version. Vous pouvez trouver plus d’informations sur les changements dans {link}.",ok:"Ok",post:"l'article sur Github",revert:"Revenir en arrière",title:"Carte mise à jour"},Yu={card:$u,editor:Gu,migration:Ku},qu=Object.freeze({__proto__:null,card:$u,default:Yu,editor:Gu,migration:Ku}),Wu={not_found:"היישות לא נמצאה"},Xu={card:{chips:{alignment:"יישור"},climate:{hvac_modes:"מצבי שואב אבק",show_temperature_control:"בקרת טמפרטורה?"},cover:{show_buttons_control:"הצג כפתורי שליטה?",show_position_control:"הצג פקדי מיקום?",show_tilt_position_control:"שליטה בהטייה?"},empty:{no_config_options:"לכרטיסיה זו אין אפשרויות להגדרה."},fan:{show_direction_control:"שליטה בכיוון?",show_oscillate_control:"שליטה בהתנדנדות?",show_percentage_control:"שליטה באחוז?"},generic:{collapsible_controls:"הסתר שליטה כשאר מכובה",color:"צבע",content_info:"תוכן",fill_container:"מלא גבולות",icon_animation:"הנפש צלמית אם פעיל?",icon_color:"צבע אייקון",icon_type:"סוג צלמית",layout:"סידור",primary_info:"מידע ראשי",secondary_info:"מידע מישני",use_entity_picture:"השתמש בתמונת הישות?"},humidifier:{show_target_humidity_control:"הצג פקדי לחות?"},light:{incompatible_controls:"יתכן וחלק מהכפתורים לא יופיעו אם התאורה אינה תומכת בתכונה.",show_brightness_control:"שליטה בבהירות?",show_color_control:"הצג פקד צבע?",show_color_temp_control:"הצג פקד גוון תאורה?",use_light_color:"השתמש בצבע האור"},lock:{lock:"נעל",open:"פתח",unlock:"בטל נעילה"},"media-player":{media_controls:"שליטה במדיה",media_controls_list:{next:"רצועה הבאה",on_off:"הדלק/כבה",play_pause_stop:"נגן/השהה/הפסק",previous:"רצועה קודמת",repeat:"חזרה",shuffle:"ערבב"},show_volume_level:"הצג שליטת ווליום",use_media_artwork:"השתמש באומנות מדיה",use_media_info:"השתמש במידע מדיה",volume_controls:"שליטה בווליום",volume_controls_list:{volume_buttons:"כפתורי ווליום",volume_mute:"השתק",volume_set:"רמת ווליום"}},number:{display_mode:"הגדרת מצב תצוגה",display_mode_list:{buttons:"לחצנים",default:"ברירת מחדל (סרגל גלילה)",slider:"סרגל גלילה"}},template:{badge_color:"צבע תג",badge_icon:"צלמית תג",content:"תוכן",entity_extra:"משמש בתבניות ופעולות",label:"תווית",multiline_secondary:"מידע משני בשורות?",picture:"תמונה (תחליף את הצלמית)",primary:"מידע ראשי",secondary:"מידע מישני"},title:{subtitle:"כתובית",subtitle_tap_action:"פעולה בלחיצה על כותרת משנה",title:"כותרת",title_tap_action:"פעולה בלחיצה על הכותרת"},update:{show_buttons_control:"הצג כפתורי שליטה?"},vacuum:{commands:"פקודות",commands_list:{on_off:"כיבוי/הדלקה"},icon_animation:"הנפשת אייקון"},weather:{show_conditions:"הצג תנאים?",show_temperature:"הצג טמפרטורה?"}},chip:{"chip-picker":{add:"הוסף שבב",chips:"שבבים",clear:"נקה",edit:"ערוך",select:"בחר שבב",types:{action:"פעולה","alarm-control-panel":"אזעקה",back:"חזור",conditional:"מותנה",entity:"ישות",light:"אור",menu:"תפריט",spacer:"מרווח",template:"תבנית",weather:"מזג אוויר"}},conditional:{chip:"שבב"},sub_element_editor:{title:"עורך שבב"}},form:{alignment_picker:{values:{center:"אמצע",default:"יישור ברירת מחדל",end:"סוף",justify:"מוצדק",start:"התחלה"}},color_picker:{values:{default:"צבע ברירת מחדל"}},icon_type_picker:{values:{default:"סוג ברירת מחדל","entity-picture":"תמונת יישות",icon:"צלמית",none:"ריק"}},info_picker:{values:{default:"מידע ברירת מחדל","last-changed":"שונה לאחרונה","last-updated":"עודכן לאחרונה",name:"שם",none:"ריק",state:"מצב"}},layout_picker:{values:{default:"סידור ברירת מחדל",horizontal:"סידור מאוזן",vertical:"סידור מאונך"}}}},Zu={card:Wu,editor:Xu},Ju=Object.freeze({__proto__:null,card:Wu,default:Zu,editor:Xu}),Qu={not_found:"Entitás nem található"},th={card:{chips:{alignment:"Rendezés"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Hőmérséklet vezérlő"},cover:{show_buttons_control:"Vezérlő gombok",show_position_control:"Pozíció vezérlő",show_tilt_position_control:"Dőlésszög szabályzó"},fan:{show_oscillate_control:"Oszcilláció vezérlő",show_percentage_control:"Százalékos vezérlő"},generic:{collapsible_controls:"Vezérlők összezárása kikapcsolt állapotban",content_info:"Tartalom",fill_container:"Tároló kitöltése",icon_animation:"Ikon animálása aktív állapotban",icon_color:"Ikon szín",icon_type:"Ikon típus",layout:"Elrendezés",primary_info:"Elsődleges információ",secondary_info:"Másodlagos információ",use_entity_picture:"Entitás kép használata"},humidifier:{show_target_humidity_control:"Páratartalom vezérlő"},light:{incompatible_controls:"Azok a vezérlők nem lesznek megjelenítve, amelyeket a fényforrás nem támogat.",show_brightness_control:"Fényerő vezérlő",show_color_control:"Szín vezérlő",show_color_temp_control:"Színhőmérséklet vezérlő",use_light_color:"Fény szín használata"},lock:{lock:"Zár",open:"Nyitva",unlock:"Nyit"},"media-player":{media_controls:"Média vezérlők",media_controls_list:{next:"Következő szám",on_off:"Ki/bekapcsolás",play_pause_stop:"Lejátszás/szünet/állj",previous:"Előző szám",repeat:"Ismétlés módja",shuffle:"Véletlen lejátszás"},show_volume_level:"Hangerő mutatása",use_media_artwork:"Média borító használata",use_media_info:"Média infó használata",volume_controls:"Hangerő vezérlők",volume_controls_list:{volume_buttons:"Hangerő gombok",volume_mute:"Némítás",volume_set:"Hangerő szint"}},number:{display_mode:"Megjelenítési mód",display_mode_list:{buttons:"Gombok",default:"Alepértelmezett (csúszka)",slider:"Csúszka"}},template:{badge_color:"Jelvény szín",badge_icon:"Jelvény ikon",content:"Tartalom",entity_extra:"Műveletek és sablonok használatakor",multiline_secondary:"Másodlagost több sorba?",picture:"Kép (lecseréli az ikont)",primary:"Elsődleges információ",secondary:"Másodlagos információ"},title:{subtitle:"Alcím",subtitle_tap_action:"Alcímre koppintáskor",title:"Fejléc",title_tap_action:"Fejlécre koppintáskor"},update:{show_buttons_control:"Vezérlő gombok"},vacuum:{commands:"Utasítások",commands_list:{on_off:"Ki/Bekapcsolás"}},weather:{show_conditions:"Állapotok",show_temperature:"Hőmérséklet"}},chip:{"chip-picker":{add:"Chip hozzáadása",chips:"Chip-ek",clear:"Ürítés",edit:"Szerkesztés",select:"Chip kiválasztása",types:{action:"Művelet","alarm-control-panel":"Riasztó",back:"Vissza",conditional:"Feltételes",entity:"Entitás",light:"Fényforrás",menu:"Menü",spacer:"Térköz",template:"Sablon",weather:"Időjárás"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip szerkesztő"}},form:{alignment_picker:{values:{center:"Közepe",default:"Alapértelmezett rendezés",end:"Vége",justify:"Sorkizárt",start:"Kezdete"}},color_picker:{values:{default:"Alapértelmezett szín"}},icon_type_picker:{values:{default:"Alapértelmezett típus","entity-picture":"Entitás kép",icon:"Ikon",none:"Egyik sem"}},info_picker:{values:{default:"Alepértelmezett információ","last-changed":"Utoljára módosítva","last-updated":"Utoljára frissítve",name:"Név",none:"Egyik sem",state:"Állapot"}},layout_picker:{values:{default:"Alapértelmezet elrendezés",horizontal:"Vízszintes elrendezés",vertical:"Függőleges elrendezés"}}}},eh={card:Qu,editor:th},nh=Object.freeze({__proto__:null,card:Qu,default:eh,editor:th}),oh={not_found:"Entitas tidak ditemukan"},ih={card:{chips:{alignment:"Perataan"},climate:{hvac_modes:"Mode HVAC",show_temperature_control:"Kontrol suhu?"},cover:{show_buttons_control:"Tombol kontrol?",show_position_control:"Kontrol posisi?",show_tilt_position_control:"Kontrol kemiringan?"},fan:{show_oscillate_control:"Kontrol osilasi?",show_percentage_control:"Kontrol persentase?"},generic:{collapsible_controls:"Sembunyikan kontrol saat mati",color:"Warna",content_info:"Konten",fill_container:"Isi kontainer",icon_animation:"Animasikan ikon saat aktif?",icon_color:"Warna ikon",icon_type:"Tipe ikon",layout:"Tata letak",primary_info:"Informasi primer",secondary_info:"Informasi sekunder",use_entity_picture:"Gunakan gambar entitas?"},humidifier:{show_target_humidity_control:"Kontrol kelembapan?"},light:{incompatible_controls:"Beberapa kontrol mungkin tidak ditampilkan jika lampu Anda tidak mendukung fitur tersebut.",show_brightness_control:"Kontrol kecerahan?",show_color_control:"Kontrol warna?",show_color_temp_control:"Kontrol suhu warna?",use_light_color:"Gunakan warna lampu"},lock:{lock:"Kunci",open:"Buka",unlock:"Buka kunci"},"media-player":{media_controls:"Kontrol media",media_controls_list:{next:"Lagu berikutnya",on_off:"Nyalakan/Matikan",play_pause_stop:"Putar/jeda/stop",previous:"Lagu sebelumnya",repeat:"Mode pengulangan",shuffle:"Acak"},show_volume_level:"Tampilkan level volume",use_media_artwork:"Gunakan gambar seni media",use_media_info:"Gunakan info media",volume_controls:"Kontrol volume",volume_controls_list:{volume_buttons:"Tombol volume",volume_mute:"Bisukan",volume_set:"Level volume"}},number:{display_mode:"Mode Tampilan",display_mode_list:{buttons:"Tombol",default:"Bawaan (geser)",slider:"Geser"}},template:{badge_color:"Warna lencana",badge_icon:"Ikon lencana",content:"Konten",entity_extra:"Digunakan dalam templat dan tindakan",label:"Label",multiline_secondary:"Info sekunder multibaris?",picture:"Gambar (akan menggantikan ikon)",primary:"Informasi primer",secondary:"Informasi sekunder"},title:{subtitle:"Subjudul",subtitle_tap_action:"Tindakan ketuk subjudul",title:"Judul",title_tap_action:"Tindakan ketuk judul"},update:{show_buttons_control:"Tombol kontrol?"},vacuum:{commands:"Perintah",commands_list:{on_off:"Nyalakan/Matikan"}},weather:{show_conditions:"Kondisi?",show_temperature:"Suhu?"}},chip:{"chip-picker":{add:"Tambah cip",chips:"Cip",clear:"Hapus",edit:"Edit",select:"Pilih cip",types:{action:"Tindakan","alarm-control-panel":"Alarm",back:"Kembali",conditional:"Kondisional",entity:"Entitas",light:"Lampu",menu:"Menu",spacer:"Pemisah",template:"Templat",weather:"Cuaca"}},conditional:{chip:"Cip"},sub_element_editor:{title:"Editor cip"}},form:{alignment_picker:{values:{center:"Tengah",default:"Perataan bawaan",end:"Akhir",justify:"Rata kanan-kiri",start:"Awal"}},color_picker:{values:{default:"Warna bawaan"}},icon_type_picker:{values:{default:"Tipe bawaan","entity-picture":"Gambar entitas",icon:"Ikon",none:"Tidak ada"}},info_picker:{values:{default:"Informasi bawaan","last-changed":"Terakhir Diubah","last-updated":"Terakhir Diperbarui",name:"Nama",none:"Tidak ada",state:"Status"}},layout_picker:{values:{default:"Tata letak bawaan",horizontal:"Tata letak horizontal",vertical:"Tata letak vertikal"}}}},rh={card:oh,editor:ih},ah=Object.freeze({__proto__:null,card:oh,default:rh,editor:ih}),sh={not_found:"Entità non trovata"},lh={card:{chips:{alignment:"Allineamento"},climate:{hvac_modes:"Modalità del termostato",show_temperature_control:"Controllo della temperatura?"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura",show_tilt_position_control:"Controllo percentuale inclinazione"},fan:{show_oscillate_control:"Controllo oscillazione",show_percentage_control:"Controllo potenza"},generic:{collapsible_controls:"Nascondi i controlli quando spento",color:"Colore",content_info:"Contenuto",fill_container:"Riempi il contenitore",icon_animation:"Anima l'icona quando attiva",icon_color:"Colore dell'icona",icon_type:"Tipo icona",layout:"Disposizione",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",use_entity_picture:"Usa l'immagine dell'entità"},humidifier:{show_target_humidity_control:"Controllo umidità"},light:{incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta.",show_brightness_control:"Controllo luminosità",show_color_control:"Controllo colore",show_color_temp_control:"Controllo temperatura",use_light_color:"Usa il colore della luce"},lock:{lock:"Blocca",open:"Aperto",unlock:"Sblocca"},"media-player":{media_controls:"Controlli media",media_controls_list:{next:"Traccia successiva",on_off:"Accendi/Spegni",play_pause_stop:"Play/Pausa/Stop",previous:"Traccia precedente",repeat:"Ciclo continuo",shuffle:"Riproduzione casuale"},show_volume_level:"Mostra volume",use_media_artwork:"Usa la copertina della sorgente",use_media_info:"Mostra le informazioni della sorgente",volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del volume",volume_mute:"Silenzia",volume_set:"Livello del volume"}},number:{display_mode:"Modalità di visualizzazione",display_mode_list:{buttons:"Pulsanti",default:"Predefinito (cursore)",slider:"Cursore"}},template:{badge_color:"Colore del badge",badge_icon:"Icona del badge",content:"Contenuto",entity_extra:"Usato in templates ed azioni",label:"Etichetta",multiline_secondary:"Abilita frasi multilinea",picture:"Immagine (sostituirà l'icona)",primary:"Informazione primaria",secondary:"Informazione secondaria"},title:{subtitle:"Sottotitolo",subtitle_tap_action:"Azione di tap sul sottotitolo",title:"Titolo",title_tap_action:"Azione di tap sul titolo"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi",commands_list:{on_off:"Accendi/Spegni"}},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"}},chip:{"chip-picker":{add:"Aggiungi chip",chips:"Chips",clear:"Rimuovi",edit:"Modifica",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",spacer:"Distanziere",template:"Modello",weather:"Meteo"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor di chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Allineamento predefinito",end:"Fine",justify:"Giustificato",start:"Inizio"}},color_picker:{values:{default:"Colore predefinito"}},icon_type_picker:{values:{default:"Tipo predefinito","entity-picture":"Immagine dell'entità",icon:"Icona",none:"Nessuna"}},info_picker:{values:{default:"Informazione predefinita","last-changed":"Ultimo cambiamento","last-updated":"Ultimo aggiornamento",name:"Nome",none:"Nessuno",state:"Stato"}},layout_picker:{values:{default:"Disposizione predefinita",horizontal:"Disposizione orizzontale",vertical:"Disposizione verticale"}}}},ch={card:sh,editor:lh},uh=Object.freeze({__proto__:null,card:sh,default:ch,editor:lh}),hh={card:{chips:{alignment:"정렬"},climate:{hvac_modes:"HVAC 모드",show_temperature_control:"온도 조절 표시"},cover:{show_buttons_control:"컨트롤 버튼 표시",show_position_control:"위치 컨트롤 표시",show_tilt_position_control:"기울기 컨트롤 표시"},fan:{show_oscillate_control:"오실레이트 컨트롤",show_percentage_control:"퍼센트 컨트롤"},generic:{collapsible_controls:"꺼져있을 때 컨트롤 접기",content_info:"내용 정보",fill_container:"콘테이너 채우기",icon_animation:"활성화 시 아이콘 애니메이션 사용",icon_color:"아이콘 색",icon_type:"아이콘 타입",layout:"레이아웃",primary_info:"기본 정보",secondary_info:"보조 정보",use_entity_picture:"엔티티 사진 사용"},humidifier:{show_target_humidity_control:"습도 조절 표시"},light:{incompatible_controls:"조명이 기능을 지원하지 않는 경우 일부 컨트롤이 표시되지 않을 수 있습니다.",show_brightness_control:"밝기 컨트롤 표시",show_color_control:"색 컨트롤 표시",show_color_temp_control:"색 온도 컨트롤 표시",use_light_color:"조명 색 사용"},lock:{lock:"잠금",open:"열기",unlock:"잠금 해제"},"media-player":{media_controls:"미디어 컨트롤",media_controls_list:{next:"다음 트랙",on_off:"켜기/끄기",play_pause_stop:"재생/일시 정지/정지",previous:"이전 트랙",repeat:"반복 모드",shuffle:"섞기"},show_volume_level:"볼륨 레벨 표시",use_media_artwork:"미디어 아트워크 사용",use_media_info:"미디어 정보 사용",volume_controls:"볼륨 컨트롤",volume_controls_list:{volume_buttons:"볼륨 버튼",volume_mute:"음소거",volume_set:"볼륨 레벨"}},template:{badge_color:"뱃지 색",badge_icon:"뱃지 아이콘",content:"내용",entity_extra:"템플릿 및 작업에 사용",multiline_secondary:"Multiline secondary?",picture:"그림 (아이콘 대체)",primary:"기본 정보",secondary:"보조 정보"},title:{subtitle:"부제목",subtitle_tap_action:"부제목 탭 액션",title:"제목",title_tap_action:"제목 탭 액션"},update:{show_buttons_control:"컨트롤 버튼 표시"},vacuum:{commands:"명령어",commands_list:{on_off:"켜기/끄기"}},weather:{show_conditions:"조건 표시",show_temperature:"온도 표시"}},chip:{"chip-picker":{add:"칩 추가",chips:"칩",clear:"클리어",edit:"수정",select:"칩 선택",types:{action:"액션","alarm-control-panel":"알람",back:"이전",conditional:"Conditional",entity:"엔티티",light:"조명",menu:"메뉴",template:"템플릿",weather:"날씨"}},conditional:{chip:"칩"},sub_element_editor:{title:"칩 에디터"}},form:{alignment_picker:{values:{center:"중앙",default:"기본 정렬",end:"끝",justify:"행 정렬",start:"시작"}},color_picker:{values:{default:"기본 색"}},icon_type_picker:{values:{default:"기본 타입","entity-picture":"엔티티 사진",icon:"아이콘",none:"없음"}},info_picker:{values:{default:"기본 정보","last-changed":"마지막 변경","last-updated":"마지막 업데이트",name:"이름",none:"없음",state:"상태"}},layout_picker:{values:{default:"기본 레이아웃",horizontal:"수평 레이아웃",vertical:"수직 레이아웃"}}}},dh={editor:hh},ph=Object.freeze({__proto__:null,default:dh,editor:hh}),fh={not_found:"Enhet ikke funnet"},mh={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-moduser",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Kontrollere med knapper?",show_position_control:"Posisjonskontroll?",show_tilt_position_control:"Vippe kontroll?"},fan:{show_oscillate_control:"Oscillerende kontroll?",show_percentage_control:"Prosentvis kontroll?"},generic:{collapsible_controls:"Skjul kontroller når av",color:"Farge",content_info:"Innhold",fill_container:"Fyll beholder",icon_animation:"Animer ikon når aktivt?",icon_color:"Ikon farge",icon_type:"Ikontype",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",use_entity_picture:"Bruk enhetsbilde?"},humidifier:{show_target_humidity_control:"Fuktighetskontroll?"},light:{incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen.",show_brightness_control:"Lysstyrkekontroll?",show_color_control:"Fargekontroll?",show_color_temp_control:"Temperatur fargekontroll?",use_light_color:"Bruk lys farge"},lock:{lock:"Lås",open:"Åpne",unlock:"Lås opp"},"media-player":{media_controls:"Media kontroller",media_controls_list:{next:"Neste spor",on_off:"Slå på/av",play_pause_stop:"Spill/pause/stopp",previous:"Forrige spor",repeat:"Gjenta",shuffle:"Bland"},show_volume_level:"Vis volumnivå",use_media_artwork:"Bruk mediabilde",use_media_info:"Bruk mediainformasjon",volume_controls:"Volumkontroller",volume_controls_list:{volume_buttons:"Volumknapper",volume_mute:"Demp",volume_set:"Volumnivå"}},number:{display_mode:"Visningsmodus",display_mode_list:{buttons:"Knapper",default:"Standard (skyveknapp)",slider:"Skyveknapp"}},template:{badge_color:"Badge farge",badge_icon:"Badge ikon",content:"Innhold",entity_extra:"Brukes i maler og handlinger",label:"Etikett",multiline_secondary:"Multilinje sekundær?",picture:"Bilde (erstatter ikonet)",primary:"Primærinformasjon",secondary:"Sekundærinformasjon"},title:{subtitle:"Undertekst",subtitle_tap_action:"Undertekst tap action",title:"Tittel",title_tap_action:"Tittel tap action"},update:{show_buttons_control:"Kontroller knapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå på/av"}},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Legg til chip",chips:"Chips",clear:"Klare",edit:"Endre",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",spacer:"Mellomrom",template:"Mal",weather:"Vær"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip redaktør"}},form:{alignment_picker:{values:{center:"Senter",default:"Standard justering",end:"Slutt",justify:"Blokkjuster",start:"Start"}},color_picker:{values:{default:"Standard farge"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhetsbilde",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard informasjon","last-changed":"Sist endret","last-updated":"Sist oppdatert",name:"Navn",none:"Ingen",state:"Tilstand"}},layout_picker:{values:{default:"Standardoppsett",horizontal:"Horisontalt oppsett",vertical:"Vertikalt oppsett"}}}},vh={card:fh,editor:mh},gh=Object.freeze({__proto__:null,card:fh,default:vh,editor:mh}),_h={not_found:"Entiteit niet gevonden"},yh={card:{chips:{alignment:"Uitlijning"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatuur bediening?"},cover:{show_buttons_control:"Bedieningsknoppen?",show_position_control:"Positie bediening?",show_tilt_position_control:"Kantel bediening?"},empty:{no_config_options:"Deze kaart heeft geen configuratie opties."},fan:{show_direction_control:"Richting bediening?",show_oscillate_control:"Oscillatie bediening?",show_percentage_control:"Bediening middels percentage?"},generic:{collapsible_controls:"Bedieningselementen verbergen wanneer uitgeschakeld",color:"Kleur",content_info:"Inhoud",fill_container:"Vul container",icon_animation:"Icoon animeren indien actief?",icon_color:"Icoon kleur",icon_type:"Icoon type",layout:"Lay-out",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",use_entity_picture:"Gebruik afbeelding van entiteit?"},humidifier:{show_target_humidity_control:"Vochtigheid bediening?"},light:{incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt.",show_brightness_control:"Helderheidsbediening?",show_color_control:"Kleur bediening?",show_color_temp_control:"Kleurtemperatuur bediening?",use_light_color:"Gebruik licht kleur"},lock:{lock:"Vergrendel",open:"Open",unlock:"Ontgrendel"},"media-player":{media_controls:"Mediabediening",media_controls_list:{next:"Volgende nummer",on_off:"Zet aan/uit",play_pause_stop:"Speel/pauze/stop",previous:"Vorige nummer",repeat:"Herhalen",shuffle:"Willekeurig afspelen"},show_volume_level:"Toon volumeniveau",use_media_artwork:"Gebruik media omslag",use_media_info:"Gebruik media informatie",volume_controls:"Volumebediening",volume_controls_list:{volume_buttons:"Volume knoppen",volume_mute:"Dempen",volume_set:"Volumeniveau"}},number:{display_mode:"Weergave Modus",display_mode_list:{buttons:"Knoppen",default:"Standaard (schuifbalk)",slider:"Schuifbalk"}},template:{badge_color:"Badge kleur",badge_icon:"Badge icoon",content:"Inhoud",entity_extra:"Gebruikt in sjablonen en acties",label:"Label",multiline_secondary:"Secundaire informatie op meerdere regels tonen?",picture:"Afbeelding (zal het icoon vervangen)",primary:"Primaire informatie",secondary:"Secundaire informatie"},title:{subtitle:"Ondertitel",subtitle_tap_action:"Ondertitel tik actie",title:"Titel",title_tap_action:"Titel tik actie"},update:{show_buttons_control:"Bedieningsknoppen?"},vacuum:{commands:"Commando's",commands_list:{on_off:"Zet aan/uit"}},weather:{show_conditions:"Weersomstandigheden?",show_temperature:"Temperatuur?"}},chip:{"chip-picker":{add:"Toevoegen chip",chips:"Chips",clear:"Maak leeg",edit:"Bewerk",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",spacer:"Afstandhouder",template:"Sjabloon",weather:"Weer"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Midden",default:"Standaard uitlijning",end:"Einde",justify:"Uitlijnen",start:"Begin"}},color_picker:{values:{default:"Standaard kleur"}},icon_type_picker:{values:{default:"Standaard icoon type","entity-picture":"Entiteit afbeelding",icon:"Icoon",none:"Geen"}},info_picker:{values:{default:"Standaard informatie","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",name:"Naam",none:"Geen",state:"Staat"}},layout_picker:{values:{default:"Standaard lay-out",horizontal:"Horizontale lay-out",vertical:"Verticale lay-out"}}}},bh={card:_h,editor:yh},kh=Object.freeze({__proto__:null,card:_h,default:bh,editor:yh}),wh={not_found:"Nie znaleziono encji"},Ch={card:{chips:{alignment:"Wyrównanie"},climate:{hvac_modes:"Tryby urządzenia",show_temperature_control:"Sterowanie temperaturą?"},cover:{show_buttons_control:"Przyciski sterujące?",show_position_control:"Sterowanie położeniem?",show_tilt_position_control:"Sterowanie poziomem otwarcia?"},fan:{show_direction_control:"Kontrola kierunku?",show_oscillate_control:"Sterowanie oscylacją?",show_percentage_control:"Sterowanie procentowe?"},generic:{collapsible_controls:"Zwiń sterowanie, jeśli wyłączone",color:"Kolor",content_info:"Zawartość",fill_container:"Wypełnij zawartością",icon_animation:"Animować, gdy aktywny?",icon_color:"Kolor ikony",icon_type:"Typ ikony",layout:"Układ",primary_info:"Informacje główne",secondary_info:"Informacje drugorzędne",use_entity_picture:"Użyć obrazu encji?"},humidifier:{show_target_humidity_control:"Sterowanie wilgotnością?"},light:{incompatible_controls:"Niektóre funkcje są niewidoczne, jeśli światło ich nie obsługuje.",show_brightness_control:"Sterowanie jasnością?",show_color_control:"Sterowanie kolorami?",show_color_temp_control:"Sterowanie temperaturą światła?",use_light_color:"Użyj koloru światła"},lock:{lock:"Zablokuj",open:"Otwórz",unlock:"Odblokuj"},"media-player":{media_controls:"Sterowanie multimediami",media_controls_list:{next:"Następne nagranie",on_off:"Włącz/wyłącz",play_pause_stop:"Odtwórz/Pauza/Zatrzymaj",previous:"Poprzednie nagranie",repeat:"Powtarzanie",shuffle:"Losowo"},show_volume_level:"Wyświetl poziom głośności",use_media_artwork:"Użyj okładek multimediów",use_media_info:"Użyj informacji o multimediach",volume_controls:"Sterowanie głośnością",volume_controls_list:{volume_buttons:"Przyciski głośności",volume_mute:"Wycisz",volume_set:"Poziom głośności"}},number:{display_mode:"Sposób wyświetlania",display_mode_list:{buttons:"Przyciski",default:"Domyślnie (suwak)",slider:"Suwak"}},template:{badge_color:"Kolor odznaki",badge_icon:"Ikona odznaki",content:"Zawartość",entity_extra:"Używane w szablonach i akcjach",label:"Etykieta",multiline_secondary:"Drugorzędne wielowierszowe?",picture:"Obraz (zamiast ikony)",primary:"Informacje główne",secondary:"Informacje drugorzędne"},title:{subtitle:"Podtytuł",subtitle_tap_action:"Akcja na podtytule",title:"Tytuł",title_tap_action:"Akcja na tytule"},update:{show_buttons_control:"Przyciski sterujące?"},vacuum:{commands:"Polecenia",commands_list:{on_off:"Włącz/Wyłącz"}},weather:{show_conditions:"Warunki?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj czip",chips:"Czipy",clear:"Wyczyść",edit:"Edytuj",select:"Wybierz czip",types:{action:"Akcja","alarm-control-panel":"Alarm",back:"Wstecz",conditional:"Warunkowy",entity:"Encja",light:"Światło",menu:"Menu",spacer:"Odstęp",template:"Szablon",weather:"Pogoda"}},conditional:{chip:"Czip"},sub_element_editor:{title:"Edytor czipów"}},form:{alignment_picker:{values:{center:"Wyśrodkowanie",default:"Wyrównanie domyślne",end:"Wyrównanie do prawej",justify:"Justowanie",start:"Wyrównanie do lewej"}},color_picker:{values:{default:"Domyślny kolor"}},icon_type_picker:{values:{default:"Domyślny typ","entity-picture":"Obraz encji",icon:"Ikona",none:"Brak"}},info_picker:{values:{default:"Domyślne informacje","last-changed":"Ostatnia zmiana","last-updated":"Ostatnia aktualizacja",name:"Nazwa",none:"Brak",state:"Stan"}},layout_picker:{values:{default:"Układ domyślny",horizontal:"Układ poziomy",vertical:"Układ pionowy"}}}},Eh={card:wh,editor:Ch},xh=Object.freeze({__proto__:null,card:wh,default:Eh,editor:Ch}),Ah={not_found:"Entidade não encontrada"},Sh={card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos do HVAC",show_temperature_control:"Controle de temperatura?"},cover:{show_buttons_control:"Botões de controle?",show_position_control:"Controle de posição?",show_tilt_position_control:"Controle de inclinação?"},empty:{no_config_options:"Esse card não possui opções de configuração."},fan:{show_direction_control:"Controle de direção?",show_oscillate_control:"Controle de oscilação?",show_percentage_control:"Controle de porcentagem?"},generic:{collapsible_controls:"Recolher controles quando desligado",color:"Cor",content_info:"Conteúdo",fill_container:"Preencher espaço",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo do ícone",layout:"Layout",primary_info:"Informação primária",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controle de umidade?"},light:{incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso.",show_brightness_control:"Controle de brilho?",show_color_control:"Controle de cor?",show_color_temp_control:"Controle de temperatura de cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles de mídia",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Reproduzir/pausar/parar",previous:"Faixa anterior",repeat:"Modo repetição",shuffle:"Embaralhar"},show_volume_level:"Mostrar nível de volume",use_media_artwork:"Usar arte da mídia",use_media_info:"Usar informação da mídia",volume_controls:"Controles de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Mudo",volume_set:"Nível de volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Padrão (deslizante)",slider:"Deslizante"}},template:{badge_color:"Cor do badge",badge_icon:"Ícone do badge",content:"Conteúdo",entity_extra:"Usado em modelos e ações",label:"Label",multiline_secondary:"Multilinha secundária?",picture:"Imagem (irá substituir o ícone)",primary:"Informação primária",secondary:"Informação secundária"},title:{subtitle:"Legenda",subtitle_tap_action:"Ação de toque na legenda",title:"Título",title_tap_action:"Ação de toque no título"},update:{show_buttons_control:"Botões de controle?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar chip",chips:"Chips",clear:"Limpar",edit:"Editar",select:"Selecionar chip",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Luz",menu:"Menu",quickbar:"Barra rápida",spacer:"Espaçador",template:"Template",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Alinhamento padrão",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo padrão","entity-picture":"Imagem da entidade",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informação padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}}},Th={card:Ah,editor:Sh},Mh=Object.freeze({__proto__:null,card:Ah,default:Th,editor:Sh}),zh={not_found:"Entidade não encontrada"},Oh={card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos HVAC",show_temperature_control:"Controlo de temperatura?"},cover:{show_buttons_control:"Botões de controlo?",show_position_control:"Controlo de posição?",show_tilt_position_control:"Controlo de inclinação?"},fan:{show_oscillate_control:"Controlo de oscilação?",show_percentage_control:"Controlo de percentagem?"},generic:{collapsible_controls:"Colapsar controlos quando desligado",color:"Cor",content_info:"Conteúdo",fill_container:"Preencher contentor",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo de ícone",layout:"Layout",primary_info:"Informação principal",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controlo de humidade?"},light:{incompatible_controls:"Alguns controlos podem não ser exibidos se a luz não suportar a funcionalidade.",show_brightness_control:"Controlo de brilho?",show_color_control:"Controlo de cor?",show_color_temp_control:"Controlo de temperatura da cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Trancar",open:"Aberto",unlock:"Destrancar"},"media-player":{media_controls:"Controlos de media",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Tocar/pausa/stop",previous:"Faixa anterior",repeat:"Modo repetir",shuffle:"Baralhar"},show_volume_level:"Mostrar nível do volume",use_media_artwork:"Usar arte do media",use_media_info:"Usar informação do media",volume_controls:"Controlos de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Calar",volume_set:"Nível do volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Por defeito (slider)",slider:"Deslizador"}},template:{badge_color:"Cor do crachá",badge_icon:"Icóne do crachá",content:"Conteúdo",entity_extra:"Usado em modelos e ações",label:"Rótulo",multiline_secondary:"Secundária multilinha?",picture:"Imagem (irá substituir o ícone)",primary:"Informação principal",secondary:"Informação secundária"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Ação ao tocar no subtítulo",title:"Título",title_tap_action:"Ação ao tocar no título"},update:{show_buttons_control:"Botões de controlo?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar ficha",chips:"Fichas",clear:"Limpar",edit:"Editar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",spacer:"Espaçador",template:"Modelo",weather:"Clima"}},conditional:{chip:"Ficha"},sub_element_editor:{title:"Editor de fichas"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alinhamento predefinido",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo predefinido","entity-picture":"Entidade de imagem",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informações padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}}},Ih={card:zh,editor:Oh},jh=Object.freeze({__proto__:null,card:zh,default:Ih,editor:Oh}),Ph={card:{chips:{alignment:"Aliniere"},climate:{hvac_modes:"Moduri HVAC",show_temperature_control:"Comenzi temperatură?"},cover:{show_buttons_control:"Comenzi pentru control?",show_position_control:"Comandă pentru poziție?",show_tilt_position_control:"Comandă pentru înclinare?"},fan:{icon_animation:"Animare pictograma la activare?",show_oscillate_control:"Comandă oscilație?",show_percentage_control:"Comandă procent?"},generic:{collapsible_controls:"Restrângere la dezactivare",content_info:"Conținut",fill_container:"Umplere container",icon_color:"Culoare pictogramă",icon_type:"Tip pictogramă",layout:"Aranjare",primary_info:"Informație principală",secondary_info:"Informație secundară",use_entity_picture:"Imagine?"},humidifier:{show_target_humidity_control:"Comenzi umiditate?"},light:{incompatible_controls:"Unele comenzi ar putea să nu fie afișate dacă lumina nu suportă această caracteristică.",show_brightness_control:"Comandă pentru strălucire?",show_color_control:"Comandă pentru culoare?",show_color_temp_control:"Comandă pentru temperatură de culoare?",use_light_color:"Folosește culoarea luminii"},lock:{lock:"Încuie",open:"Deschide",unlock:"Descuie"},"media-player":{media_controls:"Comenzi media",media_controls_list:{next:"Pista următoare",on_off:"Pornit/Oprit",play_pause_stop:"Redare/Pauză/Stop",previous:"Pista anterioară",repeat:"Mod repetare",shuffle:"Amestecare"},show_volume_level:"Nivel volum",use_media_artwork:"Grafică media",use_media_info:"Informații media",volume_controls:"Comenzi volum",volume_controls_list:{volume_buttons:"Comenzi volum",volume_mute:"Dezactivare sunet",volume_set:"Nivel volum"}},template:{badge_color:"Culoare insignă",badge_icon:"Pictogramă insignă",content:"Conținut",entity_extra:"Folosită în șabloane și acțiuni",multiline_secondary:"Informație secundară pe mai multe linii?",picture:"Imagine (inlocuiește pictograma)",primary:"Informație principală",secondary:"Informație secundară"},title:{subtitle:"Subtitlu",title:"Titlu"},update:{show_buttons_control:"Comenzi control?"},vacuum:{commands:"Comenzi"},weather:{show_conditions:"Condiții?",show_temperature:"Temperatură?"}},chip:{"chip-picker":{add:"Adaugă jeton",chips:"Jetoane",clear:"Șterge",edit:"Modifică",select:"Alege jeton",types:{action:"Acțiune","alarm-control-panel":"Alarmă",back:"Înapoi",conditional:"Condițional",entity:"Entitate",light:"Lumină",menu:"Meniu",template:"Șablon",weather:"Vreme"}},conditional:{chip:"Jeton"},sub_element_editor:{title:"Editor jeton"}},form:{alignment_picker:{values:{center:"Centrat",default:"Aliniere implicită",end:"Dreapta",justify:"Umplere",start:"Stânga"}},color_picker:{values:{default:"Culoare implicită"}},icon_type_picker:{values:{default:"Tip implicit","entity-picture":"Imagine",icon:"Pictogramă",none:"Niciuna"}},info_picker:{values:{default:"Informație implicită","last-changed":"Ultima modificare","last-updated":"Ultima actulizare",name:"Nume",none:"Niciuna",state:"Stare"}},layout_picker:{values:{default:"Aranjare implicită",horizontal:"Orizontală",vertical:"Verticală"}}}},Nh={editor:Ph},Bh=Object.freeze({__proto__:null,default:Nh,editor:Ph}),Lh={not_found:"Сущность не найдена"},Hh={card:{chips:{alignment:"Выравнивание"},climate:{hvac_modes:"Режимы работы",show_temperature_control:"Управлять целевой температурой?"},cover:{show_buttons_control:"Добавить кнопки управления?",show_position_control:"Управлять позицией?",show_tilt_position_control:"Управлять наклоном?"},empty:{no_config_options:"Эта карточка не имеет опций конфигурации."},fan:{icon_animation:"Анимировать иконку когда включено?",show_direction_control:"Направление?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Управлять процентами?"},generic:{collapsible_controls:"Сворачивать элементы управления при выключении",color:"Цвет",content_info:"Содержимое",fill_container:"Заполнение",icon_animation:"Анимировать иконку, когда активна?",icon_color:"Цвет иконки",icon_type:"Тип иконки",layout:"Расположение",primary_info:"Основная информация",secondary_info:"Второстепенная информация",use_entity_picture:"Использовать изображение объекта?"},humidifier:{show_target_humidity_control:"Управлять целевым уровенем влажности?"},light:{incompatible_controls:"Некоторые элементы управления могут не отображаться, если ваш светильник не поддерживает эти функции.",show_brightness_control:"Управлять яркостью?",show_color_control:"Управлять цветом?",show_color_temp_control:"Управлять цветовой температурой?",use_light_color:"Использовать текущий цвет света"},lock:{lock:"Закрыто",open:"Открыто",unlock:"Разблокировано"},"media-player":{media_controls:"Управление медиа-устройством",media_controls_list:{next:"Следующий трек",on_off:"Включение/выключение",play_pause_stop:"Воспроизведение/пауза/остановка",previous:"Предыдущий трек",repeat:"Режим повтора",shuffle:"Перемешивание"},show_volume_level:"Показать уровень громкости",use_media_artwork:"Использовать обложку с медиа-устройства",use_media_info:"Использовать информацию с медиа-устройства",volume_controls:"Регулятор громкости",volume_controls_list:{volume_buttons:"Кнопки громкости",volume_mute:"Без звука",volume_set:"Уровень громкости"}},number:{display_mode:"Режим отображения",display_mode_list:{buttons:"Кнопки",default:"Стандартно (слайдер)",slider:"Слайдер"}},template:{badge_color:"Цвет значка",badge_icon:"Иконка значка",content:"Содержимое",entity_extra:"Используется в шаблонах и действиях",label:"Ярлык",multiline_secondary:"Многострочная Второстепенная информация?",picture:"Изображение (заменить иконку)",primary:"Основная информация",secondary:"Второстепенная информация"},title:{subtitle:"Подзаголовок",subtitle_tap_action:"Действие при нажатии на подзаголовок",title:"Заголовок",title_tap_action:"Действие при нажатии на заголовок"},update:{show_buttons_control:"Кнопки управления?"},vacuum:{commands:"Команды",commands_list:{on_off:"Включить/выключить"}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добавить мини-карточку",chips:"Мини-карточки",clear:"Очистить",edit:"Изменить",select:"Выбрать мини-карточку",types:{action:"Действие","alarm-control-panel":"Тревога",back:"Назад",conditional:"Условия",entity:"Объект",light:"Освещение",menu:"Меню",quickbar:"Панель быстрого доступа",spacer:"Пробел",template:"Шаблон",weather:"Погода"}},conditional:{chip:"Мини-карточка"},sub_element_editor:{title:"Редактор мини-карточек"}},form:{alignment_picker:{values:{center:"По центру",default:"Выравнивание по умолчанию",end:"К концу",justify:"На всю ширину",start:"К началу"}},color_picker:{values:{default:"Цвет по умолчанию"}},icon_type_picker:{values:{default:"По умолчанию","entity-picture":"Изображение",icon:"Иконка",none:"Нет"}},info_picker:{values:{default:"По умолчанию","last-changed":"Последнее изменение","last-updated":"Последнее обновление",name:"Имя",none:"Нет",state:"Статус"}},layout_picker:{values:{default:"Расположение по умолчанию",horizontal:"Горизонтальное расположение",vertical:"Вертикальное расположение"}}}},Dh={card:Lh,editor:Hh},Rh=Object.freeze({__proto__:null,card:Lh,default:Dh,editor:Hh}),Uh={not_found:"Entita nenájdená"},Vh={badge:{template:{area_helper:"Používa sa v šablónach",content:"Obsah",entity_helper:"Používa sa v šablónach a interakciách",label:"Nápis"}},card:{chips:{alignment:"Zarovnanie"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Ovládanie teploty?"},cover:{show_buttons_control:"Zobraziť ovládacie tlačidlá?",show_position_control:"Ovládanie pozície?",show_tilt_position_control:"Ovládanie natočenia?"},empty:{no_config_options:"Táto karta nemá žiadne možnosti konfigurácie."},fan:{show_direction_control:"Ovládanie smeru?",show_oscillate_control:"Ovládanie oscilácie?",show_percentage_control:"Ovládanie rýchlosti v percentách?"},generic:{area:"Oblasť",collapsible_controls:"Skryť ovládanie v stave VYP",color:"Farba",content_info:"Obsah",entity:"Entita",fill_container:"Vyplniť priestor",icon_animation:"Animovaná ikona v stave ZAP?",icon_color:"Farba ikony",icon_type:"Typ ikony",layout:"Rozloženie",picture:"Obrázok",picture_helper:"Ak je nastavené, nahradí ikonu.",primary_info:"Základné info",secondary_info:"Doplnkové info",use_entity_picture:"Použiť obrázok entity?"},humidifier:{show_target_humidity_control:"Ovládanie vlhkosti?"},light:{incompatible_controls:"Niektoré ovládacie prvky sa nemusia zobraziť, pokiaľ ich svetlo nepodporuje.",show_brightness_control:"Ovládanie jasu?",show_color_control:"Ovládanie farby?",show_color_temp_control:"Ovládanie teploty farby?",use_light_color:"Použiť farbu svetla"},lock:{lock:"Zamknuté",open:"Otvorené",unlock:"Odomknuté"},"media-player":{media_controls:"Ovládanie média",media_controls_list:{next:"Ďalšia",on_off:"Zap / Vyp",play_pause_stop:"Spustiť/pauza/stop",previous:"Predchádzajúca",repeat:"Opakovať",shuffle:"Premiešať"},show_volume_level:"Zobraziť úroveň hlasitosti",use_media_artwork:"Použiť obrázok z média",use_media_info:"Použiť info o médiu",volume_controls:"Ovládanie hlasitosti",volume_controls_list:{volume_buttons:"Tlačidlá hlasitosti",volume_mute:"Stlmiť",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazenia",display_mode_list:{buttons:"Tlačidlá",default:"Predvolené (posúvač)",slider:"Posúvač"}},template:{area:"Oblasť",area_helper:"Používa sa v šablónach a funkciách",badge:"Odznak",badge_color:"Farba odznaku",badge_icon:"Ikona odznaku",badge_text:"Text odznaku",badge_text_helper:"Ak je nastavené, nahradí ikonu.",content:"Obsah",entity_extra:"Použitá v šablónach a akciách",entity_helper:"Používa sa v šablónach, interakciách a funkciách",entity_helper_legacy:"Používa sa v šablónach a interakciách",label:"Štítok",layout:"Rozloženie",multiline_secondary:"Povoliť viacriadkové doplnkové informácie",multiline_secondary_helper:"Karta môže byť vyššia, aby sa do nej vošiel text, a nemusí byť vždy zarovnaná s mriežkovým systémom.",picture:"Obrázok (nahrádza ikonu)",primary:"Základné info",secondary:"Doplnkové info"},title:{subtitle:"Podnadpis",subtitle_tap_action:"Akcia klepnutia na titulky",title:"Nadpis",title_tap_action:"Akcia klepnutia na názov"},update:{show_buttons_control:"Zobraziť ovládacie tlačidlá?"},vacuum:{commands:"Príkazy",commands_list:{on_off:"Zapnúť/Vypnúť"}},weather:{show_conditions:"Zobraziť podmienky?",show_temperature:"Zobraziť teplotu?"}},chip:{"chip-picker":{add:"Pridať štítok",chips:"Štítky",clear:"Vymazať",edit:"Editovať",select:"Vybrať štítok",types:{action:"Akcia","alarm-control-panel":"Alarm",back:"Späť",conditional:"Podmienené",entity:"Entita",light:"Svetlo",menu:"Menu",quickbar:"Rýchla lišta",spacer:"Medzera",template:"Šablóna",weather:"Počasie"}},conditional:{chip:"Čip"},sub_element_editor:{title:"Editor štítkov"}},form:{alignment_picker:{values:{center:"Stred",default:"Predvolené zarovnanie",end:"Koniec",justify:"Vyplniť",start:"Začiatok"}},color_picker:{values:{default:"Predvolená farba"}},icon_type_picker:{values:{default:"Predvolený typ","entity-picture":"Obrázok entity",icon:"Ikona",none:"Žiadny"}},info_picker:{values:{default:"Predvolené informácie","last-changed":"Posledná zmena","last-updated":"Posledná aktualizácia",name:"Názov",none:"Žiadna",state:"Stav"}},layout_picker:{values:{default:"Predvolené rozloženie",horizontal:"Vodorovné rozloženie",vertical:"Zvislé rozloženie"}}},section:{badge:"Odznak",content:"Obsah",context:"Kontext",features:"Funkcie",interactions:"Interakcie",layout:"Rozloženie"}},Fh={description:"Nastavenie vašej karty bolo prenesené do novej verzie. Viac informácií o zmenách nájdete na {link}.",ok:"Ok",post:"príspevku na GitHub",revert:"Vrátiť späť",title:"Karta aktualizovaná"},$h={card:Uh,editor:Vh,migration:Fh},Gh=Object.freeze({__proto__:null,card:Uh,default:$h,editor:Vh,migration:Fh}),Kh={not_found:"Entiteta ni najdena"},Yh={card:{chips:{alignment:"Poravnava"},climate:{hvac_modes:"HVAC načini",show_temperature_control:"Nadzor temperature?"},cover:{show_buttons_control:"Gumbi za upravljanje?",show_position_control:"Nadzor položaja?",show_tilt_position_control:"Nadzor nagiba?"},fan:{show_oscillate_control:"Kontrola nihanja?",show_percentage_control:"Kontrola v odstotkih?"},generic:{collapsible_controls:"Strni kontrolnike, ko so izklopljeni",content_info:"Vsebina",fill_container:"Zapolnitev prostora",icon_animation:"Animacija ikone, ko je aktivna?",icon_color:"Barva ikone",icon_type:"Vrsta ikone",layout:"Postavitev",primary_info:"Primarna informacija",secondary_info:"Sekundarna informacija",use_entity_picture:"Uporabi sliko entitete?"},humidifier:{show_target_humidity_control:"Nadzor vlažnosti?"},light:{incompatible_controls:"Nekateri kontrolniki morda ne bodo prikazani, če vaša luč ne podpira te funkcije.",show_brightness_control:"Nadzor svetlosti?",show_color_control:"Nadzor barv?",show_color_temp_control:"Nadzor temperature barve?",use_light_color:"Uporabi svetlo barvo"},lock:{lock:"Zaklepanje",open:"Odprto",unlock:"Odkleni"},"media-player":{media_controls:"Nadzor medijev",media_controls_list:{next:"Naslednja skladba",on_off:"Vklop/izklop",play_pause_stop:"Predvajaj/pavza/ustavi",previous:"Prejšnja skladba",repeat:"Ponavljajoči način",shuffle:"Naključno"},show_volume_level:"Pokaži raven glasnosti",use_media_artwork:"Uporabite medijsko umetniško delo",use_media_info:"Uporabite informacije o medijih",volume_controls:"Kontrole glasnosti",volume_controls_list:{volume_buttons:"Gumbi za glasnost",volume_mute:"Tiho",volume_set:"Raven glasnosti"}},number:{display_mode:"Način prikaza",display_mode_list:{buttons:"Gumbi",default:"Privzeto (drsnik)",slider:"Drsnik"}},template:{badge_color:"Barva značke",badge_icon:"Ikona značke",content:"Vsebina",entity_extra:"Uporablja se v predlogah in dejanjih",multiline_secondary:"Večvrstični sekundarni?",picture:"Slika (nadomestila bo ikono)",primary:"Primarna informacija",secondary:"Sekundarna informacija"},title:{subtitle:"Podnaslov",subtitle_tap_action:"Dejanje dotika podnapisov",title:"Naziv",title_tap_action:"Dejanje dotika naslova"},update:{show_buttons_control:"Gumbi za upravljanje?"},vacuum:{commands:"Ukazi",commands_list:{on_off:"Vklop/izklop"}},weather:{show_conditions:"Pogoji?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj čip",chips:"Čipi",clear:"Pobriši",edit:"Uredi",select:"Izbira čipa",types:{action:"Dejanje","alarm-control-panel":"Alarm",back:"Nazaj",conditional:"Pogojno",entity:"Entiteta",light:"Svetloba",menu:"Meni",spacer:"Distančnik",template:"Predloga",weather:"Vreme"}},conditional:{chip:"Ćiš"},sub_element_editor:{title:"Urejevalnik čipov"}},form:{alignment_picker:{values:{center:"Center",default:"Privzeta poravnava",end:"Konec",justify:"Poravnava",start:"Pričetek"}},color_picker:{values:{default:"Privzeta barva"}},icon_type_picker:{values:{default:"Privzeta vrsta","entity-picture":"Slika entitete",icon:"Ikona",none:"Brez"}},info_picker:{values:{default:"Privzete informacije","last-changed":"Zadnja sprememba","last-updated":"Zadnja posodobitev",name:"Naziv",none:"Brez",state:"Stanje"}},layout_picker:{values:{default:"Privzeta postavitev",horizontal:"Horizontalna postavitev",vertical:"Vertikalna postavitev"}}}},qh={card:Kh,editor:Yh},Wh={not_found:"Enheten hittades inte"},Xh={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-lägen",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?",show_tilt_position_control:"Visa lutningskontroll?"},empty:{no_config_options:"Detta kort har inga konfigurationsalternativ."},fan:{show_direction_control:"Riktningskontroll?",show_oscillate_control:"Kontroll för oscillera?",show_percentage_control:"Procentuell kontroll?"},generic:{collapsible_controls:"Dölj kontroller när enheten är av",color:"Färg",content_info:"Innehåll",fill_container:"Fyll container",icon_animation:"Animera ikonen när enheten är på?",icon_color:"Ikonens färg",icon_type:"Ikontyp",layout:"Layout",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enhetens bild?"},humidifier:{show_target_humidity_control:"Fuktkontroll?"},light:{incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas.",show_brightness_control:"Styr ljushet?",show_color_control:"Styr färg?",show_color_temp_control:"Färgtemperaturkontroll?",use_light_color:"Styr ljusets färg"},lock:{lock:"Lås",open:"Öppna",unlock:"Lås upp"},"media-player":{media_controls:"Mediakontroller",media_controls_list:{next:"Nästa spår",on_off:"Slå på/av",play_pause_stop:"Spela/pausa/stoppa",previous:"Föregående spår",repeat:"Upprepa",shuffle:"Blanda"},show_volume_level:"Volymkontroll",use_media_artwork:"Visa mediaomslag",use_media_info:"Använd media information",volume_controls:"Volymkontroller",volume_controls_list:{volume_buttons:"Volymknappar",volume_mute:"Ljud av",volume_set:"Volymnivå"}},number:{display_mode:"Visningsläge",display_mode_list:{buttons:"Knappar",default:"Standard (skjutreglage)",slider:"Skjutreglage"}},template:{badge_color:"Färg på märke",badge_icon:"Märke ikon",content:"Innehåll",entity_extra:"Används i mallar och åtgärder",label:"Etikett",multiline_secondary:"Sekundär med flera rader?",picture:"Bild (ersätter ikonen)",primary:"Primär information",secondary:"Sekundär information"},title:{subtitle:"Underrubrik",subtitle_tap_action:"Subtitle tap action",title:"Rubrik",title_tap_action:"Titel tryck åtgärd"},update:{show_buttons_control:"Visa kontrollknappar?"},vacuum:{commands:"Kommandon",commands_list:{on_off:"Slå av/på"}},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Lägg till chip",chips:"Chips",clear:"Rensa",edit:"Redigera",select:"Välj chip",types:{action:"Åtgärd","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",quickbar:"Snabbfält",spacer:"Avståndshållare",template:"Mall",weather:"Väder"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chipredigerare"}},form:{alignment_picker:{values:{center:"Centrerad",default:"Standard (början)",end:"Slutet",justify:"Anpassa",start:"Starta"}},color_picker:{values:{default:"Standardfärg"}},icon_type_picker:{values:{default:"Standard typ","entity-picture":"Enhetsbild",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Förvald information","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",name:"Namn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard",horizontal:"Horisontell",vertical:"Vertikal"}}}},Zh={card:Wh,editor:Xh},Jh={not_found:"Varlık bulunamadı"},Qh={card:{chips:{alignment:"Hizalama"},climate:{hvac_modes:"HVAC Modları",show_temperature_control:"Sıcaklık kontrolü?"},cover:{show_buttons_control:"Düğme kontrolleri?",show_position_control:"Pozisyon kontrolü?",show_tilt_position_control:"Eğim kontrolü?"},empty:{no_config_options:"Bu kartın yapılandırma seçeneği yok."},fan:{show_direction_control:"Yön kontrolü?",show_oscillate_control:"Salınım kontrolü?",show_percentage_control:"Yüzde kontrolü?"},generic:{collapsible_controls:"Kapalıyken kontrolleri daralt",color:"Renk",content_info:"İçerik",fill_container:"Alanı doldur",icon_animation:"Aktif olduğunda simgeyi hareket ettir?",icon_color:"Simge renki",icon_type:"İkon tipi",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",use_entity_picture:"Varlık resmi kullanılsın?"},humidifier:{show_target_humidity_control:"Nem kontrolü?"},light:{incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir.",show_brightness_control:"Parlaklık kontrolü?",show_color_control:"Renk kontrolü?",show_color_temp_control:"Renk ısısı kontrolü?",use_light_color:"Işık rengini kullan"},lock:{lock:"Kilitle",open:"Aç",unlock:"Kilidi aç"},"media-player":{media_controls:"Medya kontrolleri",media_controls_list:{next:"Sonraki parça",on_off:"Aç/Kapat",play_pause_stop:"Oynat/duraklat/durdur",previous:"Önceki parça",repeat:"Tekrarlama modu",shuffle:"Karışık çal"},show_volume_level:"Ses seviyesini göster",use_media_artwork:"Medya resimlerini kullan",use_media_info:"Medya bilgilerini kullan",volume_controls:"Ses seviyesi kontrolleri",volume_controls_list:{volume_buttons:"Ses butonları",volume_mute:"Sessize al",volume_set:"Ses seviyesi"}},number:{display_mode:"Görüntüleme Modu",display_mode_list:{buttons:"Butonlar",default:"Varsayılan (kayan)",slider:"Kayan"}},template:{badge_color:"Rozet rengi",badge_icon:"Rozet simgesi",content:"İçerik",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",label:"Etiket",multiline_secondary:"İkinci bilgi çok satır olsun?",picture:"Resim (ikonun yerine geçecek)",primary:"Birinci bilgi",secondary:"İkinci bilgi"},title:{subtitle:"Altbaşlık",subtitle_tap_action:"Dokunma eylemi alt başlığı",title:"Başlık",title_tap_action:"Dokunma eylemi başlığı"},update:{show_buttons_control:"Düğme kontrolü?"},vacuum:{commands:"Komutlar",commands_list:{on_off:"Aç/Kapat"}},weather:{show_conditions:"Hava koşulu?",show_temperature:"Sıcaklık?"}},chip:{"chip-picker":{add:"Chip ekle",chips:"Chipler",clear:"Temizle",edit:"Düzenle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",spacer:"Boşluk",template:"Şablon",weather:"Hava Durumu"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip düzenleyici"}},form:{alignment_picker:{values:{center:"Ortala",default:"Varsayılan hizalama",end:"Sağa yasla",justify:"İki yana yasla",start:"Sola yasla"}},color_picker:{values:{default:"Varsayılan renk"}},icon_type_picker:{values:{default:"Varsayılan tip","entity-picture":"Varlık resmi",icon:"Simge",none:"Hiçbiri"}},info_picker:{values:{default:"Varsayılan bilgi","last-changed":"Son Değişim","last-updated":"Son Güncelleme",name:"İsim",none:"None",state:"Durum"}},layout_picker:{values:{default:"Varsayılan düzen",horizontal:"Yatay düzen",vertical:"Dikey düzen"}}}},td={card:Jh,editor:Qh},ed={not_found:"Сутність не знайдено"},nd={card:{chips:{alignment:"Вирівнювання"},climate:{hvac_modes:"Режими",show_temperature_control:"Керування температурою?"},cover:{show_buttons_control:"Кнопки керування?",show_position_control:"Керування позицією?",show_tilt_position_control:"Керування нахилом?"},fan:{show_oscillate_control:"Керування повротом?",show_percentage_control:"Керування швидкістю?"},generic:{collapsible_controls:"Приховувати елементи керування коли вимкнено?",content_info:"Вміст",fill_container:"Заповнити контейнер",icon_animation:"Анімувати іконку при активації?",icon_color:"Колір іконки",icon_type:"Тип іконки",layout:"Розташування",primary_info:"Головна інформація",secondary_info:"Додаткова інформація",use_entity_picture:"Використовувати зображення сутності?"},humidifier:{show_target_humidity_control:"Керування вологістю?"},light:{incompatible_controls:"Деякі елементи керування можуть не відображатись якщо ваш пристрій не підтримує цю функцію.",show_brightness_control:"Контроль яскравості?",show_color_control:"Керування кольором світла?",show_color_temp_control:"Керування температурою світла?",use_light_color:"Використовувати колір світла"},lock:{lock:"Зачинити",open:"Відкрити",unlock:"Відчинити"},"media-player":{media_controls:"Керування медіа",media_controls_list:{next:"Наступний трек",on_off:"Увімкнути/Вимкнути",play_pause_stop:"Відтворити/пауза/стоп",previous:"Попередній трек",repeat:"Режим повторення",shuffle:"Перемішати"},show_volume_level:"Показати рівень гучності",use_media_artwork:"Використовувати зображення медіа",use_media_info:"Використовувати інформацію медіа",volume_controls:"Елементи керування гучністю",volume_controls_list:{volume_buttons:"Кнопки гучності",volume_mute:"Вимк. звук",volume_set:"Рівень гучності"}},number:{display_mode:"Відображати режим",display_mode_list:{buttons:"Кнопки",default:"За замовчуванням (повзунок)",slider:"Повзунок"}},template:{badge_color:"Колір значка",badge_icon:"Іконка значка",content:"Вміст",entity_extra:"Використовується в шаблонах та діях",multiline_secondary:"Багаторядкова додаткова інформація?",picture:"Зображення (замінить іконку)",primary:"Головна інформація",secondary:"Додаткова інформація"},title:{subtitle:"Підзаголовок",subtitle_tap_action:"Дія при дотику до підзаголовку",title:"Заголовок",title_tap_action:"Дія при дотику до заголовку"},update:{show_buttons_control:"Кнопки керування?"},vacuum:{commands:"Команди",commands_list:{on_off:"Увімкнути/Вимкнути"}},weather:{show_conditions:"Умови?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Додати міні-картку",chips:"Міні-картки",clear:"Очистити",edit:"Редагувати",select:"Обрати міні-картку",types:{action:"Дія","alarm-control-panel":"Сигналізація",back:"Назад",conditional:"Умовна",entity:"Сутність",light:"Світло",menu:"Меню",spacer:"Порожнє місце",template:"Вручну",weather:"Погода"}},conditional:{chip:"Міні-картка"},sub_element_editor:{title:"Редактор міні-карток"}},form:{alignment_picker:{values:{center:"По центру",default:"Вирівнювання за замовчуванням",end:"В кінці",justify:"Вирівняти",start:"На початку"}},color_picker:{values:{default:"Колір за замовчуванням"}},icon_type_picker:{values:{default:"За замовчуванням","entity-picture":"Зображення сутності",icon:"Іконка",none:"Нічого"}},info_picker:{values:{default:"Інформація за замовчуванням","last-changed":"Востаннє змінено","last-updated":"Востаннє оновлено",name:"Назва",none:"Нічого",state:"Стан"}},layout_picker:{values:{default:"Розташування за замовчуванням",horizontal:"Горизонтальне розташування",vertical:"Вертикальне розташування"}}}},od={card:ed,editor:nd},id={not_found:"Không tìm thấy thực thể"},rd={section:{context:"Ngữ cảnh",content:"Nội dung",features:"Tính năng",interactions:"Tương tác",layout:"Bố cục",badge:"Huy hiệu"},card:{chips:{alignment:"Căn chỉnh"},climate:{hvac_modes:"Chế độ điều hòa",show_temperature_control:"Điều khiển nhiệt độ?"},cover:{show_buttons_control:"Điều khiển nút bấm?",show_position_control:"Điều khiển vị trí?",show_tilt_position_control:"Điều khiển độ nghiêng?"},empty:{no_config_options:"Thẻ này không có tùy chọn cấu hình."},fan:{show_direction_control:"Điều khiển hướng?",show_oscillate_control:"Điều khiển xoay?",show_percentage_control:"Điều khiển phần trăm?"},generic:{entity:"Thực thể",area:"Khu vực",color:"Màu",content_info:"Nội dung",fill_container:"Làm đầy ô chứa",icon_animation:"Biểu tượng chuyển động khi kích hoạt?",icon_color:"Màu biểu tượng",icon_type:"Kiểu biểu tượng",layout:"Bố cục",primary_info:"Thông tin chính",secondary_info:"Thông tin phụ",use_entity_picture:"Dùng ảnh của thực thể?",collapsible_controls:"Thu nhỏ điều kiển khi tắt",picture:"Hình ảnh",picture_helper:"Nếu đặt, nó sẽ thay cho biểu tượng."},humidifier:{show_target_humidity_control:"Điều khiển độ ẩm?"},light:{incompatible_controls:"Một số điều khiển sẽ không được hiển thị nếu đèn của bạn không hỗ trợ tính năng đó.",show_brightness_control:"Điều khiển độ sáng?",show_color_control:"Điều khiển màu sắc?",show_color_temp_control:"Điều khiển nhiệt độ màu?",use_light_color:"Dùng màu đèn"},lock:{lock:"Khóa",open:"Mở",unlock:"Mở khóa"},"media-player":{media_controls:"Điều khiển đa phương tiện",media_controls_list:{next:"Bài tiếp theo",on_off:"Bật/tắt",play_pause_stop:"Phát/tạm dừng/dừng",previous:"Bài trước",repeat:"Chế độ lặp lại",shuffle:"Xáo trộn"},show_volume_level:"Hiện mức âm lượng",use_media_artwork:"Dùng ảnh đa phương tiện",use_media_info:"Dùng thông tin đa phương tiện",volume_controls:"Điều khiển âm lượng",volume_controls_list:{volume_buttons:"Nút âm lượng",volume_mute:"Im lặng",volume_set:"Mức âm lượng"}},number:{display_mode:"Chế độ hiển thị",display_mode_list:{buttons:"Nút",default:"Mặc định (thanh trượt)",slider:"Thanh trượt"}},template:{area_helper:"Dùng trong bản mẫu và tính năng",area:"Khu vực",badge_color:"Màu huy hiệu",badge_icon:"Biểu tượng huy hiệu",badge_text_helper:"Nếu đặt, nó sẽ thay thế biểu tượng.",badge_text:"Chữ trong huy hiệu",badge:"Huy hiệu",content:"Nội dung",entity_helper:"Dùng trong bản mẫu, tương tác và tính năng",entity_helper_legacy:"Dùng trong bản mẫu và tương tác",label:"Nhãn",layout:"Bố cục",multiline_secondary_helper:"Thẻ có thể được kéo cao lên để vừa với văn bản và không phải lúc nào cũng vừa vặn với hệ thống lưới.",multiline_secondary:"Cho phép nhiều dòng thông tin phụ",primary:"Thông tin chính",secondary:"Thông tin phụ"},title:{subtitle:"Phụ đề",subtitle_tap_action:"Hành động khi nhấp phụ đề",title:"Tiêu đề",title_tap_action:"Hành động khi nhấp tiêu đề"},update:{show_buttons_control:"Điều khiển nút bấm?"},vacuum:{commands:"Mệnh lệnh",commands_list:{on_off:"Bật/tắt"}},weather:{show_conditions:"Điều kiện?",show_temperature:"Nhiệt độ?"}},badge:{template:{label:"Nhãn",content:"Nội dung",entity_helper:"Dùng trong bản mẫu và tương tác",area_helper:"Dùng trong bản mẫu"}},chip:{"chip-picker":{add:"Thêm phỉnh",chips:"Phỉnh",clear:"Tẩy trống",edit:"Chỉnh sửa",select:"Chọn phỉnh",types:{action:"Hành động","alarm-control-panel":"Báo động",back:"Quay về",conditional:"Điều kiện",entity:"Thực thể",light:"Đèn",menu:"Trình đơn",quickbar:"Thanh nhanh",spacer:"Ngăn cách",template:"Mẫu",weather:"Thời tiết"}},conditional:{chip:"Phỉnh"},sub_element_editor:{title:"Trình soạn phỉnh"}},form:{alignment_picker:{values:{center:"Căn giữa",default:"Căn chỉnh mặc định",end:"Căn cuối",justify:"Căn hai bên",start:"Căn đầu"}},color_picker:{values:{default:"Màu mặc định"}},icon_type_picker:{values:{default:"Kiểu mặc định","entity-picture":"Ảnh thực thể",icon:"Biểu tượng",none:"Không có"}},info_picker:{values:{default:"Thông tin mặc định","last-changed":"Lần thay đổi cuối","last-updated":"Lần cập nhật cuối",name:"Tên",none:"Không có",state:"Trạng thái"}},layout_picker:{values:{default:"Bố cục mặc định",horizontal:"Bố cục ngang",vertical:"Bố cục dọc"}}}},ad={title:"Thẻ đã cập nhật",description:"Cấu hình thẻ của bạn đã được nhập thành phiên bản mới. Bạn có thể tìm thêm thông tin về thay đổi tại {link}.",post:"bài trên GitHub",revert:"Đảo ngược",ok:"Ok"},sd={card:id,editor:rd,migration:ad},ld={not_found:"未找到实体"},cd={card:{chips:{alignment:"对齐"},climate:{hvac_modes:"空调模式",show_temperature_control:"温度控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},empty:{no_config_options:"这个卡片没有可配置的选项。"},fan:{show_direction_control:"方向控制?",show_oscillate_control:"摆动控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"关闭时隐藏控制器",color:"颜色",content_info:"内容",fill_container:"填满容器",icon_animation:"激活时使用动态图标?",icon_color:"图标颜色",icon_type:"图标类型",layout:"布局",primary_info:"首要信息",secondary_info:"次要信息",use_entity_picture:"使用实体图片?"},humidifier:{show_target_humidity_control:"湿度控制?"},light:{incompatible_controls:"设备不支持的控制器将不会显示。",show_brightness_control:"亮度控制?",show_color_control:"颜色控制?",show_color_temp_control:"色温控制?",use_light_color:"使用灯光颜色"},lock:{lock:"锁定",open:"打开",unlock:"解锁"},"media-player":{media_controls:"媒体控制",media_controls_list:{next:"下一曲",on_off:"开启/关闭",play_pause_stop:"播放/暂停/停止",previous:"上一曲",repeat:"循环模式",shuffle:"随机"},show_volume_level:"显示音量大小",use_media_artwork:"使用媒体插图",use_media_info:"使用媒体信息",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按钮",volume_mute:"静音",volume_set:"音量等级"}},number:{display_mode:"显示模式",display_mode_list:{buttons:"按钮",default:"默认 (滑块)",slider:"滑块"}},template:{badge_color:"徽标颜色",badge_icon:"徽标图标",content:"内容",entity_extra:"用于模板和动作",label:"标签",multiline_secondary:"多行次要信息?",picture:"图片 (将会替代图标)",primary:"首要信息",secondary:"次要信息"},title:{subtitle:"子标题",subtitle_tap_action:"子标题点击动作",title:"标题",title_tap_action:"标题点击动作"},update:{show_buttons_control:"控制按钮?"},vacuum:{commands:"命令",commands_list:{on_off:"开/关"}},weather:{show_conditions:"条件?",show_temperature:"温度?"}},chip:{"chip-picker":{add:"添加 chip",chips:"小卡片",clear:"清除",edit:"编辑",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",quickbar:"快捷栏",spacer:"占位符",template:"模板",weather:"天气"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"Chip 编辑"}},form:{alignment_picker:{values:{center:"居中对齐",default:"默认",end:"右对齐",justify:"两端对齐",start:"左对齐"}},color_picker:{values:{default:"默认颜色"}},icon_type_picker:{values:{default:"默认类型","entity-picture":"实体图片",icon:"图标",none:"无"}},info_picker:{values:{default:"默认信息","last-changed":"变更时间","last-updated":"更新时间",name:"名称",none:"无",state:"状态"}},layout_picker:{values:{default:"默认布局",horizontal:"水平布局",vertical:"垂直布局"}}}},ud={card:ld,editor:cd},hd={not_found:"未找到實體"},dd={card:{chips:{alignment:"對齊"},climate:{hvac_modes:"空調模式",show_temperature_control:"溫度控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},fan:{show_oscillate_control:"擺頭控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"關閉時隱藏控制項",color:"顏色",content_info:"內容",fill_container:"填滿容器",icon_animation:"啟動時使用動態圖示?",icon_color:"圖示顏色",icon_type:"圖示樣式",layout:"佈局",primary_info:"主要訊息",secondary_info:"次要訊息",use_entity_picture:"使用實體圖片?"},humidifier:{show_target_humidity_control:"溼度控制?"},light:{incompatible_controls:"不會顯示裝置不支援的控制。",show_brightness_control:"亮度控制?",show_color_control:"色彩控制?",show_color_temp_control:"色溫控制?",use_light_color:"使用燈光顏色"},lock:{lock:"上鎖",open:"打開",unlock:"解鎖"},"media-player":{media_controls:"媒體控制",media_controls_list:{next:"下一首",on_off:"開啟、關閉",play_pause_stop:"播放、暫停、停止",previous:"上一首",repeat:"重複播放",shuffle:"隨機播放"},show_volume_level:"顯示音量大小",use_media_artwork:"使用媒體插圖",use_media_info:"使用媒體資訊",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_mute:"靜音",volume_set:"音量等級"}},number:{display_mode:"顯示模式",display_mode_list:{buttons:"按鈕",default:"預設 (滑桿)",slider:"滑桿"}},template:{badge_color:"角標顏色",badge_icon:"角標圖示",content:"內容",entity_extra:"用於模板與動作",label:"標籤",multiline_secondary:"多行次要訊息?",picture:"圖片 (將會取代圖示)",primary:"主要訊息",secondary:"次要訊息"},title:{subtitle:"副標題",subtitle_tap_action:"副標題點擊動作",title:"標題",title_tap_action:"標題點擊動作"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令",commands_list:{on_off:"開啟、關閉"}},weather:{show_conditions:"狀況?",show_temperature:"溫度?"}},chip:{"chip-picker":{add:"新增小卡片",chips:"小卡片",clear:"清除",edit:"編輯",select:"選擇小卡片",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",spacer:"佔位符",template:"模板",weather:"天氣"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"小卡片編輯器"}},form:{alignment_picker:{values:{center:"居中對齊",default:"預設對齊",end:"居右對齊",justify:"兩端對齊",start:"居左對齊"}},color_picker:{values:{default:"預設顏色"}},icon_type_picker:{values:{default:"預設樣式","entity-picture":"實體圖片",icon:"圖示",none:"無"}},info_picker:{values:{default:"預設訊息","last-changed":"最近變動時間","last-updated":"最近更新時間",name:"名稱",none:"無",state:"狀態"}},layout_picker:{values:{default:"預設佈局",horizontal:"水平佈局",vertical:"垂直佈局"}}}},pd={card:hd,editor:dd},fd={ar:lu,bg:hu,ca:mu,cs:yu,da:Cu,de:Su,el:zu,en:Nu,es:Du,fi:Fu,fr:qu,he:Ju,hu:nh,id:ah,it:uh,"ko-KR":ph,nb:gh,nl:kh,pl:xh,"pt-BR":Mh,"pt-PT":jh,ro:Bh,ru:Rh,sl:Object.freeze({__proto__:null,card:Kh,default:qh,editor:Yh}),sk:Gh,sv:Object.freeze({__proto__:null,card:Wh,default:Zh,editor:Xh}),tr:Object.freeze({__proto__:null,card:Jh,default:td,editor:Qh}),uk:Object.freeze({__proto__:null,card:ed,default:od,editor:nd}),vi:Object.freeze({__proto__:null,card:id,default:sd,editor:rd,migration:ad}),"zh-Hans":Object.freeze({__proto__:null,card:ld,default:ud,editor:cd}),"zh-Hant":Object.freeze({__proto__:null,card:hd,default:pd,editor:dd})};function md(t,e){try{return t.split(".").reduce((function(t,e){return t[e]}),fd[e])}catch(t){return}}function vd(t){return function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null!==(n=null==t?void 0:t.locale.language)&&void 0!==n?n:"en",r=md(e,i);if(r||(r=md(e,"en")),!r)return e;try{return new iu(r,i).format(o)}catch(t){return console.error('Error formatting message for key "'.concat(e,'" with lang "').concat(i,'":'),t),r}}}var gd=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).picture_url="",t}return or(e,za),pr(e,[{key:"render",value:function(){return ha(M||(M=Li(["\n
=t.length)return!1;var e=t[Dd];if(Bd.test(e))return!0;if("-"===e){if(t.length-Dd<2)return!1;var n=t[Dd+1];return!("-"!==n&&!Bd.test(n))}return!1}var Vd={deg:1,rad:180/Math.PI,grad:.9,turn:360};function Fd(t){var e="";if("-"!==t[Dd]&&"+"!==t[Dd]||(e+=t[Dd++]),e+=$d(t),"."===t[Dd]&&/\d/.test(t[Dd+1])&&(e+=t[Dd++]+$d(t)),"e"!==t[Dd]&&"E"!==t[Dd]||("-"!==t[Dd+1]&&"+"!==t[Dd+1]||!/\d/.test(t[Dd+2])?/\d/.test(t[Dd+1])&&(e+=t[Dd++]+$d(t)):e+=t[Dd++]+t[Dd++]+$d(t)),Ud(t)){var n=Gd(t);return"deg"===n||"rad"===n||"turn"===n||"grad"===n?{type:Hd.Hue,value:e*Vd[n]}:void 0}return"%"===t[Dd]?(Dd++,{type:Hd.Percentage,value:+e}):{type:Hd.Number,value:+e}}function $d(t){for(var e="";/\d/.test(t[Dd]);)e+=t[Dd++];return e}function Gd(t){for(var e="";Dd4)){if(4===o.length){if(o[3].type!==Hd.Alpha)return;o[3]=o[3].value}return 3===o.length&&o.push({type:Hd.None,value:void 0}),o.every((function(t){return t.type!==Hd.Alpha}))?o:void 0}}var Wd=function(t){if("string"==typeof t){for(var e=function(){var t,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim(),n=[];for(Dd=0;Dd=1?e.length-1:Math.max(Math.floor(n),0),i=e[o];return void 0===i?void 0:Xd(i[0],i[1],n-o)}}),Jd=function(t){var e=!1,n=t.map((function(t){return void 0!==t?(e=!0,t):1}));return e?n:t},Qd={mode:"rgb",channels:["r","g","b","alpha"],parse:[function(t,e){if(e&&("rgb"===e[0]||"rgba"===e[0])){var n={mode:"rgb"},o=qi(e,5),i=o[1],r=o[2],a=o[3],s=o[4];if(i.type!==Hd.Hue&&r.type!==Hd.Hue&&a.type!==Hd.Hue)return i.type!==Hd.None&&(n.r=i.type===Hd.Number?i.value/255:i.value/100),r.type!==Hd.None&&(n.g=r.type===Hd.Number?r.value/255:r.value/100),a.type!==Hd.None&&(n.b=a.type===Hd.Number?a.value/255:a.value/100),s.type!==Hd.None&&(n.alpha=Math.min(1,Math.max(0,s.type===Hd.Number?s.value:s.value/100))),n}},function(t){var e;return(e=t.match(bd))?_d(parseInt(e[1],16),e[1].length):void 0},function(t){var e,n={mode:"rgb"};if(e=t.match(Ad))void 0!==e[1]&&(n.r=e[1]/255),void 0!==e[2]&&(n.g=e[2]/255),void 0!==e[3]&&(n.b=e[3]/255);else{if(!(e=t.match(Sd)))return;void 0!==e[1]&&(n.r=e[1]/100),void 0!==e[2]&&(n.g=e[2]/100),void 0!==e[3]&&(n.b=e[3]/100)}return void 0!==e[4]?n.alpha=Math.max(0,Math.min(1,e[4]/100)):void 0!==e[5]&&(n.alpha=Math.max(0,Math.min(1,+e[5]))),n},function(t){return _d(yd[t.toLowerCase()],6)},function(t){return"transparent"===t?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0},"srgb"],serialize:"srgb",interpolate:{r:Zd,g:Zd,b:Zd,alpha:{use:Zd,fixup:Jd}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},tp=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Math.pow(Math.abs(t),563/256)*Math.sign(t)},ep=function(t){var e=tp(t.r),n=tp(t.g),o=tp(t.b),i={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*n+.1882286462349947*o,y:.297344975250536*e+.6273635662554661*n+.0752914584939979*o,z:.0270313613864123*e+.0706888525358272*n+.9913375368376386*o};return void 0!==t.alpha&&(i.alpha=t.alpha),i},np=function(t){return Math.pow(Math.abs(t),256/563)*Math.sign(t)},op=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"a98",r:np(2.0415879038107465*e-.5650069742788597*n-.3447313507783297*o),g:np(-.9692436362808798*e+1.8759675015077206*n+.0415550574071756*o),b:np(.0134442806320312*e-.1183623922310184*n+1.0151749943912058*o)};return void 0!==i&&(r.alpha=i),r},ip=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},rp=function(t){var e=t.r,n=t.g,o=t.b,i=t.alpha,r={mode:"lrgb",r:ip(e),g:ip(n),b:ip(o)};return void 0!==i&&(r.alpha=i),r},ap=function(t){var e=rp(t),n=e.r,o=e.g,i=e.b,r=e.alpha,a={mode:"xyz65",x:.4123907992659593*n+.357584339383878*o+.1804807884018343*i,y:.2126390058715102*n+.715168678767756*o+.0721923153607337*i,z:.0193308187155918*n+.119194779794626*o+.9505321522496607*i};return void 0!==r&&(a.alpha=r),a},sp=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):12.92*t},lp=function(t){var e=t.r,n=t.g,o=t.b,i=t.alpha,r={mode:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgb",r:sp(e),g:sp(n),b:sp(o)};return void 0!==i&&(r.alpha=i),r},cp=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=lp({r:3.2409699419045226*e-1.537383177570094*n-.4986107602930034*o,g:-.9692436362808796*e+1.8759675015077204*n+.0415550574071756*o,b:.0556300796969936*e-.2039769588889765*n+1.0569715142428784*o});return void 0!==i&&(r.alpha=i),r},up=Vi(Vi({},Qd),{},{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:function(t){return op(ap(t))},xyz65:op},toMode:{rgb:function(t){return cp(ep(t))},xyz65:ep}}),hp=function(t){return(t%=360)<0?t+360:t},dp=function(t){return function(t,e){return t.map((function(n,o,i){if(void 0===n)return n;var r=hp(n);return 0===o||void 0===t[o-1]?r:e(r-hp(i[o-1]))})).reduce((function(t,e){return t.length&&void 0!==e&&void 0!==t[t.length-1]?(t.push(e+t[t.length-1]),t):(t.push(e),t)}),[])}(t,(function(t){return Math.abs(t)<=180?t:t-360*Math.sign(t)}))},pp=[-.14861,1.78277,-.29227,-.90649,1.97294,0],fp=Math.PI/180,mp=180/Math.PI,vp=pp[3]*pp[4],gp=pp[1]*pp[4],_p=pp[1]*pp[2]-pp[0]*pp[3],yp=function(t,e){if(void 0===t.h||void 0===e.h||!t.s||!e.s)return 0;var n=hp(t.h),o=hp(e.h),i=Math.sin((o-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*i},bp=function(t,e){if(void 0===t.h||void 0===e.h||!t.c||!e.c)return 0;var n=hp(t.h),o=hp(e.h),i=Math.sin((o-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*i},kp=function(t){var e=t.reduce((function(t,e){if(void 0!==e){var n=e*Math.PI/180;t.sin+=Math.sin(n),t.cos+=Math.cos(n)}return t}),{sin:0,cos:0}),n=180*Math.atan2(e.sin,e.cos)/Math.PI;return n<0?360+n:n},wp={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:function(t){var e=t.r,n=t.g,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=(_p*o+e*vp-n*gp)/(_p+vp-gp),a=o-r,s=(pp[4]*(n-r)-pp[2]*a)/pp[3],l={mode:"cubehelix",l:r,s:0===r||1===r?void 0:Math.sqrt(a*a+s*s)/(pp[4]*r*(1-r))};return l.s&&(l.h=Math.atan2(s,a)*mp-120),void 0!==i&&(l.alpha=i),l}},toMode:{rgb:function(t){var e=t.h,n=t.s,o=t.l,i=t.alpha,r={mode:"rgb"};e=(void 0===e?0:e+120)*fp,void 0===o&&(o=0);var a=void 0===n?0:n*o*(1-o),s=Math.cos(e),l=Math.sin(e);return r.r=o+a*(pp[0]*s+pp[1]*l),r.g=o+a*(pp[2]*s+pp[3]*l),r.b=o+a*(pp[4]*s+pp[5]*l),void 0!==i&&(r.alpha=i),r}},interpolate:{h:{use:Zd,fixup:dp},s:Zd,l:Zd,alpha:{use:Zd,fixup:Jd}},difference:{h:yp},average:{h:kp}},Cp=function(t){var e=t.l,n=t.a,o=t.b,i=t.alpha,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lch";void 0===n&&(n=0),void 0===o&&(o=0);var a=Math.sqrt(n*n+o*o),s={mode:r,l:e,c:a};return a&&(s.h=hp(180*Math.atan2(o,n)/Math.PI)),void 0!==i&&(s.alpha=i),s},Ep=function(t){var e=t.l,n=t.c,o=t.h,i=t.alpha;void 0===o&&(o=0);var r={mode:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lab",l:e,a:n?n*Math.cos(o/180*Math.PI):0,b:n?n*Math.sin(o/180*Math.PI):0};return void 0!==i&&(r.alpha=i),r},xp=Math.pow(29,3)/Math.pow(3,3),Ap=Math.pow(6,3)/Math.pow(29,3),Sp=.3457/.3585,Tp=1,Mp=.2958/.3585,zp=.3127/.329,Op=1,Ip=.3583/.329,jp=function(t){return Math.pow(t,3)>Ap?Math.pow(t,3):(116*t-16)/xp},Pp=function(t){var e=t.l,n=t.a,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=(e+16)/116,a=r-o/200,s={mode:"xyz65",x:jp(n/500+r)*zp,y:jp(r)*Op,z:jp(a)*Ip};return void 0!==i&&(s.alpha=i),s},Np=function(t){return cp(Pp(t))},Bp=function(t){return t>Ap?Math.cbrt(t):(xp*t+16)/116},Lp=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=Bp(e/zp),a=Bp(n/Op),s={mode:"lab65",l:116*a-16,a:500*(r-a),b:200*(a-Bp(o/Ip))};return void 0!==i&&(s.alpha=i),s},Hp=function(t){var e=Lp(ap(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Dp=26/180*Math.PI,Rp=Math.cos(Dp),Up=Math.sin(Dp),Vp=100/Math.log(1.39),Fp=function(t){var e=t.l,n=t.c,o=t.h,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"lab65",l:(Math.exp(1*e/Vp)-1)/.0039},a=(Math.exp(.0435*n*1*1)-1)/.075,s=a*Math.cos(o/180*Math.PI-Dp),l=a*Math.sin(o/180*Math.PI-Dp);return r.a=s*Rp-l/.83*Up,r.b=s*Up+l/.83*Rp,void 0!==i&&(r.alpha=i),r},$p=function(t){var e=t.l,n=t.a,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=n*Rp+o*Up,a=.83*(o*Rp-n*Up),s=Math.sqrt(r*r+a*a),l={mode:"dlch",l:Vp/1*Math.log(1+.0039*e),c:Math.log(1+.075*s)/.0435};return l.c&&(l.h=hp((Math.atan2(a,r)+Dp)/Math.PI*180)),void 0!==i&&(l.alpha=i),l},Gp=function(t){return Fp(Cp(t,"dlch"))},Kp=function(t){return Ep($p(t),"dlab")},Yp={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Gp,rgb:function(t){return Np(Gp(t))}},fromMode:{lab65:Kp,rgb:function(t){return Kp(Hp(t))}},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Zd,a:Zd,b:Zd,alpha:{use:Zd,fixup:Jd}}},qp={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Fp,dlab:function(t){return Ep(t,"dlab")},rgb:function(t){return Np(Fp(t))}},fromMode:{lab65:$p,dlab:function(t){return Cp(t,"dlch")},rgb:function(t){return $p(Hp(t))}},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Zd,c:Zd,h:{use:Zd,fixup:dp},alpha:{use:Zd,fixup:Jd}},difference:{h:bp},average:{h:kp}};var Wp={mode:"hsi",toMode:{rgb:function(t){var e=t.h,n=t.s,o=t.i,i=t.alpha;e=hp(void 0!==e?e:0),void 0===n&&(n=0),void 0===o&&(o=0);var r,a=Math.abs(e/60%2-1);switch(Math.floor(e/60)){case 0:r={r:o*(1+n*(3/(2-a)-1)),g:o*(1+n*(3*(1-a)/(2-a)-1)),b:o*(1-n)};break;case 1:r={r:o*(1+n*(3*(1-a)/(2-a)-1)),g:o*(1+n*(3/(2-a)-1)),b:o*(1-n)};break;case 2:r={r:o*(1-n),g:o*(1+n*(3/(2-a)-1)),b:o*(1+n*(3*(1-a)/(2-a)-1))};break;case 3:r={r:o*(1-n),g:o*(1+n*(3*(1-a)/(2-a)-1)),b:o*(1+n*(3/(2-a)-1))};break;case 4:r={r:o*(1+n*(3*(1-a)/(2-a)-1)),g:o*(1-n),b:o*(1+n*(3/(2-a)-1))};break;case 5:r={r:o*(1+n*(3/(2-a)-1)),g:o*(1-n),b:o*(1+n*(3*(1-a)/(2-a)-1))};break;default:r={r:o*(1-n),g:o*(1-n),b:o*(1-n)}}return r.mode="rgb",void 0!==i&&(r.alpha=i),r}},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:function(t){var e=t.r,n=t.g,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=Math.max(e,n,o),a=Math.min(e,n,o),s={mode:"hsi",s:e+n+o===0?0:1-3*a/(e+n+o),i:(e+n+o)/3};return r-a!=0&&(s.h=60*(r===e?(n-o)/(r-a)+6*(n1){var i=n+o;n/=i,o/=i}return Jp({h:e,s:1===o?1:1-n/(1-o),v:1-o,alpha:t.alpha})}},fromMode:{rgb:function(t){var e=Qp(t);if(void 0!==e){var n=void 0!==e.s?e.s:0,o=void 0!==e.v?e.v:0,i={mode:"hwb",w:(1-n)*o,b:1-o};return void 0!==e.h&&(i.h=e.h),void 0!==e.alpha&&(i.alpha=e.alpha),i}}},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[function(t,e){if(e&&"hwb"===e[0]){var n={mode:"hwb"},o=qi(e,5),i=o[1],r=o[2],a=o[3],s=o[4];if(i.type!==Hd.None){if(i.type===Hd.Percentage)return;n.h=i.value}if(r.type!==Hd.None){if(r.type===Hd.Hue)return;n.w=r.value/100}if(a.type!==Hd.None){if(a.type===Hd.Hue)return;n.b=a.value/100}return s.type!==Hd.None&&(n.alpha=Math.min(1,Math.max(0,s.type===Hd.Number?s.value:s.value/100))),n}}],serialize:function(t){return"hwb(".concat(void 0!==t.h?t.h:"none"," ").concat(void 0!==t.w?100*t.w+"%":"none"," ").concat(void 0!==t.b?100*t.b+"%":"none").concat(t.alpha<1?" / ".concat(t.alpha):"",")")},interpolate:{h:{use:Zd,fixup:dp},w:Zd,b:Zd,alpha:{use:Zd,fixup:Jd}},difference:{h:function(t,e){if(void 0===t.h||void 0===e.h)return 0;var n=hp(t.h),o=hp(e.h);return Math.abs(o-n)>180?n-(o-360*Math.sign(o-n)):o-n}},average:{h:kp}},nf=.1593017578125,of=78.84375,rf=.8359375,af=18.8515625,sf=18.6875;function lf(t){if(t<0)return 0;var e=Math.pow(t,1/of);return 1e4*Math.pow(Math.max(0,e-rf)/(af-sf*e),1/nf)}function cf(t){if(t<0)return 0;var e=Math.pow(t/1e4,nf);return Math.pow((rf+af*e)/(1+sf*e),of)}var uf=function(t){return Math.max(t/203,0)},hf=function(t){var e=t.i,n=t.t,o=t.p,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=lf(e+.008609037037932761*n+.11102962500302593*o),a=lf(e-.00860903703793275*n-.11102962500302599*o),s=lf(e+.5600313357106791*n-.32062717498731885*o),l={mode:"xyz65",x:uf(2.070152218389422*r-1.3263473389671556*a+.2066510476294051*s),y:uf(.3647385209748074*r+.680566024947227*a-.0453045459220346*s),z:uf(-.049747207535812*r-.0492609666966138*a+1.1880659249923042*s)};return void 0!==i&&(l.alpha=i),l},df=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Math.max(203*t,0)},pf=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha,r=df(e),a=df(n),s=df(o),l=cf(.3592832590121217*r+.6976051147779502*a-.0358915932320289*s),c=cf(-.1920808463704995*r+1.1004767970374323*a+.0753748658519118*s),u=cf(.0070797844607477*r+.0748396662186366*a+.8433265453898765*s),h={mode:"itp",i:.5*l+.5*c,t:1.61376953125*l-3.323486328125*c+1.709716796875*u,p:4.378173828125*l-4.24560546875*c-.132568359375*u};return void 0!==i&&(h.alpha=i),h},ff={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:hf,rgb:function(t){return cp(hf(t))}},fromMode:{xyz65:pf,rgb:function(t){return pf(ap(t))}},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Zd,t:Zd,p:Zd,alpha:{use:Zd,fixup:Jd}}},mf=function(t){if(t<0)return 0;var e=Math.pow(t/1e4,nf);return Math.pow((rf+af*e)/(1+sf*e),134.03437499999998)},vf=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Math.max(203*t,0)},gf=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;e=vf(e),n=vf(n);var r=1.15*e-.15*(o=vf(o)),a=.66*n+.34*e,s=mf(.41478972*r+.579999*a+.014648*o),l=mf(-.20151*r+1.120649*a+.0531008*o),c=mf(-.0166008*r+.2648*a+.6684799*o),u=(s+l)/2,h={mode:"jab",j:.44*u/(1-.56*u)-16295499532821565e-27,a:3.524*s-4.066708*l+.542708*c,b:.199076*s+1.096799*l-1.295875*c};return void 0!==i&&(h.alpha=i),h},_f=16295499532821565e-27,yf=function(t){if(t<0)return 0;var e=Math.pow(t,.007460772656268216);return 1e4*Math.pow((rf-e)/(sf*e-af),1/nf)},bf=function(t){return t/203},kf=function(t){var e=t.j,n=t.a,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=(e+_f)/(.44+.56*(e+_f)),a=yf(r+.13860504*n+.058047316*o),s=yf(r-.13860504*n-.058047316*o),l=yf(r-.096019242*n-.8118919*o),c={mode:"xyz65",x:bf(1.661373024652174*a-.914523081304348*s+.23136208173913045*l),y:bf(-.3250758611844533*a+1.571847026732543*s-.21825383453227928*l),z:bf(-.090982811*a-.31272829*s+1.5227666*l)};return void 0!==i&&(c.alpha=i),c},wf=function(t){var e=gf(ap(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Cf=function(t){return cp(kf(t))},Ef={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:wf,xyz65:gf},toMode:{rgb:Cf,xyz65:kf},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Zd,a:Zd,b:Zd,alpha:{use:Zd,fixup:Jd}}},xf=function(t){var e=t.j,n=t.a,o=t.b,i=t.alpha;void 0===n&&(n=0),void 0===o&&(o=0);var r=Math.sqrt(n*n+o*o),a={mode:"jch",j:e,c:r};return r&&(a.h=hp(180*Math.atan2(o,n)/Math.PI)),void 0!==i&&(a.alpha=i),a},Af=function(t){var e=t.j,n=t.c,o=t.h,i=t.alpha;void 0===o&&(o=0);var r={mode:"jab",j:e,a:n?n*Math.cos(o/180*Math.PI):0,b:n?n*Math.sin(o/180*Math.PI):0};return void 0!==i&&(r.alpha=i),r},Sf={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Af,rgb:function(t){return Cf(Af(t))}},fromMode:{rgb:function(t){return xf(wf(t))},jab:xf},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Zd,fixup:dp},c:Zd,j:Zd,alpha:{use:Zd,fixup:Jd}},difference:{h:bp},average:{h:kp}},Tf=Math.pow(29,3)/Math.pow(3,3),Mf=Math.pow(6,3)/Math.pow(29,3),zf=function(t){return Math.pow(t,3)>Mf?Math.pow(t,3):(116*t-16)/Tf},Of=function(t){var e=t.l,n=t.a,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=(e+16)/116,a=r-o/200,s={mode:"xyz50",x:zf(n/500+r)*Sp,y:zf(r)*Tp,z:zf(a)*Mp};return void 0!==i&&(s.alpha=i),s},If=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=lp({r:3.1341359569958707*e-1.6173863321612538*n-.4906619460083532*o,g:-.978795502912089*e+1.916254567259524*n+.03344273116131949*o,b:.07195537988411677*e-.2289768264158322*n+1.405386058324125*o});return void 0!==i&&(r.alpha=i),r},jf=function(t){return If(Of(t))},Pf=function(t){var e=rp(t),n=e.r,o=e.g,i=e.b,r=e.alpha,a={mode:"xyz50",x:.436065742824811*n+.3851514688337912*o+.14307845442264197*i,y:.22249319175623702*n+.7168870538238823*o+.06061979053616537*i,z:.013923904500943465*n+.09708128566574634*o+.7140993584005155*i};return void 0!==r&&(a.alpha=r),a},Nf=function(t){return t>Mf?Math.cbrt(t):(Tf*t+16)/116},Bf=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=Nf(e/Sp),a=Nf(n/Tp),s={mode:"lab",l:116*a-16,a:500*(r-a),b:200*(a-Nf(o/Mp))};return void 0!==i&&(s.alpha=i),s},Lf=function(t){var e=Bf(Pf(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};var Hf={mode:"lab",toMode:{xyz50:Of,rgb:jf},fromMode:{xyz50:Bf,rgb:Lf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[function(t,e){if(e&&"lab"===e[0]){var n={mode:"lab"},o=qi(e,5),i=o[1],r=o[2],a=o[3],s=o[4];if(i.type!==Hd.Hue&&r.type!==Hd.Hue&&a.type!==Hd.Hue)return i.type!==Hd.None&&(n.l=Math.min(Math.max(0,i.value),100)),r.type!==Hd.None&&(n.a=r.type===Hd.Number?r.value:125*r.value/100),a.type!==Hd.None&&(n.b=a.type===Hd.Number?a.value:125*a.value/100),s.type!==Hd.None&&(n.alpha=Math.min(1,Math.max(0,s.type===Hd.Number?s.value:s.value/100))),n}}],serialize:function(t){return"lab(".concat(void 0!==t.l?t.l:"none"," ").concat(void 0!==t.a?t.a:"none"," ").concat(void 0!==t.b?t.b:"none").concat(t.alpha<1?" / ".concat(t.alpha):"",")")},interpolate:{l:Zd,a:Zd,b:Zd,alpha:{use:Zd,fixup:Jd}}},Df=Vi(Vi({},Hf),{},{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Pp,rgb:Np},fromMode:{xyz65:Lp,rgb:Hp},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});var Rf={mode:"lch",toMode:{lab:Ep,rgb:function(t){return jf(Ep(t))}},fromMode:{rgb:function(t){return Cp(Lf(t))},lab:Cp},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[function(t,e){if(e&&"lch"===e[0]){var n={mode:"lch"},o=qi(e,5),i=o[1],r=o[2],a=o[3],s=o[4];if(i.type!==Hd.None){if(i.type===Hd.Hue)return;n.l=Math.min(Math.max(0,i.value),100)}if(r.type!==Hd.None&&(n.c=Math.max(0,r.type===Hd.Number?r.value:150*r.value/100)),a.type!==Hd.None){if(a.type===Hd.Percentage)return;n.h=a.value}return s.type!==Hd.None&&(n.alpha=Math.min(1,Math.max(0,s.type===Hd.Number?s.value:s.value/100))),n}}],serialize:function(t){return"lch(".concat(void 0!==t.l?t.l:"none"," ").concat(void 0!==t.c?t.c:"none"," ").concat(void 0!==t.h?t.h:"none").concat(t.alpha<1?" / ".concat(t.alpha):"",")")},interpolate:{h:{use:Zd,fixup:dp},c:Zd,l:Zd,alpha:{use:Zd,fixup:Jd}},difference:{h:bp},average:{h:kp}},Uf=Vi(Vi({},Rf),{},{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:function(t){return Ep(t,"lab65")},rgb:function(t){return Np(Ep(t,"lab65"))}},fromMode:{rgb:function(t){return Cp(Hp(t),"lch65")},lab65:function(t){return Cp(t,"lch65")}},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Vf=function(t){var e=t.l,n=t.u,o=t.v,i=t.alpha;void 0===n&&(n=0),void 0===o&&(o=0);var r=Math.sqrt(n*n+o*o),a={mode:"lchuv",l:e,c:r};return r&&(a.h=hp(180*Math.atan2(o,n)/Math.PI)),void 0!==i&&(a.alpha=i),a},Ff=function(t){var e=t.l,n=t.c,o=t.h,i=t.alpha;void 0===o&&(o=0);var r={mode:"luv",l:e,u:n?n*Math.cos(o/180*Math.PI):0,v:n?n*Math.sin(o/180*Math.PI):0};return void 0!==i&&(r.alpha=i),r},$f=function(t,e,n){return 4*t/(t+15*e+3*n)},Gf=function(t,e,n){return 9*e/(t+15*e+3*n)},Kf=$f(Sp,Tp,Mp),Yf=Gf(Sp,Tp,Mp),qf=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r,a=(r=n/Tp)<=Mf?Tf*r:116*Math.cbrt(r)-16,s=$f(e,n,o),l=Gf(e,n,o);isFinite(s)&&isFinite(l)?(s=13*a*(s-Kf),l=13*a*(l-Yf)):a=s=l=0;var c={mode:"luv",l:a,u:s,v:l};return void 0!==i&&(c.alpha=i),c},Wf=function(t,e,n){return 4*t/(t+15*e+3*n)}(Sp,Tp,Mp),Xf=function(t,e,n){return 9*e/(t+15*e+3*n)}(Sp,Tp,Mp),Zf=function(t){var e=t.l,n=t.u,o=t.v,i=t.alpha;if(void 0===e&&(e=0),0===e)return{mode:"xyz50",x:0,y:0,z:0};void 0===n&&(n=0),void 0===o&&(o=0);var r=n/(13*e)+Wf,a=o/(13*e)+Xf,s=Tp*(e<=8?e/Tf:Math.pow((e+16)/116,3)),l={mode:"xyz50",x:s*(9*r)/(4*a),y:s,z:s*(12-3*r-20*a)/(4*a)};return void 0!==i&&(l.alpha=i),l},Jf={mode:"lchuv",toMode:{luv:Ff,rgb:function(t){return If(Zf(Ff(t)))}},fromMode:{rgb:function(t){return Vf(qf(Pf(t)))},luv:Vf},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Zd,fixup:dp},c:Zd,l:Zd,alpha:{use:Zd,fixup:Jd}},difference:{h:bp},average:{h:kp}},Qf=Vi(Vi({},Qd),{},{mode:"lrgb",toMode:{rgb:lp},fromMode:{rgb:rp},parse:["srgb-linear"],serialize:"srgb-linear"}),tm={mode:"luv",toMode:{xyz50:Zf,rgb:function(t){return If(Zf(t))}},fromMode:{xyz50:qf,rgb:function(t){return qf(Pf(t))}},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Zd,u:Zd,v:Zd,alpha:{use:Zd,fixup:Jd}}},em=function(t){var e=t.r,n=t.g,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=Math.cbrt(.412221469470763*e+.5363325372617348*n+.0514459932675022*o),a=Math.cbrt(.2119034958178252*e+.6806995506452344*n+.1073969535369406*o),s=Math.cbrt(.0883024591900564*e+.2817188391361215*n+.6299787016738222*o),l={mode:"oklab",l:.210454268309314*r+.7936177747023054*a-.0040720430116193*s,a:1.9779985324311684*r-2.42859224204858*a+.450593709617411*s,b:.0259040424655478*r+.7827717124575296*a-.8086757549230774*s};return void 0!==i&&(l.alpha=i),l},nm=function(t){var e=em(rp(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},om=function(t){var e=t.l,n=t.a,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=Math.pow(e+.3963377773761749*n+.2158037573099136*o,3),a=Math.pow(e-.1055613458156586*n-.0638541728258133*o,3),s=Math.pow(e-.0894841775298119*n-1.2914855480194092*o,3),l={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*a+.2309699031821044*s,g:-1.2684379732850317*r+2.6097573492876887*a-.3413193760026573*s,b:-.0041960761386756*r-.7034186179359362*a+1.7076146940746117*s};return void 0!==i&&(l.alpha=i),l},im=function(t){return lp(om(t))};function rm(t){var e=.206,n=1.206/1.03;return.5*(n*t-e+Math.sqrt((n*t-e)*(n*t-e)+.12*n*t))}function am(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function sm(t,e){var n=function(t,e){var n,o,i,r,a,s,l,c;-1.88170328*t-.80936493*e>1?(n=1.19086277,o=1.76576728,i=.59662641,r=.75515197,a=.56771245,s=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(n=.73956515,o=-.45954404,i=.08285427,r=.1254107,a=.14503204,s=-1.2684380046,l=2.6097574011,c=-.3413193965):(n=1.35733652,o=-.00915799,i=-1.1513021,r=-.50559606,a=.00692167,s=-.0041960863,l=-.7034186147,c=1.707614701);var u=n+o*t+i*e+r*t*t+a*t*e,h=.3963377774*t+.2158037573*e,d=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e,f=1+u*h,m=1+u*d,v=1+u*p,g=s*(f*f*f)+l*(m*m*m)+c*(v*v*v),_=s*(3*h*f*f)+l*(3*d*m*m)+c*(3*p*v*v);return u-g*_/(_*_-.5*g*(s*(6*h*h*f)+l*(6*d*d*m)+c*(6*p*p*v)))}(t,e),o=om({l:1,a:n*t,b:n*e}),i=Math.cbrt(1/Math.max(o.r,o.g,o.b));return[i,i*n]}function lm(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n||(n=sm(t,e));var o=n[0],i=n[1];return[i/o,i/(1-o)]}function cm(t,e,n){var o=sm(e,n),i=function(t,e,n,o,i){var r,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(a||(a=sm(t,e)),(n-i)*a[1]-(a[0]-i)*o<=0)r=a[1]*i/(o*a[0]+a[1]*(i-n));else{var s=n-i,l=.3963377774*t+.2158037573*e,c=-.1055613458*t-.0638541728*e,u=-.0894841775*t-1.291485548*e,h=s+o*l,d=s+o*c,p=s+o*u,f=i*(1-(r=a[1]*(i-1)/(o*(a[0]-1)+a[1]*(i-n))))+r*n,m=r*o,v=f+m*l,g=f+m*c,_=f+m*u,y=v*v*v,b=g*g*g,k=_*_*_,w=3*h*v*v,C=3*d*g*g,E=3*p*_*_,x=6*h*h*v,A=6*d*d*g,S=6*p*p*_,T=4.0767416621*y-3.3077115913*b+.2309699292*k-1,M=4.0767416621*w-3.3077115913*C+.2309699292*E,z=M/(M*M-.5*T*(4.0767416621*x-3.3077115913*A+.2309699292*S)),O=-T*z,I=-1.2684380046*y+2.6097574011*b-.3413193965*k-1,j=-1.2684380046*w+2.6097574011*C-.3413193965*E,P=j/(j*j-.5*I*(-1.2684380046*x+2.6097574011*A-.3413193965*S)),N=-I*P,B=-.0041960863*y-.7034186147*b+1.707614701*k-1,L=-.0041960863*w-.7034186147*C+1.707614701*E,H=L/(L*L-.5*B*(-.0041960863*x-.7034186147*A+1.707614701*S)),D=-B*H;O=z>=0?O:1e6,N=P>=0?N:1e6,D=H>=0?D:1e6,r+=Math.min(O,Math.min(N,D))}return r}(e,n,t,1,t,o),r=lm(e,n,o),a=t*(.11516993+1/(7.4477897+4.1590124*n+e*(1.75198401*n-2.19557347+e*(-2.13704948-10.02301043*n+e*(5.38770819*n-4.24894561+4.69891013*e))))),s=(1-t)*(.11239642+1/(1.6132032-.68124379*n+e*(.40370612+.90148123*n+e*(.6122399*n-.27087943+e*(.00299215-.45399568*n-.14661872*e))))),l=.9*(i/Math.min(t*r[0],(1-t)*r[1]))*Math.sqrt(Math.sqrt(1/(1/(a*a*a*a)+1/(s*s*s*s))));return a=.4*t,s=.8*(1-t),[Math.sqrt(1/(1/(a*a)+1/(s*s))),l,i]}function um(t){var e=void 0!==t.l?t.l:0,n=void 0!==t.a?t.a:0,o=void 0!==t.b?t.b:0,i={mode:"okhsl",l:rm(e)};void 0!==t.alpha&&(i.alpha=t.alpha);var r=Math.sqrt(n*n+o*o);if(!r)return i.s=0,i;var a,s=qi(cm(e,n/r,o/r),3),l=s[0],c=s[1],u=s[2];if(r=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},wm=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"prophoto",r:km(1.3457868816471585*e-.2555720873797946*n-.0511018649755453*o),g:km(-.5446307051249019*e+1.5082477428451466*n+.0205274474364214*o),b:km(0*e+0*n+1.2119675456389452*o)};return void 0!==i&&(r.alpha=i),r},Cm=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},Em=function(t){var e=Cm(t.r),n=Cm(t.g),o=Cm(t.b),i={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*n+.0313477341283922*o,y:.2880748288194013*e+.7118352342418731*n+899369387256e-16*o,z:0*e+0*n+.8251046025104602*o};return void 0!==t.alpha&&(i.alpha=t.alpha),i},xm=Vi(Vi({},Qd),{},{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:wm,rgb:function(t){return wm(Pf(t))}},toMode:{xyz50:Em,rgb:function(t){return If(Em(t))}}}),Am=1.09929682680944,Sm=function(t){var e=Math.abs(t);return e>.018053968510807?(Math.sign(t)||1)*(Am*Math.pow(e,.45)-(Am-1)):4.5*t},Tm=function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"rec2020",r:Sm(1.7166511879712683*e-.3556707837763925*n-.2533662813736599*o),g:Sm(-.6666843518324893*e+1.6164812366349395*n+.0157685458139111*o),b:Sm(.0176398574453108*e-.0427706132578085*n+.9421031212354739*o)};return void 0!==i&&(r.alpha=i),r},Mm=1.09929682680944,zm=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=Math.abs(t);return e<.08124285829863151?t/4.5:(Math.sign(t)||1)*Math.pow((e+Mm-1)/Mm,1/.45)},Om=function(t){var e=zm(t.r),n=zm(t.g),o=zm(t.b),i={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*n+.1688809751641721*o,y:.262700212011267*e+.6779980715188708*n+.059301716469862*o,z:0*e+.0280726930490874*n+1.0609850577107909*o};return void 0!==t.alpha&&(i.alpha=t.alpha),i},Im=Vi(Vi({},Qd),{},{mode:"rec2020",fromMode:{xyz65:Tm,rgb:function(t){return Tm(ap(t))}},toMode:{xyz65:Om,rgb:function(t){return cp(Om(t))}},parse:["rec2020"],serialize:"rec2020"}),jm=.0037930732552754493,Pm=Math.cbrt(jm),Nm=function(t){return Math.cbrt(t)-Pm},Bm=function(t){return Math.pow(t+Pm,3)},Lm={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:function(t){var e=t.x,n=t.y,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r=Bm(e+n)-jm,a=Bm(n-e)-jm,s=Bm(o+n)-jm,l=lp({r:11.031566904639861*r-9.866943908131562*a-.16462299650829934*s,g:-3.2541473810744237*r+4.418770377582723*a-.16462299650829934*s,b:-3.6588512867136815*r+2.7129230459360922*a+1.9459282407775895*s});return void 0!==i&&(l.alpha=i),l}},fromMode:{rgb:function(t){var e=rp(t),n=e.r,o=e.g,i=e.b,r=e.alpha,a=Nm(.3*n+.622*o+.078*i+jm),s=Nm(.23*n+.692*o+.078*i+jm),l={mode:"xyb",x:(a-s)/2,y:(a+s)/2,b:Nm(.2434226892454782*n+.2047674442449682*o+.5518098665095535*i+jm)-(a+s)/2};return void 0!==r&&(l.alpha=r),l}},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Zd,y:Zd,b:Zd,alpha:{use:Zd,fixup:Jd}}},Hm={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:If,lab:Bf},fromMode:{rgb:Pf,lab:Of},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Zd,y:Zd,z:Zd,alpha:{use:Zd,fixup:Jd}}},Dm={mode:"xyz65",toMode:{rgb:cp,xyz50:function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*n-.0501922295431356*o,y:.0296278156881593*e+.990434484573249*n-.0170738250293851*o,z:-.0092430581525912*e+.0150551448965779*n+.7518742899580008*o};return void 0!==i&&(r.alpha=i),r}},fromMode:{rgb:ap,xyz50:function(t){var e=t.x,n=t.y,o=t.z,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*n+.0632593086610217*o,y:-.0283697069632081*e+1.0099954580058226*n+.021041398966943*o,z:.0123140016883199*e-.0205076964334779*n+1.3303659366080753*o};return void 0!==i&&(r.alpha=i),r}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:Zd,y:Zd,z:Zd,alpha:{use:Zd,fixup:Jd}}},Rm={mode:"yiq",toMode:{rgb:function(t){var e=t.y,n=t.i,o=t.q,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"rgb",r:e+.95608445*n+.6208885*o,g:e-.27137664*n-.6486059*o,b:e-1.10561724*n+1.70250126*o};return void 0!==i&&(r.alpha=i),r}},fromMode:{rgb:function(t){var e=t.r,n=t.g,o=t.b,i=t.alpha;void 0===e&&(e=0),void 0===n&&(n=0),void 0===o&&(o=0);var r={mode:"yiq",y:.29889531*e+.58662247*n+.11448223*o,i:.59597799*e-.2741761*n-.32180189*o,q:.21147017*e-.52261711*n+.31114694*o};return void 0!==i&&(r.alpha=i),r}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Zd,i:Zd,q:Zd,alpha:{use:Zd,fixup:Jd}}};Pd(up),Pd(wp),Pd(Yp),Pd(qp),Pd(Wp),Pd(Zp);var Um=Pd(tf);Pd(ef),Pd(ff),Pd(Ef),Pd(Sf),Pd(Hf),Pd(Df);var Vm=Pd(Rf);Pd(Uf),Pd(Jf),Pd(Qf),Pd(tm),Pd(dm),Pd(mm),Pd(vm),Pd(gm),Pd(bm),Pd(xm),Pd(Im);var Fm=Pd(Qd);Pd(Lm),Pd(Hm),Pd(Dm),Pd(Rm);var $m=["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white","disabled"];function Gm(t){if("primary"===t||"accent"===t)return"var(--rgb-".concat(t,"-color)");if($m.includes(t))return"var(--rgb-".concat(t,")");if(t.startsWith("#"))try{var e=Fm(t);if(e){var n=e.r,o=e.g,i=e.b;return"".concat(Math.round(255*n),", ").concat(Math.round(255*o),", ").concat(Math.round(255*i))}return""}catch(t){return""}return t}var Km=Tr(O||(O=Li(["\n --default-red: 244, 67, 54;\n --default-pink: 233, 30, 99;\n --default-purple: 146, 107, 199;\n --default-deep-purple: 110, 65, 171;\n --default-indigo: 63, 81, 181;\n --default-blue: 33, 150, 243;\n --default-light-blue: 3, 169, 244;\n --default-cyan: 0, 188, 212;\n --default-teal: 0, 150, 136;\n --default-green: 76, 175, 80;\n --default-light-green: 139, 195, 74;\n --default-lime: 205, 220, 57;\n --default-yellow: 255, 235, 59;\n --default-amber: 255, 193, 7;\n --default-orange: 255, 152, 0;\n --default-deep-orange: 255, 111, 34;\n --default-brown: 121, 85, 72;\n --default-light-grey: 189, 189, 189;\n --default-grey: 158, 158, 158;\n --default-dark-grey: 96, 96, 96;\n --default-blue-grey: 96, 125, 139;\n --default-black: 0, 0, 0;\n --default-white: 255, 255, 255;\n --default-disabled: 189, 189, 189;\n"]))),Ym=Tr(I||(I=Li(["\n --default-disabled: 111, 111, 111;\n"]))),qm=Tr(j||(j=Li(['\n --spacing: var(--mush-spacing, 10px);\n\n /* Title */\n --title-padding: var(--mush-title-padding, 24px 12px 8px);\n --title-spacing: var(--mush-title-spacing, 8px);\n --title-font-size: var(--mush-title-font-size, 24px);\n --title-font-weight: var(--mush-title-font-weight, normal);\n --title-line-height: var(--mush-title-line-height, 32px);\n --title-color: var(--mush-title-color, var(--primary-text-color));\n --title-letter-spacing: var(--mush-title-letter-spacing, -0.288px);\n --subtitle-font-size: var(--mush-subtitle-font-size, 16px);\n --subtitle-font-weight: var(--mush-subtitle-font-weight, normal);\n --subtitle-line-height: var(--mush-subtitle-line-height, 24px);\n --subtitle-color: var(--mush-subtitle-color, var(--secondary-text-color));\n --subtitle-letter-spacing: var(--mush-subtitle-letter-spacing, 0px);\n\n /* Card */\n --card-primary-font-size: var(--mush-card-primary-font-size, 14px);\n --card-secondary-font-size: var(--mush-card-secondary-font-size, 12px);\n --card-primary-font-weight: var(--mush-card-primary-font-weight, 500);\n --card-secondary-font-weight: var(--mush-card-secondary-font-weight, 400);\n --card-primary-line-height: var(--mush-card-primary-line-height, 20px);\n --card-secondary-line-height: var(--mush-card-secondary-line-height, 16px);\n --card-primary-color: var(\n --mush-card-primary-color,\n var(--primary-text-color)\n );\n --card-secondary-color: var(\n --mush-card-secondary-color,\n var(--primary-text-color)\n );\n --card-primary-letter-spacing: var(--mush-card-primary-letter-spacing, 0.1px);\n --card-secondary-letter-spacing: var(\n --mush-card-secondary-letter-spacing,\n 0.4px\n );\n\n /* Chips */\n --chip-spacing: var(--mush-chip-spacing, 8px);\n --chip-padding: var(--mush-chip-padding, 0 0.25em);\n --chip-height: var(--mush-chip-height, 36px);\n --chip-border-radius: var(--mush-chip-border-radius, 19px);\n --chip-border-width: var(\n --mush-chip-border-width,\n var(--ha-card-border-width, 1px)\n );\n --chip-border-color: var(\n --mush-chip-border-color,\n var(--ha-card-border-color, var(--divider-color))\n );\n --chip-box-shadow: var(\n --mush-chip-box-shadow,\n var(--ha-card-box-shadow, "none")\n );\n --chip-font-size: var(--mush-chip-font-size, 0.3em);\n --chip-font-weight: var(--mush-chip-font-weight, bold);\n --chip-icon-size: var(--mush-chip-icon-size, 0.5em);\n --chip-avatar-padding: var(--mush-chip-avatar-padding, 0.1em);\n --chip-avatar-border-radius: var(--mush-chip-avatar-border-radius, 50%);\n --chip-background: var(\n --mush-chip-background,\n var(--ha-card-background, var(--card-background-color, white))\n );\n /* Controls */\n --control-border-radius: var(--mush-control-border-radius, 12px);\n --control-height: var(--mush-control-height, 42px);\n --control-button-ratio: var(--mush-control-button-ratio, 1);\n --control-icon-size: var(--mush-control-icon-size, 0.5em);\n --control-spacing: var(--mush-control-spacing, 12px);\n\n /* Slider */\n --slider-threshold: var(--mush-slider-threshold);\n\n /* Input Number */\n --input-number-debounce: var(--mush-input-number-debounce);\n\n /* Layout */\n --layout-align: var(--mush-layout-align, center);\n\n /* Badge */\n --badge-size: var(--mush-badge-size, 16px);\n --badge-icon-size: var(--mush-badge-icon-size, 0.75em);\n --badge-border-radius: var(--mush-badge-border-radius, 50%);\n\n /* Icon */\n --icon-border-radius: var(--mush-icon-border-radius, 50%);\n --icon-size: var(--mush-icon-size, 36px);\n --icon-symbol-size: var(--mush-icon-symbol-size, 0.667em);\n']))),Wm=Tr(P||(P=Li(["\n /* RGB */\n /* Standard colors */\n --rgb-red: var(--mush-rgb-red, var(--default-red));\n --rgb-pink: var(--mush-rgb-pink, var(--default-pink));\n --rgb-purple: var(--mush-rgb-purple, var(--default-purple));\n --rgb-deep-purple: var(--mush-rgb-deep-purple, var(--default-deep-purple));\n --rgb-indigo: var(--mush-rgb-indigo, var(--default-indigo));\n --rgb-blue: var(--mush-rgb-blue, var(--default-blue));\n --rgb-light-blue: var(--mush-rgb-light-blue, var(--default-light-blue));\n --rgb-cyan: var(--mush-rgb-cyan, var(--default-cyan));\n --rgb-teal: var(--mush-rgb-teal, var(--default-teal));\n --rgb-green: var(--mush-rgb-green, var(--default-green));\n --rgb-light-green: var(--mush-rgb-light-green, var(--default-light-green));\n --rgb-lime: var(--mush-rgb-lime, var(--default-lime));\n --rgb-yellow: var(--mush-rgb-yellow, var(--default-yellow));\n --rgb-amber: var(--mush-rgb-amber, var(--default-amber));\n --rgb-orange: var(--mush-rgb-orange, var(--default-orange));\n --rgb-deep-orange: var(--mush-rgb-deep-orange, var(--default-deep-orange));\n --rgb-brown: var(--mush-rgb-brown, var(--default-brown));\n --rgb-light-grey: var(--mush-rgb-light-grey, var(--default-light-grey));\n --rgb-grey: var(--mush-rgb-grey, var(--default-grey));\n --rgb-dark-grey: var(--mush-rgb-dark-grey, var(--default-dark-grey));\n --rgb-blue-grey: var(--mush-rgb-blue-grey, var(--default-blue-grey));\n --rgb-black: var(--mush-rgb-black, var(--default-black));\n --rgb-white: var(--mush-rgb-white, var(--default-white));\n --rgb-disabled: var(--mush-rgb-disabled, var(--default-disabled));\n\n /* Action colors */\n --rgb-info: var(--mush-rgb-info, var(--rgb-blue));\n --rgb-success: var(--mush-rgb-success, var(--rgb-green));\n --rgb-warning: var(--mush-rgb-warning, var(--rgb-orange));\n --rgb-danger: var(--mush-rgb-danger, var(--rgb-red));\n\n /* State colors */\n --rgb-state-vacuum: var(--mush-rgb-state-vacuum, var(--rgb-teal));\n --rgb-state-fan: var(--mush-rgb-state-fan, var(--rgb-green));\n --rgb-state-light: var(--mush-rgb-state-light, var(--rgb-orange));\n --rgb-state-entity: var(--mush-rgb-state-entity, var(--rgb-blue));\n --rgb-state-media-player: var(\n --mush-rgb-state-media-player,\n var(--rgb-indigo)\n );\n --rgb-state-lock: var(--mush-rgb-state-lock, var(--rgb-blue));\n --rgb-state-number: var(--mush-rgb-state-number, var(--rgb-blue));\n --rgb-state-humidifier: var(--mush-rgb-state-humidifier, var(--rgb-purple));\n\n /* State alarm colors */\n --rgb-state-alarm-disarmed: var(\n --mush-rgb-state-alarm-disarmed,\n var(--rgb-info)\n );\n --rgb-state-alarm-armed: var(\n --mush-rgb-state-alarm-armed,\n var(--rgb-success)\n );\n --rgb-state-alarm-triggered: var(\n --mush-rgb-state-alarm-triggered,\n var(--rgb-danger)\n );\n\n /* State person colors */\n --rgb-state-person-home: var(\n --mush-rgb-state-person-home,\n var(--rgb-success)\n );\n --rgb-state-person-not-home: var(\n --mush-rgb-state-person-not-home,\n var(--rgb-danger)\n );\n --rgb-state-person-zone: var(--mush-rgb-state-person-zone, var(--rgb-info));\n --rgb-state-person-unknown: var(\n --mush-rgb-state-person-unknown,\n var(--rgb-grey)\n );\n\n /* State update colors */\n --rgb-state-update-on: var(--mush-rgb-state-update-on, var(--rgb-orange));\n --rgb-state-update-off: var(--mush-rgb-update-off, var(--rgb-green));\n --rgb-state-update-installing: var(\n --mush-rgb-update-installing,\n var(--rgb-blue)\n );\n\n /* State lock colors */\n --rgb-state-lock-locked: var(--mush-rgb-state-lock-locked, var(--rgb-green));\n --rgb-state-lock-unlocked: var(\n --mush-rgb-state-lock-unlocked,\n var(--rgb-red)\n );\n --rgb-state-lock-pending: var(\n --mush-rgb-state-lock-pending,\n var(--rgb-orange)\n );\n\n /* State cover colors */\n --rgb-state-cover-open: var(--mush-rgb-state-cover-open, var(--rgb-blue));\n --rgb-state-cover-closed: var(\n --mush-rgb-state-cover-closed,\n var(--rgb-disabled)\n );\n\n /* State climate colors */\n --rgb-state-climate-auto: var(\n --mush-rgb-state-climate-auto,\n var(--rgb-green)\n );\n --rgb-state-climate-cool: var(--mush-rgb-state-climate-cool, var(--rgb-blue));\n --rgb-state-climate-dry: var(--mush-rgb-state-climate-dry, var(--rgb-orange));\n --rgb-state-climate-fan-only: var(\n --mush-rgb-state-climate-fan-only,\n var(--rgb-teal)\n );\n --rgb-state-climate-heat: var(\n --mush-rgb-state-climate-heat,\n var(--rgb-deep-orange)\n );\n --rgb-state-climate-heat-cool: var(\n --mush-rgb-state-climate-heat-cool,\n var(--rgb-green)\n );\n --rgb-state-climate-idle: var(\n --mush-rgb-state-climate-idle,\n var(--rgb-disabled)\n );\n --rgb-state-climate-off: var(\n --mush-rgb-state-climate-off,\n var(--rgb-disabled)\n );\n"])));function Xm(t){return!!t&&t.themes.darkMode}var Zm=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"updated",value:function(t){if($i(e,"updated",this,3)([t]),t.has("hass")&&this.hass){var n=Xm(t.get("hass")),o=Xm(this.hass);n!==o&&this.toggleAttribute("dark-mode",o)}}}],[{key:"styles",get:function(){return[Sl,Tr(N||(N=Li(["\n :host {\n ","\n }\n :host([dark-mode]) {\n ","\n }\n :host {\n ","\n ","\n }\n "])),Km,Ym,Wm,qm)]}}])}();br([Na({attribute:!1})],Zm.prototype,"hass",void 0);var Jm=["button","input_button","scene"],Qm=["name","state","last-changed","last-updated","none"],tv=["icon","entity-picture","none"];function ev(t,e,n,o,i){switch(t){case"name":return e;case"state":var r=o.entity_id.split(".")[0];return"timestamp"!==o.attributes.device_class&&!Jm.includes(r)||!Us(o)||function(t){return t.state===Ls}(o)?n:ha(B||(B=Li(["\n \n "])),i,o.state);case"last-changed":return ha(L||(L=Li(["\n \n "])),i,o.last_changed);case"last-updated":return ha(H||(H=Li(["\n \n "])),i,o.last_updated);case"none":return}}function nv(t,e){return"entity-picture"===e?Fs(t):void 0}var ov=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,Zm),pr(e,[{key:"_stateObj",get:function(){if(this._config&&this.hass&&this._config.entity){var t=this._config.entity;return this.hass.states[t]}}},{key:"hasControls",get:function(){return!1}},{key:"setConfig",value:function(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}},{key:"getCardSize",value:function(){var t,e=1;if(!this._config)return e;var n=Ol(this._config);return"vertical"===n.layout&&(e+=1),"horizontal"===(null==n?void 0:n.layout)||!this.hasControls||"collapsible_controls"in this._config&&(null===(t=this._config)||void 0===t?void 0:t.collapsible_controls)||(e+=1),e}},{key:"getLayoutOptions",value:function(){if(!this._config)return{grid_columns:2,grid_rows:1};var t={grid_columns:2,grid_rows:0},e=Ol(this._config),n="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),o="none"!==e.primary_info||"none"!==e.secondary_info,i="none"!==e.icon_type,r=this._stateObj&&Rs(this._stateObj),a=this.hasControls&&(!n||r);return"vertical"===e.layout&&(i&&(t.grid_rows+=1),o&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),"horizontal"===e.layout&&(t.grid_rows=1,t.grid_columns=4),"default"===e.layout&&((o||i)&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),a||o||(t.grid_columns=1,t.grid_rows=1),t.grid_rows=Math.max(t.grid_rows,1),t}},{key:"getGridOptions",value:function(){if(!this._config)return{columns:6,rows:1};var t={min_rows:1,min_columns:4,columns:6,rows:0},e=Ol(this._config),n="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),o="none"!==e.primary_info||"none"!==e.secondary_info,i="none"!==e.icon_type,r=this._stateObj&&Rs(this._stateObj),a=this.hasControls&&(!n||r);return"vertical"===e.layout&&(i&&(t.rows+=1),o&&(t.rows+=1),a&&(t.rows+=1),t.min_columns=2),"horizontal"===e.layout&&(t.rows=1,t.columns=12),"default"===e.layout&&((o||i)&&(t.rows+=1),a&&(t.rows+=1)),a||o||(t.columns=3,t.rows=1,t.min_columns=2),t.rows=Math.max(t.rows,1),t.min_rows=t.rows,t}},{key:"renderPicture",value:function(t){return ha(D||(D=Li(['\n \n \n \n \n \n \n ']))):fa}},{key:"renderStateInfo",value:function(t,e,n,o){var i=this.hass.formatEntityState(t),r=null!=o?o:i,a=ev(e.primary_info,n,r,t,this.hass),s=ev(e.secondary_info,n,r,t,this.hass);return ha(F||(F=Li(['\n =0}rv({type:sv,name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});var pv=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,ov),pr(e,[{key:"hasControls",get:function(){var t,e;return Boolean(null===(e=null===(t=this._config)||void 0===t?void 0:t.states)||void 0===e?void 0:e.length)}},{key:"_onTap",value:function(t,e){t.stopPropagation(),bl(this,this.hass,this._stateObj,e)}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t=this;if(!this.hass||!this._config||!this._config.entity)return fa;var e=this._stateObj;if(!e)return this.renderNotFound(this._config);var n=this._config.name||e.attributes.friendly_name||"",o=this._config.icon,i=Ol(this._config),r=nv(e,i.icon_type),a=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(e)?this._config.states.map((function(t){return{mode:t}})):[{mode:"disarmed"}]:[],s=function(t){return Bs!==t.state}(e),l=Is(this.hass);return ha(G||(G=Li(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),Ka({"fill-container":i.fill_container}),i,l,l,i,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),r?this.renderPicture(r):this.renderIcon(e,o),this.renderBadge(e),this.renderStateInfo(e,i,n),a.length>0?ha(K||(K=Li(['\n
\n \n \n
\n ']))))}}],[{key:"styles",get:function(){return[Sl,Tr(Q||(Q=Li(["\n :host {\n --icon-color: var(--primary-text-color);\n --text-color: var(--primary-text-color);\n }\n ha-card {\n box-sizing: border-box;\n height: var(--chip-height);\n min-width: var(--chip-height);\n font-size: var(--chip-height);\n width: auto;\n border-radius: var(--chip-border-radius);\n display: flex;\n flex-direction: row;\n align-items: center;\n background: var(--chip-background);\n border-width: var(--chip-border-width);\n border-color: var(--chip-border-color);\n box-shadow: var(--chip-box-shadow);\n box-sizing: content-box;\n }\n .avatar {\n --avatar-size: calc(\n var(--chip-height) - 2 * var(--chip-avatar-padding)\n );\n border-radius: var(--chip-avatar-border-radius);\n height: var(--avatar-size);\n width: var(--avatar-size);\n margin-left: var(--chip-avatar-padding);\n box-sizing: border-box;\n object-fit: cover;\n }\n :host([rtl]) .avatar {\n margin-left: initial;\n margin-right: var(--chip-avatar-padding);\n }\n .content {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: var(--chip-padding);\n line-height: 0;\n }\n ::slotted(ha-icon),\n ::slotted(ha-state-icon) {\n display: flex;\n line-height: 0;\n --mdc-icon-size: var(--chip-icon-size);\n color: var(--icon-color);\n }\n ::slotted(svg) {\n width: var(--chip-icon-size);\n height: var(--chip-icon-size);\n display: flex;\n }\n ::slotted(span) {\n font-weight: var(--chip-font-weight);\n font-size: var(--chip-font-size);\n line-height: 1;\n color: var(--text-color);\n }\n ::slotted(*:not(:last-child)) {\n margin-right: 0.15em;\n }\n :host([rtl]) ::slotted(*:not(:last-child)) {\n margin-right: initial;\n margin-left: 0.15em;\n }\n "])))]}}])}();br([Na()],fv.prototype,"icon",void 0),br([Na()],fv.prototype,"label",void 0),br([Na()],fv.prototype,"avatar",void 0),br([Na()],fv.prototype,"avatarOnly",void 0),fv=br([Ia("mushroom-chip")],fv);var mv=function(t){try{var e=vv(t.type);if(customElements.get(e)){var n=document.createElement(e,t);return n.setConfig(t),n}var o=document.createElement(e);return customElements.whenDefined(e).then((function(){try{customElements.upgrade(o),o.setConfig(t)}catch(t){}})),o}catch(t){return void console.error(t)}};function vv(t){return"".concat(av,"-").concat(t,"-chip")}function gv(t){return"".concat(av,"-").concat(t,"-chip-editor")}var _v=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t;if(!this.hass||!this._config||!this._config.entity)return fa;var e=this._config.entity,n=this.hass.states[e];if(!n)return fa;var o=this._config.name||n.attributes.friendly_name||"",i=this._config.icon,r=this._config.icon_color,a=this._config.use_entity_picture?Fs(n):void 0,s=this.hass.formatEntityState(n),l=Rs(n),c=ev(null!==(t=this._config.content_info)&&void 0!==t?t:"state",o,s,n,this.hass),u=Is(this.hass);return ha(tt||(tt=Li(["\n \n ","\n ","\n \n "])),u,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),a?this.hass.hassUrl(a):void 0,a&&!c,a?fa:this.renderIcon(n,i,r,l),c?ha(et||(et=Li(["",""])),c):fa)}},{key:"renderIcon",value:function(t,e,n,o){var i={};if(n){var r=Gm(n);i["--color"]="rgb(".concat(r,")")}return ha(nt||(nt=Li(["\n \n "])),this.hass,t,e,Wa(i),Ka({active:o}))}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return ab}));case 1:return t.a(2,document.createElement(gv("entity")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){var n;return Zi().w((function(t){for(;;)if(0===t.n)return n=Object.keys(e.states),t.a(2,{type:"entity",entity:n[0]})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(ot||(ot=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon.active {\n color: var(--color);\n }\n "])))}}]);var n,o}();br([Na({attribute:!1})],_v.prototype,"hass",void 0),br([Ba()],_v.prototype,"_config",void 0),_v=br([Ia(vv("entity"))],_v);var yv=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),bv=new Set(["hail","rainy","pouring"]),kv=new Set(["windy","windy-variant"]),wv=new Set(["snowy","snowy-rainy"]),Cv=new Set(["lightning","lightning-rainy"]),Ev=Tr(it||(it=Li(["\n .rain {\n fill: var(--weather-icon-rain-color, #30b3ff);\n }\n .sun {\n fill: var(--weather-icon-sun-color, #fdd93c);\n }\n .moon {\n fill: var(--weather-icon-moon-color, #fcf497);\n }\n .cloud-back {\n fill: var(--weather-icon-cloud-back-color, #d4d4d4);\n }\n .cloud-front {\n fill: var(--weather-icon-cloud-front-color, #f9f9f9);\n }\n"]))),xv=function(t,e){return da(rt||(rt=Li(['\n \n ',"\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n "])),"sunny"===t?da(at||(at=Li(['\n \n ']))):"","clear-night"===t?da(st||(st=Li(['\n \n ']))):"","partlycloudy"===t&&e?da(lt||(lt=Li(['\n \n ']))):"partlycloudy"===t?da(ct||(ct=Li(['\n \n ']))):"",yv.has(t)?da(ut||(ut=Li(['\n \n \n ']))):"",bv.has(t)?da(ht||(ht=Li(['\n \n \n \n \n ']))):"","pouring"===t?da(dt||(dt=Li(['\n \n \n ']))):"",kv.has(t)?da(pt||(pt=Li(['\n \n \n ']))):"",wv.has(t)?da(ft||(ft=Li(['\n \n \n \n ']))):"",Cv.has(t)?da(mt||(mt=Li(['\n \n ']))):"")},Av=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config||!this._config.entity)return fa;var t=this._config.entity,e=this.hass.states[t];if(!e)return fa;var n=xv(e.state,!0),o=[];if(this._config.show_conditions){var i=this.hass.formatEntityState(e);o.push(i)}if(this._config.show_temperature){var r=this.hass.formatEntityAttributeValue(e,"temperature");o.push(r)}var a=Is(this.hass);return ha(vt||(vt=Li(["\n \n ","\n ","\n \n "])),a,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),n,o.length>0?ha(gt||(gt=Li(["",""])),o.join(" ⸱ ")):fa)}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return db}));case 1:return t.a(2,document.createElement(gv("weather")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){var n,o;return Zi().w((function(t){for(;;)if(0===t.n)return n=Object.keys(e.states),o=n.filter((function(t){return"weather"===t.split(".")[0]})),t.a(2,{type:"weather",entity:o[0]})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return[Ev,Tr(_t||(_t=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n "])))]}}]);var n,o}();br([Na({attribute:!1})],Av.prototype,"hass",void 0),br([Ba()],Av.prototype,"_config",void 0),Av=br([Ia(vv("weather"))],Av);var Sv="mdi:arrow-left",Tv=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(){window.history.back()}},{key:"render",value:function(){if(!this.hass||!this._config)return fa;var t=this._config.icon||Sv,e=Is(this.hass);return ha(yt||(yt=Li(["\n \n \n \n "])),e,this._handleAction,il(),this.hass,t)}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return mb}));case 1:return t.a(2,document.createElement(gv("back")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,{type:"back"})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(bt||(bt=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n "])))}}]);var n,o}();br([Na({attribute:!1})],Tv.prototype,"hass",void 0),br([Ba()],Tv.prototype,"_config",void 0),Tv=br([Ia(vv("back"))],Tv);var Mv="mdi:flash",zv=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config)return fa;var t=this._config.icon||Mv,e=this._config.icon_color,n={};if(e){var o=Gm(e);n["--color"]="rgb(".concat(o,")")}var i=Is(this.hass);return ha(kt||(kt=Li(["\n \n \n \n "])),i,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),this.hass,t,Wa(n))}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return yb}));case 1:return t.a(2,document.createElement(gv("action")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,{type:"action"})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(wt||(wt=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon {\n color: var(--color);\n }\n "])))}}]);var n,o}();br([Na({attribute:!1})],zv.prototype,"hass",void 0),br([Ba()],zv.prototype,"_config",void 0),zv=br([Ia(vv("action"))],zv);var Ov="mdi:menu",Iv=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(){Za(this,"hass-toggle-menu")}},{key:"render",value:function(){if(!this.hass||!this._config)return fa;var t=this._config.icon||Ov,e=Is(this.hass);return ha(Ct||(Ct=Li(["\n \n \n \n "])),e,this._handleAction,il(),this.hass,t)}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return wb}));case 1:return t.a(2,document.createElement(gv("menu")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,{type:"menu"})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(Et||(Et=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n "])))}}]);var n,o}();br([Na({attribute:!1})],Iv.prototype,"hass",void 0),br([Ba()],Iv.prototype,"_config",void 0),Iv=br([Ia(vv("menu"))],Iv);var jv="mdi:magnify",Pv=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(){if(this.hass&&this._config){var t;switch(this._config.mode||"entity"){case"command":t="c";break;case"device":t="d";break;case"entity":t="e"}var e=new KeyboardEvent("keydown",{bubbles:!0,composed:!0,key:t});this.dispatchEvent(e)}}},{key:"render",value:function(){if(!this.hass||!this._config)return fa;var t=this._config.icon||jv,e=Is(this.hass);return ha(xt||(xt=Li(["\n \n \n \n "])),e,this._handleAction,il(),this.hass,t)}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return xb}));case 1:return t.a(2,document.createElement(gv("quickbar")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,{type:"quickbar"})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(At||(At=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n "])))}}]);var n,o}();function Nv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Bv(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}br([Na({attribute:!1})],Pv.prototype,"hass",void 0),br([Ba()],Pv.prototype,"_config",void 0),Pv=br([Ia(vv("quickbar"))],Pv);var Lv,Hv={exports:{}};var Dv=(Lv||(Lv=1,Hv.exports=function t(e,n,o){function i(a,s){if(!n[a]){if(!e[a]){if(!s&&Bv)return Bv(a);if(r)return r(a,!0);throw new Error("Cannot find module '"+a+"'")}s=n[a]={exports:{}},e[a][0].call(s.exports,(function(t){return i(e[a][1][t]||t)}),s,s.exports,t,e,n,o)}return n[a].exports}for(var r=Bv,a=0;a>16),l((65280&o)>>8),l(255&o);return 2==i?l(255&(o=c(t.charAt(n))<<2|c(t.charAt(n+1))>>4)):1==i&&(l((o=c(t.charAt(n))<<10|c(t.charAt(n+1))<<4|c(t.charAt(n+2))>>2)>>8&255),l(255&o)),r},t.fromByteArray=function(t){var e,n,o,i,r=t.length%3,a="";function s(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,o=t.length-r;e>18&63)+s(i>>12&63)+s(i>>6&63)+s(63&i);switch(r){case 1:a=(a+=s((n=t[t.length-1])>>2))+s(n<<4&63)+"==";break;case 2:a=(a=(a+=s((n=(t[t.length-2]<<8)+t[t.length-1])>>10))+s(n>>4&63))+s(n<<2&63)+"="}return a}}(void 0===n?this.base64js={}:n)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,n){(function(e,o,i,r,a,s,l,c,u){var h=t("base64-js"),d=t("ieee754");function i(t,e,n){if(!(this instanceof i))return new i(t,e,n);var o,r,a,s,l=mr(t);if("base64"===e&&"string"==l)for(t=(s=t).trim?s.trim():s.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==l)o=z(t);else if("string"==l)o=i.byteLength(t,e);else{if("object"!=l)throw new Error("First argument needs to be a number, array or string.");o=z(t.length)}if(i._useTypedArrays?r=i._augment(new Uint8Array(o)):((r=this).length=o,r._isBuffer=!0),i._useTypedArrays&&"number"==typeof t.byteLength)r._set(t);else if(O(s=t)||i.isBuffer(s)||s&&"object"==mr(s)&&"number"==typeof s.length)for(a=0;a>8,n%=256,o.push(n),o.push(e);return o}(e),t,n,o)}function m(t,e,n){var o="";n=Math.min(t.length,n);for(var i=e;i>>0)):(e+1>>0),i}function _(t,e,n,o){if(o||(R("boolean"==typeof n,"missing or invalid endian"),R(null!=e,"missing offset"),R(e+1>>8*(o?r:1-r)}function C(t,e,n,o,i){if(i||(R(null!=e,"missing value"),R("boolean"==typeof o,"missing or invalid endian"),R(null!=n,"missing offset"),R(n+3>>8*(o?r:3-r)&255}function E(t,e,n,o,i){i||(R(null!=e,"missing value"),R("boolean"==typeof o,"missing or invalid endian"),R(null!=n,"missing offset"),R(n+1this.length&&(o=this.length);var r=(o=t.length-e=this.length))return this[t]},i.prototype.readUInt16LE=function(t,e){return v(this,t,!0,e)},i.prototype.readUInt16BE=function(t,e){return v(this,t,!1,e)},i.prototype.readUInt32LE=function(t,e){return g(this,t,!0,e)},i.prototype.readUInt32BE=function(t,e){return g(this,t,!1,e)},i.prototype.readInt8=function(t,e){if(e||(R(null!=t,"missing offset"),R(t=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){return _(this,t,!0,e)},i.prototype.readInt16BE=function(t,e){return _(this,t,!1,e)},i.prototype.readInt32LE=function(t,e){return y(this,t,!0,e)},i.prototype.readInt32BE=function(t,e){return y(this,t,!1,e)},i.prototype.readFloatLE=function(t,e){return b(this,t,!0,e)},i.prototype.readFloatBE=function(t,e){return b(this,t,!1,e)},i.prototype.readDoubleLE=function(t,e){return k(this,t,!0,e)},i.prototype.readDoubleBE=function(t,e){return k(this,t,!1,e)},i.prototype.writeUInt8=function(t,e,n){n||(R(null!=t,"missing value"),R(null!=e,"missing offset"),R(e=this.length||(this[e]=t)},i.prototype.writeUInt16LE=function(t,e,n){w(this,t,e,!0,n)},i.prototype.writeUInt16BE=function(t,e,n){w(this,t,e,!1,n)},i.prototype.writeUInt32LE=function(t,e,n){C(this,t,e,!0,n)},i.prototype.writeUInt32BE=function(t,e,n){C(this,t,e,!1,n)},i.prototype.writeInt8=function(t,e,n){n||(R(null!=t,"missing value"),R(null!=e,"missing offset"),R(e=this.length||(0<=t?this.writeUInt8(t,e,n):this.writeUInt8(255+t+1,e,n))},i.prototype.writeInt16LE=function(t,e,n){E(this,t,e,!0,n)},i.prototype.writeInt16BE=function(t,e,n){E(this,t,e,!1,n)},i.prototype.writeInt32LE=function(t,e,n){x(this,t,e,!0,n)},i.prototype.writeInt32BE=function(t,e,n){x(this,t,e,!1,n)},i.prototype.writeFloatLE=function(t,e,n){A(this,t,e,!0,n)},i.prototype.writeFloatBE=function(t,e,n){A(this,t,e,!1,n)},i.prototype.writeDoubleLE=function(t,e,n){S(this,t,e,!0,n)},i.prototype.writeDoubleBE=function(t,e,n){S(this,t,e,!1,n)},i.prototype.fill=function(t,e,n){if(e=e||0,n=n||this.length,R("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),R(e<=n,"end < start"),n!==e&&0!==this.length){R(0<=e&&e"},i.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(i._useTypedArrays)return new i(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;e=e.length||i>=t.length);i++)e[i+n]=t[i];return i}function B(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function L(t,e){R("number"==typeof t,"cannot write a non-number as a number"),R(0<=t,"specified a negative value for writing an unsigned value"),R(t<=e,"value is larger than maximum value for type"),R(Math.floor(t)===t,"value has a fractional component")}function H(t,e,n){R("number"==typeof t,"cannot write a non-number as a number"),R(t<=e,"value larger than maximum allowed value"),R(n<=t,"value smaller than minimum allowed value"),R(Math.floor(t)===t,"value has a fractional component")}function D(t,e,n){R("number"==typeof t,"cannot write a non-number as a number"),R(t<=e,"value larger than maximum allowed value"),R(n<=t,"value smaller than minimum allowed value")}function R(t,e){if(!t)throw new Error(e||"Failed assertion")}i._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=T.get,t.set=T.set,t.write=T.write,t.toString=T.toString,t.toLocaleString=T.toString,t.toJSON=T.toJSON,t.copy=T.copy,t.slice=T.slice,t.readUInt8=T.readUInt8,t.readUInt16LE=T.readUInt16LE,t.readUInt16BE=T.readUInt16BE,t.readUInt32LE=T.readUInt32LE,t.readUInt32BE=T.readUInt32BE,t.readInt8=T.readInt8,t.readInt16LE=T.readInt16LE,t.readInt16BE=T.readInt16BE,t.readInt32LE=T.readInt32LE,t.readInt32BE=T.readInt32BE,t.readFloatLE=T.readFloatLE,t.readFloatBE=T.readFloatBE,t.readDoubleLE=T.readDoubleLE,t.readDoubleBE=T.readDoubleBE,t.writeUInt8=T.writeUInt8,t.writeUInt16LE=T.writeUInt16LE,t.writeUInt16BE=T.writeUInt16BE,t.writeUInt32LE=T.writeUInt32LE,t.writeUInt32BE=T.writeUInt32BE,t.writeInt8=T.writeInt8,t.writeInt16LE=T.writeInt16LE,t.writeInt16BE=T.writeInt16BE,t.writeInt32LE=T.writeInt32LE,t.writeInt32BE=T.writeInt32BE,t.writeFloatLE=T.writeFloatLE,t.writeFloatBE=T.writeFloatBE,t.writeDoubleLE=T.writeDoubleLE,t.writeDoubleBE=T.writeDoubleBE,t.fill=T.fill,t.inspect=T.inspect,t.toArrayBuffer=T.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,n){(function(n,o,i,r,a,s,l,c,u){i=t("buffer").Buffer;var h=4,d=new i(h);d.fill(0),e.exports={hash:function(t,e,n,o){for(var r=e(function(t,e){t.length%h!=0&&(n=t.length+(h-t.length%h),t=i.concat([t,d],n));for(var n,o=[],r=e?t.readInt32BE:t.readInt32LE,a=0;am?e=t(e):e.length>5]|=128<>>9<<4)]=e;for(var n=1732584193,o=-271733879,i=-1732584194,r=271733878,a=0;a>>32-i,n)}function f(t,e,n,o,i,r,a){return p(e&n|~e&o,t,e,i,r,a)}function m(t,e,n,o,i,r,a){return p(e&o|n&~o,t,e,i,r,a)}function v(t,e,n,o,i,r,a){return p(e^n^o,t,e,i,r,a)}function g(t,e,n,o,i,r,a){return p(n^(e|~o),t,e,i,r,a)}function _(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}e.exports=function(t){return h.hash(t,d,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(t,e,n){(function(t,n,o,i,r,a,s,l,c){e.exports=function(t){for(var e,n=new Array(t),o=0;o>>((3&o)<<3)&255;return n}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,n){(function(n,o,i,r,a,s,l,c,u){var h=t("./helpers");function d(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n,o,i,r=Array(80),a=1732584193,s=-271733879,l=-1732584194,c=271733878,u=-1009589776,h=0;h>16)+(e>>16)+(n>>16)<<16|65535&n}function f(t,e){return t<>>32-e}e.exports=function(t){return h.hash(t,d,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(t,e,n){(function(n,o,i,r,a,s,l,c,u){function h(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function d(t,e){var n,o=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),i=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),r=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var a,s,l=0;l>>e|t<<32-e},m=function(t,e){return t>>>e};e.exports=function(t){return p.hash(t,d,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(t,e,n){(function(t,e,o,i,r,a,s,l,c){n.read=function(t,e,n,o,i){var r,a,s=8*i-o-1,l=(1<>1,u=-7,h=n?i-1:0,d=n?-1:1;for(i=t[e+h],h+=d,r=i&(1<<-u)-1,i>>=-u,u+=s;0>=-u,u+=o;0>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=o?0:r-1,p=o?1:-1;for(r=e<0||0===e&&1/e<0?1:0,e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(o=Math.pow(2,-a))<1&&(a--,o*=2),2<=(e+=1<=a+u?h/o:h*Math.pow(2,1-u))*o&&(a++,o/=2),c<=a+u?(s=0,a=c):1<=a+u?(s=(e*o-1)*Math.pow(2,i),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));8<=i;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<\n ","\n ","\n \n "])),i,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),o?this.hass.hassUrl(o):void 0,o&&!n||!1,o?fa:r||(t?this.renderIcon(t,e):fa),n?this.renderContent(n):fa)}},{key:"renderIcon",value:function(t,e){var n={};if(e){var o=Gm(e);n["--color"]="rgb(".concat(o,")")}return ha(Tt||(Tt=Li([""])),this.hass,t,Wa(n))}},{key:"renderContent",value:function(t){return ha(Mt||(Mt=Li(["",""])),t)}},{key:"updated",value:function(t){$i(e,"updated",this,3)([t]),this._config&&this.hass&&this._tryConnect()}},{key:"_tryConnect",value:(s=tr(Zi().m((function t(){var e=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:Gv.forEach((function(t){e._tryConnectKey(t)}));case 1:return t.a(2)}}),t)}))),function(){return s.apply(this,arguments)})},{key:"_tryConnectKey",value:(a=tr(Zi().m((function t(e){var n,o,i,r,a=this;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:if(void 0===this._unsubRenderTemplates.get(e)&&this.hass&&this._config&&this.isTemplate(e)){t.n=1;break}return t.a(2);case 1:return t.p=1,i=tl(this.hass.connection,(function(t){a._templateResults=Object.assign(Object.assign({},a._templateResults),Fi({},e,t))}),{template:null!==(n=this._config[e])&&void 0!==n?n:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity},strict:!0}),this._unsubRenderTemplates.set(e,i),t.n=2,i;case 2:t.n=4;break;case 3:t.p=3,t.v,r={result:null!==(o=this._config[e])&&void 0!==o?o:"",listeners:{all:!1,domains:[],entities:[],time:!1}},this._templateResults=Object.assign(Object.assign({},this._templateResults),Fi({},e,r)),this._unsubRenderTemplates.delete(e);case 4:return t.a(2)}}),t,this,[[1,3]])}))),function(t){return a.apply(this,arguments)})},{key:"_tryDisconnect",value:(r=tr(Zi().m((function t(){var e=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:Gv.forEach((function(t){e._tryDisconnectKey(t)}));case 1:return t.a(2)}}),t)}))),function(){return r.apply(this,arguments)})},{key:"_tryDisconnectKey",value:(i=tr(Zi().m((function t(e){var n,o;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:if(n=this._unsubRenderTemplates.get(e)){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,n;case 2:(0,t.v)(),this._unsubRenderTemplates.delete(e),t.n=5;break;case 3:if(t.p=3,"not_found"!==(o=t.v).code&&"template_error"!==o.code){t.n=4;break}t.n=5;break;case 4:throw o;case 5:return t.a(2)}}),t,this,[[1,3]])}))),function(t){return i.apply(this,arguments)})}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return Ib}));case 1:return t.a(2,document.createElement(gv("template")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,{type:"template"})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(zt||(zt=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon {\n color: var(--color);\n }\n ","\n "])),Ev)}}]);var n,o,i,r,a,s}();br([Na({attribute:!1})],Kv.prototype,"hass",void 0),br([Ba()],Kv.prototype,"_config",void 0),br([Ba()],Kv.prototype,"_templateResults",void 0),br([Ba()],Kv.prototype,"_unsubRenderTemplates",void 0),Kv=br([Ia(vv("template"))],Kv);var Yv=function(){var t,e,n;customElements.get("ha-form")&&customElements.get("hui-card-features-editor")||null===(t=customElements.get("hui-tile-card"))||void 0===t||t.getConfigElement(),customElements.get("ha-entity-picker")||null===(e=customElements.get("hui-entities-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-card-conditions-editor")||null===(n=customElements.get("hui-conditional-card"))||void 0===n||n.getConfigElement()},qv=function(){var t=tr(Zi().m((function t(e){var n;return Zi().w((function(t){for(;;)switch(t.n){case 0:if(!(n=customElements.get(e))){t.n=1;break}return t.a(2,n);case 1:return t.n=2,customElements.whenDefined(e);case 2:return t.a(2,customElements.get(e))}}),t)})));return function(e){return t.apply(this,arguments)}}(),Wv=vv("conditional"),Xv=function(){var t=tr(Zi().m((function t(){var e,n;return Zi().w((function(t){for(;;)switch(t.n){case 0:if(!customElements.get(Wv)){t.n=1;break}return t.a(2);case 1:if(customElements.get("hui-conditional-base")){t.n=3;break}return t.n=2,window.loadCardHelpers();case 2:t.v.createCardElement({type:"conditional",card:{type:"button"},conditions:[]});case 3:return t.n=4,qv("hui-conditional-base");case 4:e=t.v,n=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,t),pr(e,[{key:"setConfig",value:function(t){if(this.validateConfig(t),!t.chip)throw new Error("No chip configured");this._element=mv(t.chip)}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return kC}));case 1:return t.a(2,document.createElement(gv("conditional")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,{type:"conditional",conditions:[]})}),t)}))),function(){return n.apply(this,arguments)})}]);var n,o}(e),customElements.get(Wv)||customElements.define(Wv,n);case 5:return t.a(2)}}),t)})));return function(){return t.apply(this,arguments)}}();function Zv(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function Jv(t){var e={mode:"rgb",r:t[0]/255,g:t[1]/255,b:t[2]/255},n=Vm(e);return((null==n?void 0:n.l)||0)>96}function Qv(t){var e={mode:"rgb",r:t[0]/255,g:t[1]/255,b:t[2]/255},n=Vm(e);return((null==n?void 0:n.l)||0)>97}function tg(t){return function(t){var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((function(t){return $s.includes(t)})))||!1}(t)}function eg(t){return function(t){var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((function(t){return Gs.includes(t)})))||!1}(t)}var ng=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t,e;if(!this.hass||!this._config||!this._config.entity)return fa;var n=this._config.entity,o=this.hass.states[n];if(!o)return fa;var i=this._config.name||o.attributes.friendly_name||"",r=this._config.icon,a=this.hass.formatEntityState(o),s=Rs(o),l=Zv(o),c={};if(l&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)){var u=l.join(",");c["--color"]="rgb(".concat(u,")"),Qv(l)&&(c["--color"]="rgba(var(--rgb-primary-text-color), 0.2)")}var h=ev(null!==(e=this._config.content_info)&&void 0!==e?e:"state",i,a,o,this.hass),d=Is(this.hass);return ha(Ot||(Ot=Li(["\n \n \n ","\n \n "])),d,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),this.hass,o,r,Wa(c),Ka({active:s}),h?ha(It||(It=Li(["",""])),h):fa)}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return MC}));case 1:return t.a(2,document.createElement(gv("light")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){var n,o;return Zi().w((function(t){for(;;)if(0===t.n)return n=Object.keys(e.states),o=n.filter((function(t){return"light"===t.split(".")[0]})),t.a(2,{type:"light",entity:o[0]})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(jt||(jt=Li(["\n :host {\n --color: rgb(var(--rgb-state-light));\n }\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon.active {\n color: var(--color);\n }\n "])))}}]);var n,o}();br([Na({attribute:!1})],ng.prototype,"hass",void 0),br([Ba()],ng.prototype,"_config",void 0),ng=br([Ia(vv("light"))],ng);var og=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t;if(!this.hass||!this._config||!this._config.entity)return fa;var e=this._config.entity,n=this.hass.states[e];if(!n)return fa;var o=this._config.name||n.attributes.friendly_name||"",i=this._config.icon,r=hv(n.state),a=dv(n.state),s=this.hass.formatEntityState(n),l={};if(r){var c=Gm(r);l["--color"]="rgb(".concat(c,")")}var u=ev(null!==(t=this._config.content_info)&&void 0!==t?t:"state",o,s,n,this.hass),h=Is(this.hass);return ha(Pt||(Pt=Li(["\n \n \n ","\n \n "])),h,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),this.hass,n,i,Wa(l),Ka({pulse:a}),u?ha(Nt||(Nt=Li(["",""])),u):fa)}}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return jC}));case 1:return t.a(2,document.createElement(gv("alarm-control-panel")))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){var n,o;return Zi().w((function(t){for(;;)if(0===t.n)return n=Object.keys(e.states),o=n.filter((function(t){return cv.includes(t.split(".")[0])})),t.a(2,{type:"alarm-control-panel",entity:o[0]})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Tr(Bt||(Bt=Li(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon {\n color: var(--color);\n }\n ha-state-icon.pulse {\n animation: 1s ease 0s infinite normal none running pulse;\n }\n ","\n "])),Al.pulse)}}]);var n,o}();br([Na({attribute:!1})],og.prototype,"hass",void 0),br([Ba()],og.prototype,"_config",void 0),og=br([Ia(vv("alarm-control-panel"))],og);var ig=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"setConfig",value:function(){}}],[{key:"styles",get:function(){return Tr(Lt||(Lt=Li(["\n :host {\n flex-grow: 1;\n }\n "])))}}])}();ig=br([Ia(vv("spacer"))],ig);var rg="".concat(av,"-chips-card"),ag="".concat(rg,"-editor");rv({type:rg,name:"Mushroom Chips Card",description:"Card with chips to display informations"});var sg=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"hass",set:function(t){var e,n=Xm(this._hass),o=Xm(t);n!==o&&this.toggleAttribute("dark-mode",o),this._hass=t,null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("div > *").forEach((function(e){e.hass=t}))}},{key:"getCardSize",value:function(){return 1}},{key:"setConfig",value:function(t){this._config=t}},{key:"render",value:function(){var t=this;if(!this._config||!this._hass)return fa;var e="";this._config.alignment&&(e="align-".concat(this._config.alignment));var n=Is(this._hass);return ha(Ht||(Ht=Li(['\n \n
\n \n \n \n \n \n \n \n
\n '])),this._decrementValue,this.disabled,Ka({value:!0,pending:this.pending,disabled:this.disabled}),t,this._incrementValue,this.disabled)}}],[{key:"styles",get:function(){return Tr($t||($t=Li(["\n :host {\n --text-color: var(--primary-text-color);\n --text-color-disabled: rgb(var(--rgb-disabled));\n --icon-color: var(--primary-text-color);\n --icon-color-disabled: rgb(var(--rgb-disabled));\n --bg-color: rgba(var(--rgb-primary-text-color), 0.05);\n --bg-color-disabled: rgba(var(--rgb-disabled), 0.2);\n height: var(--control-height);\n width: calc(var(--control-height) * var(--control-button-ratio) * 3);\n flex: none;\n }\n .container {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 6px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border-radius: var(--control-border-radius);\n border: none;\n background-color: var(--bg-color);\n transition: background-color 280ms ease-in-out;\n height: var(--control-height);\n overflow: hidden;\n }\n .button {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 4px;\n border: none;\n background: none;\n cursor: pointer;\n border-radius: var(--control-border-radius);\n line-height: 0;\n height: 100%;\n }\n .minus {\n padding-right: 0;\n }\n .plus {\n padding-left: 0;\n }\n .button:disabled {\n cursor: not-allowed;\n }\n .button ha-icon {\n font-size: var(--control-height);\n --mdc-icon-size: var(--control-icon-size);\n color: var(--icon-color);\n pointer-events: none;\n }\n .button:disabled ha-icon {\n color: var(--icon-color-disabled);\n }\n .value {\n text-align: center;\n flex-grow: 1;\n flex-shrink: 0;\n flex-basis: 20px;\n font-weight: bold;\n color: var(--text-color);\n }\n .value.disabled {\n color: var(--text-color-disabled);\n }\n .value.pending {\n opacity: 0.5;\n }\n "])))}}])}();br([Na({attribute:!1})],gg.prototype,"locale",void 0),br([Na({type:Boolean})],gg.prototype,"disabled",void 0),br([Na({attribute:!1,type:Number,reflect:!0})],gg.prototype,"value",void 0),br([Na({type:Number})],gg.prototype,"step",void 0),br([Na({type:Number})],gg.prototype,"min",void 0),br([Na({type:Number})],gg.prototype,"max",void 0),br([Na({attribute:!1})],gg.prototype,"formatOptions",void 0),br([Ba()],gg.prototype,"pending",void 0),br([La("#container")],gg.prototype,"container",void 0),gg=br([Ia("mushroom-input-number")],gg);var _g=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).fill=!1,t}return or(e,za),pr(e,[{key:"_stepSize",get:function(){return this.entity.attributes.target_temp_step?this.entity.attributes.target_temp_step:"°F"===this.hass.config.unit_system.temperature?1:.5}},{key:"_supportsTarget",value:function(){return"climate"===Qa(this.entity)&&ts(this.entity,1)}},{key:"_supportsTargetRange",value:function(){return"climate"===Qa(this.entity)&&ts(this.entity,2)}},{key:"onValueChange",value:function(t){var e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,temperature:e})}},{key:"onLowValueChange",value:function(t){var e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:e,target_temp_high:this.entity.attributes.target_temp_high})}},{key:"onHighValueChange",value:function(t){var e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:this.entity.attributes.target_temp_low,target_temp_high:e})}},{key:"render",value:function(){var t=Is(this.hass),e=Us(this.entity),n=1===this._stepSize?{maximumFractionDigits:0}:{minimumFractionDigits:1,maximumFractionDigits:1},o=function(t){return{"--bg-color":"rgba(var(--rgb-state-climate-".concat(t,"), 0.05)"),"--icon-color":"rgb(var(--rgb-state-climate-".concat(t,"))"),"--text-color":"rgb(var(--rgb-state-climate-".concat(t,"))")}},i=this._supportsTarget(),r=this._supportsTargetRange(),a=null!=this.entity.attributes.temperature,s=null!=this.entity.attributes.target_temp_low&&null!=this.entity.attributes.target_temp_high,l=i&&a,c=!l&&r&&s;return ha(Gt||(Gt=Li(["\n \n ","\n ","\n \n "])),this.fill,t,l?ha(Kt||(Kt=Li(["\n \n "])),this.hass.locale,this.entity.attributes.temperature,this._stepSize,this.entity.attributes.min_temp,this.entity.attributes.max_temp,!e,n,this.onValueChange):fa,c?ha(Yt||(Yt=Li(["\n \n "])),Wa(o("heat")),this.hass.locale,this.entity.attributes.target_temp_low,this._stepSize,this.entity.attributes.min_temp,this.entity.attributes.max_temp,!e,n,this.onLowValueChange,Wa(o("cool")),this.hass.locale,this.entity.attributes.target_temp_high,this._stepSize,this.entity.attributes.min_temp,this.entity.attributes.max_temp,!e,n,this.onHighValueChange):fa)}}])}();br([Na({attribute:!1})],_g.prototype,"hass",void 0),br([Na({attribute:!1})],_g.prototype,"entity",void 0),br([Na()],_g.prototype,"fill",void 0),_g=br([Ia("mushroom-climate-temperature-control")],_g);var yg={temperature_control:"mdi:thermometer",hvac_mode_control:"mdi:thermostat"};rv({type:lg,name:"Mushroom Climate Card",description:"Card for climate entity"});var bg=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,ov),pr(e,[{key:"_controls",get:function(){if(!this._config||!this._stateObj)return[];var t,e=this._stateObj,n=[];return(null!=(t=e).attributes.temperature||null!=t.attributes.target_temp_low&&null!=t.attributes.target_temp_high)&&this._config.show_temperature_control&&n.push("temperature_control"),function(t,e){return(t.attributes.hvac_modes||[]).some((function(t){return(null!=e?e:[]).includes(t)}))}(e,this._config.hvac_modes)&&n.push("hvac_mode_control"),n}},{key:"hasControls",get:function(){return this._controls.length>0}},{key:"_onControlTap",value:function(t,e){e.stopPropagation(),this._activeControl=t}},{key:"setConfig",value:function(t){$i(e,"setConfig",this,3)([Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)]),this.updateActiveControl()}},{key:"updated",value:function(t){$i(e,"updated",this,3)([t]),this.hass&&t.has("hass")&&this.updateActiveControl()}},{key:"updateActiveControl",value:function(){var t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config||!this._config.entity)return fa;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e=this._config.name||t.attributes.friendly_name||"",n=this._config.icon,o=Ol(this._config),i=nv(t,o.icon_type),r=this.hass.formatEntityState(t);if(null!==t.attributes.current_temperature){var a=this.hass.formatEntityAttributeValue(t,"current_temperature");r+=" ⸱ ".concat(a)}var s=Is(this.hass),l=(!this._config.collapsible_controls||Rs(t))&&this._controls.length;return ha(qt||(qt=Li(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n
\n "])),Ka({"fill-container":o.fill_container}),o,s,s,o,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),i?this.renderPicture(i):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,o,e,r),l?ha(Wt||(Wt=Li(['\n
\n \n \n '])),!Us(this.entity),this._onStopTap):void 0,ts(this.entity,2)?ha(ae||(ae=Li(["\n \n \n \n "])),!Us(this.entity)||this.closedDisabled,this._onCloseTap,function(t){switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-collapse-horizontal";default:return"mdi:arrow-down"}}(this.entity)):void 0)}}])}();br([Na({attribute:!1})],Eg.prototype,"hass",void 0),br([Na({attribute:!1})],Eg.prototype,"entity",void 0),br([Na()],Eg.prototype,"fill",void 0),Eg=br([Ia("mushroom-cover-buttons-control")],Eg);var xg,Ag,Sg={exports:{}}; -/*! Hammer.JS - v2.0.7 - 2016-04-22 - * http://hammerjs.github.io/ - * - * Copyright (c) 2016 Jorik Tangelder; - * Licensed under the MIT license */xg||(xg=1,Ag=Sg,function(t,e,n,o){var i,r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),s="function",l=Math.round,c=Math.abs,u=Date.now;function h(t,e,n){return setTimeout(_(t,n),e)}function d(t,e,n){return!!Array.isArray(t)&&(p(t,n[e],n),!0)}function p(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==o)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,i,o),e.apply(this,arguments)}}i="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function x(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var o=0;on[e]})),o}function M(t,e){for(var n,i,a=e[0].toUpperCase()+e.slice(1),s=0;s1&&!n.firstMultiple?n.firstMultiple=Q(e):1===r&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,l=s?s.center:a.center,h=e.center=tt(i);e.timeStamp=u(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=it(l,h),e.distance=ot(l,h),function(t,e){var n=e.center,o=t.offsetDelta||{},i=t.prevDelta||{},r=t.prevInput||{};e.eventType!==H&&r.eventType!==D||(i=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},o=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-o.x),e.deltaY=i.y+(n.y-o.y)}(n,e),e.offsetDirection=nt(e.deltaX,e.deltaY);var d,p,f=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=f.x,e.overallVelocityY=f.y,e.overallVelocity=c(f.x)>c(f.y)?f.x:f.y,e.scale=s?(d=s.pointers,ot((p=i)[0],p[1],X)/ot(d[0],d[1],X)):1,e.rotation=s?function(t,e){return it(e[1],e[0],X)+it(t[1],t[0],X)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,a,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(e.eventType!=R&&(l>L||s.velocity===o)){var u=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,d=et(l,u,h);i=d.x,r=d.y,n=c(d.x)>c(d.y)?d.x:d.y,a=nt(u,h),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,a=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=a}(n,e);var m=t.element;C(e.srcEvent.target,m)&&(m=e.srcEvent.target),e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function Q(t){for(var e=[],n=0;n=c(e)?t<0?V:F:e<0?$:G}function ot(t,e,n){n||(n=W);var o=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(o*o+i*i)}function it(t,e,n){n||(n=W);var o=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,o)/Math.PI}Z.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(O(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(O(this.element),this.evWin,this.domHandler)}};var rt={mousedown:H,mousemove:2,mouseup:D},at="mousedown",st="mousemove mouseup";function lt(){this.evEl=at,this.evWin=st,this.pressed=!1,Z.apply(this,arguments)}g(lt,Z,{handler:function(t){var e=rt[t.type];e&H&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=D),this.pressed&&(e&D&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:B,srcEvent:t}))}});var ct={pointerdown:H,pointermove:2,pointerup:D,pointercancel:R,pointerout:R},ut={2:N,3:"pen",4:B,5:"kinect"},ht="pointerdown",dt="pointermove pointerup pointercancel";function pt(){this.evEl=ht,this.evWin=dt,Z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ht="MSPointerDown",dt="MSPointerMove MSPointerUp MSPointerCancel"),g(pt,Z,{handler:function(t){var e=this.store,n=!1,o=t.type.toLowerCase().replace("ms",""),i=ct[o],r=ut[t.pointerType]||t.pointerType,a=r==N,s=A(e,t.pointerId,"pointerId");i&H&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):i&(D|R)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(s,1))}});var ft={touchstart:H,touchmove:2,touchend:D,touchcancel:R};function mt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Z.apply(this,arguments)}function vt(t,e){var n=S(t.touches),o=S(t.changedTouches);return e&(D|R)&&(n=T(n.concat(o),"identifier")),[n,o]}g(mt,Z,{handler:function(t){var e=ft[t.type];if(e===H&&(this.started=!0),this.started){var n=vt.call(this,t,e);e&(D|R)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}});var gt={touchstart:H,touchmove:2,touchend:D,touchcancel:R},_t="touchstart touchmove touchend touchcancel";function yt(){this.evTarget=_t,this.targetIds={},Z.apply(this,arguments)}function bt(t,e){var n=S(t.touches),o=this.targetIds;if(e&(2|H)&&1===n.length)return o[n[0].identifier]=!0,[n,n];var i,r,a=S(t.changedTouches),s=[],l=this.target;if(r=n.filter((function(t){return C(t.target,l)})),e===H)for(i=0;i-1&&o.splice(t,1)}),kt)}}function xt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function o(n){e.manager.emit(n,t)}n<8&&o(e.options.event+Dt(n)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),n>=8&&o(e.options.event+Dt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Lt},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return Vt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Rt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),g($t,Vt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ot]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),g(Gt,Ht,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Mt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!n||t.eventType&(D|R)&&!i)this.reset();else if(t.eventType&H)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&D)return 8;return Lt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&D?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),g(Kt,Vt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ot]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),g(Yt,Vt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:K|Y,pointers:1},getTouchAction:function(){return Ft.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(K|Y)?e=t.overallVelocity:n&K?e=t.overallVelocityX:n&Y&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&D},emit:function(t){var e=Rt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),g(qt,Ht,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[zt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,o=t.distance\n
\n ',"\n ","\n
\n
\n "])),Ka({container:!0,inactive:this.inactive||this.disabled,controlled:this.controlled}),Wa({"--value":"".concat(this.valueToPercentage(null!==(t=this.value)&&void 0!==t?t:0))}),this.showActive?ha(le||(le=Li(['
']))):fa,this.showIndicator?ha(ce||(ce=Li(['
']))):fa)}}],[{key:"styles",get:function(){return Tr(ue||(ue=Li(['\n :host {\n --main-color: rgba(var(--rgb-secondary-text-color), 1);\n --bg-gradient: none;\n --bg-color: rgba(var(--rgb-secondary-text-color), 0.2);\n --main-color-inactive: rgb(var(--rgb-disabled));\n --bg-color-inactive: rgba(var(--rgb-disabled), 0.2);\n }\n .container {\n display: flex;\n flex-direction: row;\n height: var(--control-height);\n }\n .slider {\n position: relative;\n height: 100%;\n width: 100%;\n border-radius: var(--control-border-radius);\n transform: translateZ(0);\n overflow: hidden;\n cursor: pointer;\n }\n .slider * {\n pointer-events: none;\n }\n .slider .slider-track-background {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-color: var(--bg-color);\n background-image: var(--gradient);\n }\n .slider .slider-track-active {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n transform: scale3d(var(--value, 0), 1, 1);\n transform-origin: left;\n background-color: var(--main-color);\n transition: transform 180ms ease-in-out;\n }\n .slider .slider-track-indicator {\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(var(--value, 0) * (100% - 10px));\n width: 10px;\n border-radius: 3px;\n background-color: white;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n transition: left 180ms ease-in-out;\n }\n .slider .slider-track-indicator:after {\n display: block;\n content: "";\n background-color: var(--main-color);\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n margin: auto;\n height: 20px;\n width: 2px;\n border-radius: 1px;\n }\n .inactive .slider .slider-track-background {\n background-color: var(--bg-color-inactive);\n background-image: none;\n }\n .inactive .slider .slider-track-indicator:after {\n background-color: var(--main-color-inactive);\n }\n .inactive .slider .slider-track-active {\n background-color: var(--main-color-inactive);\n }\n .controlled .slider .slider-track-active {\n transition: none;\n }\n .controlled .slider .slider-track-indicator {\n transition: none;\n }\n '])))}}])}();function zg(t){return null!=t.attributes.current_position?Math.round(t.attributes.current_position):void 0}function Og(t){var e=t.state;return"open"===e||"opening"===e?"var(--rgb-state-cover-open)":"closed"===e||"closing"===e?"var(--rgb-state-cover-closed)":"var(--rgb-disabled)"}br([Na({type:Boolean})],Mg.prototype,"disabled",void 0),br([Na({type:Boolean})],Mg.prototype,"inactive",void 0),br([Na({type:Boolean,attribute:"show-active"})],Mg.prototype,"showActive",void 0),br([Na({type:Boolean,attribute:"show-indicator"})],Mg.prototype,"showIndicator",void 0),br([Na({attribute:!1,type:Number,reflect:!0})],Mg.prototype,"value",void 0),br([Na({type:Number})],Mg.prototype,"step",void 0),br([Na({type:Number})],Mg.prototype,"min",void 0),br([Na({type:Number})],Mg.prototype,"max",void 0),br([Ba()],Mg.prototype,"controlled",void 0),br([La("#slider")],Mg.prototype,"slider",void 0),Mg=br([Ia("mushroom-slider")],Mg);var Ig=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,za),pr(e,[{key:"onChange",value:function(t){var e=t.detail.value;this.hass.callService("cover","set_cover_position",{entity_id:this.entity.entity_id,position:e})}},{key:"onCurrentChange",value:function(t){var e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}},{key:"render",value:function(){var t=zg(this.entity);return ha(he||(he=Li(["\n \n "])),t,!Us(this.entity),!0,this.onChange,this.onCurrentChange)}}],[{key:"styles",get:function(){return Tr(de||(de=Li(["\n mushroom-slider {\n --main-color: var(--slider-color);\n --bg-color: var(--slider-bg-color);\n }\n "])))}}])}();br([Na({attribute:!1})],Ig.prototype,"hass",void 0),br([Na({attribute:!1})],Ig.prototype,"entity",void 0),Ig=br([Ia("mushroom-cover-position-control")],Ig);var jg=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2,n=[],o=0;o\n "])),e,!Us(this.entity),!0,this.onChange,this.onCurrentChange)}}],[{key:"styles",get:function(){var t=jg.map((function(t){var e=qi(t,2),n=e[0],o=e[1];return"".concat(o," ").concat(100*n,"%")})).join(", ");return Tr(fe||(fe=Li(["\n mushroom-slider {\n --main-color: var(--slider-color);\n --bg-color: var(--slider-bg-color);\n --gradient: -webkit-linear-gradient(right, ",");\n }\n "])),Sr(t))}}])}();br([Na({attribute:!1})],Pg.prototype,"hass",void 0),br([Na({attribute:!1})],Pg.prototype,"entity",void 0),Pg=br([Ia("mushroom-cover-tilt-position-control")],Pg);var Ng={buttons_control:"mdi:gesture-tap-button",position_control:"mdi:gesture-swipe-horizontal",tilt_position_control:"mdi:rotate-right"};rv({type:kg,name:"Mushroom Cover Card",description:"Card for cover entity"});var Bg=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,ov),pr(e,[{key:"hasControls",get:function(){return this._controls.length>0}},{key:"_nextControl",get:function(){var t;if(this._activeControl)return null!==(t=this._controls[this._controls.indexOf(this._activeControl)+1])&&void 0!==t?t:this._controls[0]}},{key:"_onNextControlTap",value:function(t){t.stopPropagation(),this._activeControl=this._nextControl}},{key:"getCardSize",value:function(){return 1}},{key:"setConfig",value:function(t){$i(e,"setConfig",this,3)([Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)]),this.updateActiveControl(),this.updatePosition()}},{key:"_controls",get:function(){if(!this._config||!this._stateObj)return[];var t=[];return this._config.show_buttons_control&&t.push("buttons_control"),this._config.show_position_control&&t.push("position_control"),this._config.show_tilt_position_control&&t.push("tilt_position_control"),t}},{key:"updateActiveControl",value:function(){var t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}},{key:"updated",value:function(t){$i(e,"updated",this,3)([t]),this.hass&&t.has("hass")&&(this.updatePosition(),this.updateActiveControl())}},{key:"updatePosition",value:function(){this.position=void 0;var t=this._stateObj;t&&(this.position=zg(t))}},{key:"onCurrentPositionChange",value:function(t){null!=t.detail.value&&(this.position=t.detail.value)}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config||!this._config.entity)return fa;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e=this._config.name||t.attributes.friendly_name||"",n=this._config.icon,o=Ol(this._config),i=nv(t,o.icon_type),r=this.hass.formatEntityState(t);if(this.position){var a=this.hass.formatEntityAttributeValue(t,"current_position",this.position);r+=" ⸱ ".concat(a)}var s=Is(this.hass);return ha(me||(me=Li(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),Ka({"fill-container":o.fill_container}),o,s,s,o,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),i?this.renderPicture(i):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,o,e,r),this._controls.length>0?ha(ve||(ve=Li(['\n
\n \n \n ']))):fa}}],[{key:"getConfigElement",value:(n=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return fE}));case 1:return t.a(2,document.createElement(Hg))}}),t)}))),function(){return n.apply(this,arguments)})},{key:"styles",get:function(){return[$i(e,"styles",this),Tr(Ee||(Ee=Li(["\n :host {\n display: block;\n height: 100%;\n }\n\n ha-card {\n background: none;\n height: 100%;\n min-height: 56px;\n display: flex;\n justify-content: center;\n align-items: center;\n --mdc-icon-size: 40px;\n --icon-primary-color: var(--divider-color, rgba(0, 0, 0, 0.12));\n }\n "])))]}}]);var n}();br([Na({type:Boolean})],Dg.prototype,"preview",void 0),Dg=br([Ia(Lg)],Dg);var Rg="".concat(av,"-entity-card"),Ug="".concat(Rg,"-editor");rv({type:Rg,name:"Mushroom Entity Card",description:"Card for all entities"});var Vg=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,ov),pr(e,[{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this._config||!this.hass||!this._config.entity)return fa;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e=this._config.name||t.attributes.friendly_name||"",n=this._config.icon,o=Ol(this._config),i=nv(t,o.icon_type),r=Is(this.hass);return ha(xe||(xe=Li(["\n \n \n \n ","\n ","\n ",";\n \n \n \n "])),Ka({"fill-container":o.fill_container}),o,r,r,o,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),i?this.renderPicture(i):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,o,e))}},{key:"renderIcon",value:function(t,e){var n,o=Rs(t),i={},r=null===(n=this._config)||void 0===n?void 0:n.icon_color;if(r){var a=Gm(r);i["--icon-color"]="rgb(".concat(a,")"),i["--shape-color"]="rgba(".concat(a,", 0.2)")}return ha(Ae||(Ae=Li(['\n ',"
"])),u):t?this.renderIcon(t,e):fa,(t||a)&&n?this.renderBadgeIcon(n,o):void 0,i,r,s)}},{key:"renderPicture",value:function(t){return ha(We||(We=Li(['\n \n \n
\n \n '])),"volume_down",!Us(this.entity)||Vs(this.entity),this.handleClick):void 0,l?ha(An||(An=Li(["\n \n '])),"volume_up",!Us(this.entity)||Vs(this.entity),this.handleClick):void 0)}}],[{key:"styles",get:function(){return Tr(Sn||(Sn=Li(["\n mushroom-slider {\n flex: 1;\n --main-color: rgb(var(--rgb-state-media-player));\n --bg-color: rgba(var(--rgb-state-media-player), 0.2);\n }\n "])))}}])}();br([Na({attribute:!1})],H_.prototype,"hass",void 0),br([Na({attribute:!1})],H_.prototype,"entity",void 0),br([Na({type:Boolean})],H_.prototype,"fill",void 0),br([Na({attribute:!1})],H_.prototype,"controls",void 0),H_=br([Ia("mushroom-media-player-volume-control")],H_);var D_={media_control:"mdi:play-pause",volume_control:"mdi:volume-high"};rv({type:I_,name:"Mushroom Media Card",description:"Card for media player entity"});var R_=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,ov),pr(e,[{key:"hasControls",get:function(){var t,e,n,o;return Boolean(null===(e=null===(t=this._config)||void 0===t?void 0:t.media_controls)||void 0===e?void 0:e.length)||Boolean(null===(o=null===(n=this._config)||void 0===n?void 0:n.volume_controls)||void 0===o?void 0:o.length)}},{key:"_controls",get:function(){if(!this._config||!this._stateObj)return[];var t=this._stateObj,e=[];return function(t,e){return N_(t,null!=e?e:[]).length>0}(t,this._config.media_controls)&&e.push("media_control"),function(t,e){return(null==e?void 0:e.includes("volume_buttons"))&&ts(t,1024)||(null==e?void 0:e.includes("volume_mute"))&&ts(t,8)||(null==e?void 0:e.includes("volume_set"))&&ts(t,4)}(t,this._config.volume_controls)&&e.push("volume_control"),e}},{key:"_onControlTap",value:function(t,e){e.stopPropagation(),this._activeControl=t}},{key:"setConfig",value:function(t){$i(e,"setConfig",this,3)([t]),this.updateActiveControl(),this.updateVolume()}},{key:"updated",value:function(t){$i(e,"updated",this,3)([t]),this.hass&&t.has("hass")&&(this.updateActiveControl(),this.updateVolume())}},{key:"updateVolume",value:function(){this.volume=void 0;var t=this._stateObj;t&&(this.volume=t.attributes.volume_level)}},{key:"onCurrentVolumeChange",value:function(t){null!=t.detail.value&&(this.volume=t.detail.value/100)}},{key:"updateActiveControl",value:function(){var t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this._config||!this.hass||!this._config.entity)return fa;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e,n,o,i=function(t,e){var n,o=t.icon;if(![Bs,Ls,Hs].includes(e.state)&&t.use_media_info)switch(null===(n=e.attributes.app_name)||void 0===n?void 0:n.toLowerCase()){case"spotify":return"mdi:spotify";case"google podcasts":return"mdi:google-podcast";case"plex":return"mdi:plex";case"soundcloud":return"mdi:soundcloud";case"youtube":return"mdi:youtube";case"oto music":return"mdi:music-circle";case"netflix":return"mdi:netflix";default:return}return o}(this._config,t),r=(e=this._config,n=t,o=e.name||n.attributes.friendly_name||"",![Bs,Ls,Hs].includes(n.state)&&e.use_media_info&&n.attributes.media_title&&(o=n.attributes.media_title),o),a=Ol(this._config),s=nv(t,a.icon_type),l=function(t,e,n){var o=n.formatEntityState(e);return![Bs,Ls,Hs].includes(e.state)&&t.use_media_info&&function(t){var e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;default:e=t.attributes.app_name||""}return e}(e)||o}(this._config,t,this.hass);if(null!=this.volume&&this._config.show_volume_level){var c=this.hass.formatEntityAttributeValue(t,"volume_level",this.volume);l+=" ⸱ ".concat(c)}var u=Is(this.hass),h=(!this._config.collapsible_controls||Rs(t))&&this._controls.length;return ha(Tn||(Tn=Li(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),Ka({"fill-container":a.fill_container}),a,u,u,a,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),s?this.renderPicture(s):this.renderIcon(t,i),this.renderBadge(t),this.renderStateInfo(t,a,r,l),h?ha(Mn||(Mn=Li(['\n
\n
\n
\n \n \n
\n
\n ',"\n ","\n
\n \n "])),Wa(h),this._handleAction,il({disabled:!this._hasCardAction,hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),ny(this._hasCardAction?"button":void 0),ny(this._hasCardAction?"0":void 0),!this._hasCardAction,g,t||r||o||i?ha(Jn||(Jn=Li(['
\n ',"\n ","\n
"])),_,t||r?ha(Qn||(Qn=Li(["\n \n ","\n ","\n \n "])),ny(this._hasIconAction?"button":void 0),ny(this._hasIconAction?"0":void 0),this._handleIconAction,b?k:void 0,b?void 0:il(k),this._hasIconAction,r?this.hass.hassUrl(r):void 0,u?"weather":"",r?fa:u?ha(to||(to=Li(['
',"
"])),u):ha(eo||(eo=Li(['\n ','\n \n

',"","

\n
\n "])),ny(o?"button":void 0),ny(o?"0":void 0),Ka({actionable:o}),this._handleTitleAction,il(),t,this.renderArrow()):fa,e?ha(uo||(uo=Li(["\n ',"","\n
\n "])),ny(i?"button":void 0),ny(i?"0":void 0),Ka({actionable:i}),this._handleSubtitleAction,il(),e,this.renderArrow()):fa)}},{key:"renderArrow",value:function(){var t=Is(this.hass);return ha(ho||(ho=Li(["
"])),t?"mdi:chevron-left":"mdi:chevron-right")}},{key:"updated",value:function(t){$i(e,"updated",this,3)([t]),this._config&&this.hass&&this._tryConnect()}},{key:"_tryConnect",value:(s=tr(Zi().m((function t(){var e=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:_y.forEach((function(t){e._tryConnectKey(t)}));case 1:return t.a(2)}}),t)}))),function(){return s.apply(this,arguments)})},{key:"_tryConnectKey",value:(a=tr(Zi().m((function t(e){var n,o,i,r,a=this;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:if(void 0===this._unsubRenderTemplates.get(e)&&this.hass&&this._config&&this.isTemplate(e)){t.n=1;break}return t.a(2);case 1:return t.p=1,i=tl(this.hass.connection,(function(t){a._templateResults=Object.assign(Object.assign({},a._templateResults),Fi({},e,t))}),{template:null!==(n=this._config[e])&&void 0!==n?n:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name},strict:!0}),this._unsubRenderTemplates.set(e,i),t.n=2,i;case 2:t.n=4;break;case 3:t.p=3,t.v,r={result:null!==(o=this._config[e])&&void 0!==o?o:"",listeners:{all:!1,domains:[],entities:[],time:!1}},this._templateResults=Object.assign(Object.assign({},this._templateResults),Fi({},e,r)),this._unsubRenderTemplates.delete(e);case 4:return t.a(2)}}),t,this,[[1,3]])}))),function(t){return a.apply(this,arguments)})},{key:"_tryDisconnect",value:(r=tr(Zi().m((function t(){var e=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:_y.forEach((function(t){e._tryDisconnectKey(t)}));case 1:return t.a(2)}}),t)}))),function(){return r.apply(this,arguments)})},{key:"_tryDisconnectKey",value:(i=tr(Zi().m((function t(e){var n,o;return Zi().w((function(t){for(;;)switch(t.p=t.n){case 0:if(n=this._unsubRenderTemplates.get(e)){t.n=1;break}return t.a(2);case 1:return t.p=1,t.n=2,n;case 2:(0,t.v)(),this._unsubRenderTemplates.delete(e),t.n=5;break;case 3:if(t.p=3,"not_found"!==(o=t.v).code&&"template_error"!==o.code){t.n=4;break}t.n=5;break;case 4:throw o;case 5:return t.a(2)}}),t,this,[[1,3]])}))),function(t){return i.apply(this,arguments)})}],[{key:"getConfigElement",value:(o=tr(Zi().m((function t(){return Zi().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then((function(){return dx}));case 1:return t.a(2,document.createElement(vy))}}),t)}))),function(){return o.apply(this,arguments)})},{key:"getStubConfig",value:(n=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,{type:"custom:".concat(my),title:"Hello, {{ user }} !"})}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return[$i(e,"styles",this),iv,Tr(po||(po=Li(["\n .header {\n display: block;\n padding: var(--title-padding);\n background: none;\n border: none;\n box-shadow: none;\n text-align: var(--card-text-align, inherit);\n }\n .header div * {\n margin: 0;\n white-space: pre-wrap;\n }\n .header div:not(:last-of-type) {\n margin-bottom: var(--title-spacing);\n }\n .actionable {\n cursor: pointer;\n }\n .header ha-icon {\n display: none;\n }\n .actionable ha-icon {\n display: inline-block;\n margin-left: 4px;\n transition: transform 180ms ease-in-out;\n }\n .actionable:hover ha-icon {\n transform: translateX(4px);\n }\n [rtl] .actionable ha-icon {\n margin-left: initial;\n margin-right: 4px;\n }\n [rtl] .actionable:hover ha-icon {\n transform: translateX(-4px);\n }\n .title {\n color: var(--title-color);\n font-size: var(--title-font-size);\n font-weight: var(--title-font-weight);\n line-height: var(--title-line-height);\n letter-spacing: var(--title-letter-spacing);\n --mdc-icon-size: var(--title-font-size);\n }\n .subtitle {\n color: var(--subtitle-color);\n font-size: var(--subtitle-font-size);\n font-weight: var(--subtitle-font-weight);\n line-height: var(--subtitle-line-height);\n letter-spacing: var(--subtitle-letter-spacing);\n --mdc-icon-size: var(--subtitle-font-size);\n }\n .align-start {\n text-align: start;\n }\n .align-end {\n text-align: end;\n }\n .align-center {\n text-align: center;\n }\n .align-justify {\n text-align: justify;\n }\n "])))]}}]);var n,o,i,r,a,s}();br([Ba()],yy.prototype,"_config",void 0),br([Ba()],yy.prototype,"_templateResults",void 0),br([Ba()],yy.prototype,"_unsubRenderTemplates",void 0),yy=br([Ia(my)],yy);var by="".concat(av,"-update-card"),ky="".concat(by,"-editor"),wy=["update"],Cy={on:"var(--rgb-state-update-on)",off:"var(--rgb-state-update-off)",installing:"var(--rgb-state-update-installing)"},Ey=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments)).fill=!1,t}return or(e,za),pr(e,[{key:"_handleInstall",value:function(){this.hass.callService("update","install",{entity_id:this.entity.entity_id})}},{key:"_handleSkip",value:function(t){t.stopPropagation(),this.hass.callService("update","skip",{entity_id:this.entity.entity_id})}},{key:"installDisabled",get:function(){if(!Us(this.entity))return!0;var t=this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version;return!Rs(this.entity)&&!t||Zs(this.entity)}},{key:"skipDisabled",get:function(){return!Us(this.entity)||(this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version||!Rs(this.entity)||Zs(this.entity))}},{key:"render",value:function(){var t=Is(this.hass);return ha(fo||(fo=Li(["\n \n \n \n \n \n \n \n '])),this.fill,t,this.skipDisabled,this._handleSkip,this.installDisabled,this._handleInstall)}}])}();br([Na({attribute:!1})],Ey.prototype,"hass",void 0),br([Na({attribute:!1})],Ey.prototype,"entity",void 0),br([Na({type:Boolean})],Ey.prototype,"fill",void 0),Ey=br([Ia("mushroom-update-buttons-control")],Ey),rv({type:by,name:"Mushroom Update Card",description:"Card for update entity"});var xy=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,ov),pr(e,[{key:"hasControls",get:function(){return!(!this._stateObj||!this._config)&&(Boolean(this._config.show_buttons_control)&&ts(this._stateObj,1))}},{key:"_handleAction",value:function(t){rl(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this._config||!this.hass||!this._config.entity)return fa;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e=this._config.name||t.attributes.friendly_name||"",n=this._config.icon,o=Ol(this._config),i=nv(t,o.icon_type),r=Is(this.hass),a=(!this._config.collapsible_controls||Rs(t))&&this._config.show_buttons_control&&ts(t,1);return ha(mo||(mo=Li(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),Ka({"fill-container":o.fill_container}),o,r,r,o,this._handleAction,il({hasHold:al(this._config.hold_action),hasDoubleClick:al(this._config.double_tap_action)}),i?this.renderPicture(i):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,o,e),a?ha(vo||(vo=Li(['\n \n "])),void 0!==(null===(t=this._config.chip)||void 0===t?void 0:t.type)?ha(Qo||(Qo=Li(['\n
\n \n ',"\n \n ",'\n
\n \n
\n \n \n \n ','\n
\n \n ',"\n \n
\n ","\n "])),this.hass.localize("ui.common.back"),this._goBack,t("editor.chip.sub_element_editor.title"),!this._guiModeAvailable,this._toggleMode,this.hass.localize(this._guiMode?"ui.panel.lovelace.editor.edit_card.show_code_editor":"ui.panel.lovelace.editor.edit_card.show_visual_editor"),"chip"===this.config.type?ha(si||(si=Li(['\n \n
\n ',"\n
\n ","\n "])),this.label||"".concat(e("editor.chip.chip-picker.chips")," (").concat(this.hass.localize("ui.panel.lovelace.editor.card.config.required"),")"),LC([this.chips,this._renderEmptySortable],(function(){return t._renderEmptySortable?"":t.chips.map((function(n,o){return ha(ui||(ui=Li(['\n
\n
\n \n
\n ',"\n ","\n \n \n \n
\n '])),ha(hi||(hi=Li(['\n
\n
\n ','\n \n ',"\n \n
\n
\n "])),t._renderChipLabel(n),t._renderChipSecondary(n)),RC.has(n.type)?fa:ha(di||(di=Li(["\n \n \n \n '])),e("editor.chip.chip-picker.edit"),o,t._editChip),e("editor.chip.chip-picker.clear"),o,t._removeChip)}))})),DC(this._selectorKey,ha(pi||(pi=Li([""])),this.hass,e("editor.chip.chip-picker.add"),"",{select:{options:yC.map((function(t){return{value:t,label:e("editor.chip.chip-picker.types.".concat(t))}})),mode:"dropdown"}},this._addChips)))}},{key:"updated",value:function(t){var n;$i(e,"updated",this,3)([t]);var o=t.has("_attached"),i=t.has("chips");if(i||o)return o&&!this._attached?(null===(n=this._sortable)||void 0===n||n.destroy(),void(this._sortable=void 0)):void(this._sortable||!this.chips?i&&this._handleChipsChanged():this._createSortable())}},{key:"_handleChipsChanged",value:(i=tr(Zi().m((function t(){var e;return Zi().w((function(t){for(;;)switch(t.n){case 0:return this._renderEmptySortable=!0,t.n=1,this.updateComplete;case 1:for(e=this.shadowRoot.querySelector(".chips");e.lastElementChild;)e.removeChild(e.lastElementChild);this._renderEmptySortable=!1;case 2:return t.a(2)}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"_createSortable",value:(o=tr(Zi().m((function t(){var e,n=this;return Zi().w((function(t){for(;;)switch(t.n){case 0:if(NC){t.n=2;break}return t.n=1,Promise.resolve().then((function(){return PS}));case 1:e=t.v,(NC=e.Sortable).mount(e.OnSpill),NC.mount(e.AutoScroll());case 2:this._sortable=new NC(this.shadowRoot.querySelector(".chips"),{animation:150,fallbackClass:"sortable-fallback",handle:".handle",onEnd:function(){var t=tr(Zi().m((function t(e){return Zi().w((function(t){for(;;)if(0===t.n)return t.a(2,n._chipMoved(e))}),t)})));return function(e){return t.apply(this,arguments)}}()});case 3:return t.a(2)}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_addChips",value:(n=tr(Zi().m((function t(e){var n,o,i,r,a;return Zi().w((function(t){for(;;)switch(t.n){case 0:if(""!==(o=null!==(n=e.detail.value)&&void 0!==n?n:"")){t.n=1;break}return t.a(2);case 1:if("conditional"!==o){t.n=2;break}return t.n=2,Xv();case 2:if(!(r=_C(o))||!r.getStubConfig){t.n=4;break}return t.n=3,r.getStubConfig(this.hass);case 3:i=t.v,t.n=5;break;case 4:i={type:o};case 5:a=this.chips.concat(i),this._selectorKey++,Za(this,"chips-changed",{chips:a});case 6:return t.a(2)}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"_chipMoved",value:function(t){if(t.oldIndex!==t.newIndex){var e=this.chips.concat();e.splice(t.newIndex,0,e.splice(t.oldIndex,1)[0]),Za(this,"chips-changed",{chips:e})}}},{key:"_removeChip",value:function(t){var e=t.currentTarget.index,n=this.chips.concat();n.splice(e,1),Za(this,"chips-changed",{chips:n})}},{key:"_editChip",value:function(t){var e=t.currentTarget.index;Za(this,"edit-detail-element",{subElementConfig:{index:e,type:"chip",elementConfig:this.chips[e]}})}},{key:"_renderChipLabel",value:function(t){return vd(this.hass)("editor.chip.chip-picker.types.".concat(t.type))}},{key:"_renderChipSecondary",value:function(t){var e,n,o=vd(this.hass);if("entity"in t&&t.entity)return"".concat(null!==(n=null!==(e=this.getEntityName(t.entity))&&void 0!==e?e:t.entity)&&void 0!==n?n:"");if("chip"in t&&t.chip){var i=o("editor.chip.chip-picker.types.".concat(t.chip.type));return this._renderChipSecondary(t.chip)?"".concat(this._renderChipSecondary(t.chip)," (via ").concat(i,")"):i}return""}},{key:"getEntityName",value:function(t){if(this.hass){var e=this.hass.states[t];if(e)return e.attributes.friendly_name}}}],[{key:"styles",get:function(){return[$i(e,"styles",this),vl,Tr(fi||(fi=Li(["\n .chip {\n display: flex;\n align-items: center;\n }\n\n ha-icon {\n display: flex;\n }\n\n ha-select {\n width: 100%;\n }\n\n .chip .handle {\n padding-right: 8px;\n cursor: move;\n }\n\n .chip .handle > * {\n pointer-events: none;\n }\n\n .special-row {\n height: 60px;\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n }\n\n .special-row div {\n display: flex;\n flex-direction: column;\n }\n\n .remove-icon,\n .edit-icon {\n --mdc-icon-button-size: 36px;\n color: var(--secondary-text-color);\n }\n\n .secondary {\n font-size: 12px;\n color: var(--secondary-text-color);\n }\n "])))]}}]);var n,o,i}(); -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */br([Na({attribute:!1})],UC.prototype,"chips",void 0),br([Na()],UC.prototype,"label",void 0),br([Ba()],UC.prototype,"_attached",void 0),br([Ba()],UC.prototype,"_renderEmptySortable",void 0),br([Ba()],UC.prototype,"_selectorKey",void 0),UC=br([Ia("mushroom-chips-card-chips-editor")],UC);var VC=As({type:Es("action"),icon:Ss(Ts()),icon_color:Ss(Ts()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml)}),FC=As({type:Es("back"),icon:Ss(Ts()),icon_color:Ss(Ts())}),$C=As({type:Es("entity"),entity:Ss(Ts()),name:Ss(Ts()),content_info:Ss(Ts()),icon:Ss(Ts()),icon_color:Ss(Ts()),use_entity_picture:Ss(ws()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml)}),GC=As({type:Es("menu"),icon:Ss(Ts()),icon_color:Ss(Ts())}),KC=As({type:Es("quickbar"),icon:Ss(Ts()),mode:Ss(Cs(["command","device","entity"]))}),YC=As({type:Es("weather"),entity:Ss(Ts()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml),show_temperature:Ss(ws()),show_conditions:Ss(ws())}),qC=As({type:Es("conditional"),chip:Ss(bs()),conditions:Ss(ks(bs()))}),WC=As({type:Es("light"),entity:Ss(Ts()),name:Ss(Ts()),content_info:Ss(Ts()),icon:Ss(Ts()),use_light_color:Ss(ws()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml)}),XC=As({type:Es("template"),entity:Ss(Ts()),tap_action:Ss(ml),hold_action:Ss(ml),double_tap_action:Ss(ml),content:Ss(Ts()),icon:Ss(Ts()),icon_color:Ss(Ts()),picture:Ss(Ts()),entity_id:Ss(zs([Ts(),ks(Ts())]))}),ZC=As({type:Es("spacer")}),JC=ys((function(t){if(t&&"object"===mr(t)&&"type"in t)switch(t.type){case"action":return VC;case"back":return FC;case"entity":return $C;case"menu":return GC;case"quickbar":return KC;case"weather":return YC;case"conditional":return qC;case"light":return WC;case"template":return XC;case"spacer":return ZC}return As()})),QC=gs(ly,As({chips:ks(JC),alignment:Ss(Ts())})),tE=function(t){function e(){return hr(this,e),er(this,e,arguments)}return or(e,Zm),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),Yv()}},{key:"setConfig",value:function(t){ms(t,QC),this._config=t}},{key:"_title",get:function(){return this._config.title||""}},{key:"_theme",get:function(){return this._config.theme||""}},{key:"render",value:function(){var t;if(!this.hass||!this._config)return fa;if(this._subElementEditorConfig)return ha(mi||(mi=Li(["\n \n \n "])),this.hass,this._subElementEditorConfig,this._goBack,this._handleSubElementChanged);var e=vd(this.hass);return ha(vi||(vi=Li(['\n
\n \n \n \n

\n ','\n

\n
\n \n
\n \n ',"\n "])),n("migration.post"))}),this._revertToLegacy,n("migration.revert"),this._done,n("migration.ok")):fa,this.hass,o,e,this._computeLabel,this._computeHelper,this._valueChanged,this.hass.localize("ui.panel.lovelace.editor.card.generic.features"),this.hass,o,i,this._computeLabel,this._computeHelper,this._valueChanged,this.hass,r,null!==(t=this._config.features)&&void 0!==t?t:[],this._featuresChanged,this._editDetailElement)}},{key:"_featuresChanged",value:function(t){if(t.stopPropagation(),this._config&&this.hass){var e=t.detail.features,n=Object.assign(Object.assign({},this._config),{features:e});0===e.length&&delete n.features,Za(this,"config-changed",{config:n})}}},{key:"_editDetailElement",value:function(t){var e=this,n=t.detail.subElementConfig.index,o=this._config.features[n],i=this._featureContext(this._config);Za(this,"edit-sub-element",{config:o,saveConfig:function(t){return e._updateFeature(n,t)},context:i,type:"feature"})}},{key:"_updateFeature",value:function(t,e){var n=this._config.features.concat();n[t]=e;var o=Object.assign(Object.assign({},this._config),{features:n});Za(this,"config-changed",{config:o})}},{key:"_valueChanged",value:function(t){if(t.stopPropagation(),this._config&&this.hass){var e=t.detail.value,n=Object.assign({features:this._config.features},e);n.content_layout&&(n.vertical="vertical"===n.content_layout,delete n.content_layout),n.vertical||delete n.vertical,Za(this,"config-changed",{config:n})}}}],[{key:"styles",get:function(){return[Tr(Oi||(Oi=Li(['\n ha-form {\n display: block;\n margin-bottom: 24px;\n }\n .features-form {\n margin-bottom: 8px;\n }\n ha-expansion-panel {\n display: block;\n --expansion-panel-content-padding: 0;\n border-radius: 6px;\n --ha-card-border-radius: 6px;\n }\n ha-expansion-panel .content {\n padding: 12px;\n }\n ha-expansion-panel > *[slot="header"] {\n margin: 0;\n font-size: inherit;\n font-weight: inherit;\n }\n ha-expansion-panel ha-icon {\n color: var(--secondary-text-color);\n }\n ha-alert {\n margin-bottom: 16px;\n display: block;\n }\n ha-alert a {\n color: var(--primary-color);\n }\n ha-alert .actions {\n display: flex;\n width: 100%;\n flex: 1;\n align-items: flex-end;\n flex-direction: row;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 8px;\n border-radius: 8px;\n }\n '])))]}}])}();br([Na({attribute:!1})],rx.prototype,"hass",void 0),br([Ba()],rx.prototype,"_config",void 0),br([Ba()],rx.prototype,"_legacyConfig",void 0),rx=br([Ia("mushroom-template-card-editor")],rx);var ax=Object.freeze({__proto__:null,get MushroomTemplateCardEditor(){return rx},TEMPLATE_CARD_HELPERS:ix,TEMPLATE_CARD_LABELS:nx,TILE_LABELS:ox}),sx=gs(ly,As({title:Ss(Ts()),subtitle:Ss(Ts()),alignment:Ss(Ts()),title_tap_action:Ss(ml),subtitle_tap_action:Ss(ml)})),lx=["navigate","url","perform-action","none"],cx=["title","subtitle","alignment","title_tap_action","subtitle_tap_action"],ux=Ws((function(t){return[{name:"title",selector:{template:{}}},{name:"subtitle",selector:{template:{}}},{name:"alignment",selector:{select:{options:Ky(t),mode:"dropdown"}}},{name:"title_tap_action",selector:{ui_action:{actions:lx}}},{name:"subtitle_tap_action",selector:{ui_action:{actions:lx}}}]})),hx=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments))._computeLabel=function(e){var n=vd(t.hass);return cx.includes(e.name)?n("editor.card.title.".concat(e.name)):t.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(e.name))},t}return or(e,Zm),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),Yv()}},{key:"setConfig",value:function(t){ms(t,sx),this._config=t}},{key:"render",value:function(){if(!this.hass||!this._config)return fa;var t=vd(this.hass),e=ux(t);return ha(Ii||(Ii=Li(["\n \n "])),this.hass,this._config,e,this._computeLabel,this._valueChanged)}},{key:"_valueChanged",value:function(t){Za(this,"config-changed",{config:t.detail.value})}}])}();br([Ba()],hx.prototype,"_config",void 0),hx=br([Ia(vy)],hx);var dx=Object.freeze({__proto__:null,get TitleCardEditor(){return hx}}),px=gs(ly,gs(Zy,Vy,Dy),As({show_buttons_control:Ss(ws()),collapsible_controls:Ss(ws())})),fx=["show_buttons_control"],mx=["more-info","navigate","url","perform-action","assist","none"],vx=Ws((function(t){return[{name:"entity",selector:{entity:{domain:wy}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}}].concat(Ki(qy(t)),[{type:"grid",name:"",schema:[{name:"show_buttons_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]}],Ki(Ry(mx)))})),gx=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments))._computeLabel=function(e){var n=vd(t.hass);return Wy.includes(e.name)?n("editor.card.generic.".concat(e.name)):fx.includes(e.name)?n("editor.card.update.".concat(e.name)):t.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(e.name))},t}return or(e,Zm),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),Yv()}},{key:"setConfig",value:function(t){ms(t,px),this._config=t}},{key:"render",value:function(){if(!this.hass||!this._config)return fa;var t=vd(this.hass),e=vx(t);return ha(ji||(ji=Li(["\n \n "])),this.hass,this._config,e,this._computeLabel,this._valueChanged)}},{key:"_valueChanged",value:function(t){Za(this,"config-changed",{config:t.detail.value})}}])}();br([Ba()],gx.prototype,"_config",void 0),gx=br([Ia(ky)],gx);var _x=Object.freeze({__proto__:null,get UpdateCardEditor(){return gx}}),yx=["on_off","start_pause","stop","locate","clean_spot","return_home"],bx=gs(ly,gs(Zy,Vy,Dy),As({icon_animation:Ss(ws()),commands:Ss(ks(Ts()))})),kx=["commands"],wx=Ws((function(t,e){return[{name:"entity",selector:{entity:{domain:Ty}}},{name:"name",selector:{text:{}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_animation",selector:{boolean:{}}}]}].concat(Ki(qy(e)),[{name:"commands",selector:{select:{mode:"list",multiple:!0,options:yx.map((function(n){return{value:n,label:"on_off"===n?e("editor.card.vacuum.commands_list.".concat(n)):t("ui.dialogs.more_info_control.vacuum.".concat(n))}}))}}}],Ki(Ry()))})),Cx=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments))._computeLabel=function(e){var n=vd(t.hass);return Wy.includes(e.name)?n("editor.card.generic.".concat(e.name)):kx.includes(e.name)?n("editor.card.vacuum.".concat(e.name)):t.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(e.name))},t}return or(e,Zm),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),Yv()}},{key:"setConfig",value:function(t){ms(t,bx),this._config=t}},{key:"render",value:function(){if(!this.hass||!this._config)return fa;var t=vd(this.hass),e=wx(this.hass.localize,t);return ha(Pi||(Pi=Li(["\n \n "])),this.hass,this._config,e,this._computeLabel,this._valueChanged)}},{key:"_valueChanged",value:function(t){Za(this,"config-changed",{config:t.detail.value})}}])}();br([Ba()],Cx.prototype,"_config",void 0),Cx=br([Ia(Sy)],Cx);var Ex=Object.freeze({__proto__:null,get VacuumCardEditor(){return Cx}}),xx=gs(As({type:Ts(),visibility:bs()}),Dy,As({entity:Ss(Ts()),area:Ss(Ts()),icon:Ss(Ts()),color:Ss(Ts()),label:Ss(Ts()),content:Ss(Ts()),picture:Ss(Ts()),entity_id:Ss(zs([Ts(),ks(Ts())]))})),Ax=["label","content"],Sx=[{name:"context",flatten:!0,type:"expandable",icon:"mdi:shape",schema:[{name:"entity",selector:{entity:{}}},{name:"area",selector:{area:{}}}]},{name:"content",flatten:!0,type:"expandable",icon:"mdi:text-short",schema:[{name:"label",selector:{template:{}}},{name:"content",selector:{template:{}}},{name:"color",selector:{template:{}}},{name:"icon",selector:{template:{}}},{name:"picture",selector:{template:{}}}]},{name:"interactions",type:"expandable",flatten:!0,icon:"mdi:gesture-tap",schema:[{name:"tap_action",selector:{ui_action:{default_action:"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","double_tap_action"].map((function(t){return{name:t,selector:{ui_action:{default_action:"none"}}}}))}]}],Tx=function(t){function e(){var t;return hr(this,e),(t=er(this,e,arguments))._computeLabel=function(e){var n=vd(t.hass);return"expandable"===e.type?n("editor.section.".concat(e.name)):Wy.includes(e.name)?n("editor.card.generic.".concat(e.name)):Ax.includes(e.name)?n("editor.card.template.".concat(e.name)):t.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(e.name))},t._computeHelper=function(e){if("expandable"!==e.type){var n=vd(t.hass);return Xy.includes(e.name)?n("editor.card.generic.".concat(e.name,"_helper")):Ax.includes(e.name)?n("editor.card.template.".concat(e.name,"_helper")):void 0}},t}return or(e,za),pr(e,[{key:"connectedCallback",value:function(){$i(e,"connectedCallback",this,3)([]),Yv()}},{key:"setConfig",value:function(t){ms(t,xx),this._config=t}},{key:"render",value:function(){return this.hass&&this._config?ha(Ni||(Ni=Li(["\n \n "])),this.hass,this._config,Sx,this._computeLabel,this._computeHelper,this._valueChanged):fa}},{key:"_valueChanged",value:function(t){Za(this,"config-changed",{config:t.detail.value})}}])}();br([Na({attribute:!1})],Tx.prototype,"hass",void 0),br([Ba()],Tx.prototype,"_config",void 0),Tx=br([Ia("mushroom-template-badge-editor")],Tx);var Mx=Object.freeze({__proto__:null,get MushroomTemplateBadgeEditor(){return Tx},TEMPLATE_BADGE_LABELS:Ax}); -/**! - * Sortable 1.15.6 - * @author RubaXa - * @author owenm - * @license MIT - */function zx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function Ox(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Bx(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Lx=Bx(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Hx=Bx(/Edge/i),Dx=Bx(/firefox/i),Rx=Bx(/safari/i)&&!Bx(/chrome/i)&&!Bx(/android/i),Ux=Bx(/iP(ad|od|hone)/i),Vx=Bx(/chrome/i)&&Bx(/android/i),Fx={capture:!1,passive:!1};function $x(t,e,n){t.addEventListener(e,n,!Lx&&Fx)}function Gx(t,e,n){t.removeEventListener(e,n,!Lx&&Fx)}function Kx(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Yx(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function qx(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Kx(t,e):Kx(t,e))||o&&t===n)return t;if(t===n)break}while(t=Yx(t))}return null}var Wx,Xx=/\s+/g;function Zx(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(Xx," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(Xx," ")}}function Jx(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Qx(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Jx(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function tA(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=nA(o)[n]))return o;if(o===eA())break;o=lA(o,!1)}return!1}function iA(t,e,n,o){for(var i=0,r=0,a=t.children;r2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=Nx(n,yA);_A.pluginEvent.bind(dS)(t,e,Ox({dragEl:wA,parentEl:CA,ghostEl:EA,rootEl:xA,nextEl:AA,lastDownEl:SA,cloneEl:TA,cloneHidden:MA,dragStarted:VA,putSortable:NA,activeSortable:dS.active,originalEvent:o,oldIndex:zA,oldDraggableIndex:IA,newIndex:OA,newDraggableIndex:jA,hideGhostForTarget:lS,unhideGhostForTarget:cS,cloneNowHidden:function(){MA=!0},cloneNowShown:function(){MA=!1},dispatchSortableEvent:function(t){kA({sortable:e,name:t,originalEvent:o})}},i))};function kA(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,h=t.newDraggableIndex,d=t.originalEvent,p=t.putSortable,f=t.extraEventProperties;if(e=e||n&&n[fA]){var m,v=e.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Lx||Hx?(m=document.createEvent("Event")).initEvent(o,!0,!0):m=new CustomEvent(o,{bubbles:!0,cancelable:!0}),m.to=a||n,m.from=s||n,m.item=i||n,m.clone=r,m.oldIndex=l,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=h,m.originalEvent=d,m.pullMode=p?p.lastPutMode:void 0;var _=Ox(Ox({},f),_A.getEventProperties(o,e));for(var y in _)m[y]=_[y];n&&n.dispatchEvent(m),v[g]&&v[g].call(e,m)}}(Ox({putSortable:NA,cloneEl:TA,targetEl:wA,rootEl:xA,oldIndex:zA,oldDraggableIndex:IA,newIndex:OA,newDraggableIndex:jA},t))}var wA,CA,EA,xA,AA,SA,TA,MA,zA,OA,IA,jA,PA,NA,BA,LA,HA,DA,RA,UA,VA,FA,$A,GA,KA,YA=!1,qA=!1,WA=[],XA=!1,ZA=!1,JA=[],QA=!1,tS=[],eS="undefined"!=typeof document,nS=Ux,oS=Hx||Lx?"cssFloat":"float",iS=eS&&!Vx&&!Ux&&"draggable"in document.createElement("div"),rS=function(){if(eS){if(Lx)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),aS=function(t,e){var n=Jx(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=iA(t,0,e),r=iA(t,1,e),a=i&&Jx(i),s=r&&Jx(r),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+nA(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+nA(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=o&&"none"===n[oS]||r&&"none"===n[oS]&&l+c>o)?"vertical":"horizontal"},sS=function(t){function e(t,n){return function(o,i,r,a){var s=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==Ix(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},lS=function(){!rS&&EA&&Jx(EA,"display","none")},cS=function(){!rS&&EA&&Jx(EA,"display","")};eS&&!Vx&&document.addEventListener("click",(function(t){if(qA)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),qA=!1,!1}),!0);var uS=function(t){if(wA){var e=function(t,e){var n;return WA.some((function(o){var i=o[fA].options.emptyInsertThreshold;if(i&&!rA(o)){var r=nA(o),a=t>=r.left-i&&t<=r.right+i,s=e>=r.top-i&&e<=r.bottom+i;return a&&s?n=o:void 0}})),n}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[fA]._onDragOver(n)}}},hS=function(t){wA&&wA.parentNode[fA]._isOutsideThisEl(t.target)};function dS(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Px({},e),t[fA]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return aS(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==dS.supportPointer&&"PointerEvent"in window&&(!Rx||Ux),emptyInsertThreshold:5};for(var o in _A.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in sS(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&iS,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$x(t,"pointerdown",this._onTapStart):($x(t,"mousedown",this._onTapStart),$x(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($x(t,"dragover",this),$x(t,"dragenter",this)),WA.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Px(this,mA())}function pS(t,e,n,o,i,r,a,s){var l,c,u=t[fA],h=u.options.onMove;return!window.CustomEvent||Lx||Hx?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||nA(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(c=h.call(u,l,a)),c}function fS(t){t.draggable=!1}function mS(){QA=!1}function vS(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function gS(t){return setTimeout(t,0)}function _S(t){return clearTimeout(t)}dS.prototype={constructor:dS,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(FA=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,wA):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=o.filter;if(function(t){tS.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&tS.push(o)}}(n),!wA&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Rx||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=qx(s,o.draggable,n,!1))&&s.animated||SA===s)){if(zA=aA(s),IA=aA(s,o.draggable),"function"==typeof c){if(c.call(this,t,s,this))return kA({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),bA("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=qx(l,o.trim(),n,!1))return kA({sortable:e,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),bA("filter",e,{evt:t}),!0}))))return void(i&&t.preventDefault());o.handle&&!qx(l,o.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(n&&!wA&&n.parentNode===r){var l=nA(n);if(xA=r,CA=(wA=n).parentNode,AA=wA.nextSibling,SA=n,PA=a.group,dS.dragged=wA,BA={target:wA,clientX:(e||t).clientX,clientY:(e||t).clientY},RA=BA.clientX-l.left,UA=BA.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,wA.style["will-change"]="all",o=function(){bA("delayEnded",i,{evt:t}),dS.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!Dx&&i.nativeDraggable&&(wA.draggable=!0),i._triggerDragStart(t,e),kA({sortable:i,name:"choose",originalEvent:t}),Zx(wA,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){tA(wA,t.trim(),fS)})),$x(s,"dragover",uS),$x(s,"mousemove",uS),$x(s,"touchmove",uS),a.supportPointer?($x(s,"pointerup",i._onDrop),!this.nativeDraggable&&$x(s,"pointercancel",i._onDrop)):($x(s,"mouseup",i._onDrop),$x(s,"touchend",i._onDrop),$x(s,"touchcancel",i._onDrop)),Dx&&this.nativeDraggable&&(this.options.touchStartThreshold=4,wA.draggable=!0),bA("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Hx||Lx))o();else{if(dS.eventCanceled)return void this._onDrop();a.supportPointer?($x(s,"pointerup",i._disableDelayedDrag),$x(s,"pointercancel",i._disableDelayedDrag)):($x(s,"mouseup",i._disableDelayedDrag),$x(s,"touchend",i._disableDelayedDrag),$x(s,"touchcancel",i._disableDelayedDrag)),$x(s,"mousemove",i._delayedDragTouchMoveHandler),$x(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&$x(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){wA&&fS(wA),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Gx(t,"mouseup",this._disableDelayedDrag),Gx(t,"touchend",this._disableDelayedDrag),Gx(t,"touchcancel",this._disableDelayedDrag),Gx(t,"pointerup",this._disableDelayedDrag),Gx(t,"pointercancel",this._disableDelayedDrag),Gx(t,"mousemove",this._delayedDragTouchMoveHandler),Gx(t,"touchmove",this._delayedDragTouchMoveHandler),Gx(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$x(document,"pointermove",this._onTouchMove):$x(document,e?"touchmove":"mousemove",this._onTouchMove):($x(wA,"dragend",this),$x(xA,"dragstart",this._onDragStart));try{document.selection?gS((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(YA=!1,xA&&wA){bA("dragStarted",this,{evt:e}),this.nativeDraggable&&$x(document,"dragover",hS);var n=this.options;!t&&Zx(wA,n.dragClass,!1),Zx(wA,n.ghostClass,!0),dS.active=this,t&&this._appendGhost(),kA({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(LA){this._lastX=LA.clientX,this._lastY=LA.clientY,lS();for(var t=document.elementFromPoint(LA.clientX,LA.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(LA.clientX,LA.clientY))!==e;)e=t;if(wA.parentNode[fA]._isOutsideThisEl(t),e)do{if(e[fA]){if(e[fA]._onDragOver({clientX:LA.clientX,clientY:LA.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=Yx(e));cS()}},_onTouchMove:function(t){if(BA){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=EA&&Qx(EA,!0),a=EA&&r&&r.a,s=EA&&r&&r.d,l=nS&&KA&&sA(KA),c=(i.clientX-BA.clientX+o.x)/(a||1)+(l?l[0]-JA[0]:0)/(a||1),u=(i.clientY-BA.clientY+o.y)/(s||1)+(l?l[1]-JA[1]:0)/(s||1);if(!dS.active&&!YA){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,i,this)&&!m.animated){if(m===wA)return O(!1);if(m&&r===t.target&&(a=m),a&&(n=nA(a)),!1!==pS(xA,r,wA,e,a,n,t,!!a))return z(),m&&m.nextSibling?r.insertBefore(wA,m.nextSibling):r.appendChild(wA),CA=r,I(),O(!0)}else if(m&&function(t,e,n){var o=nA(iA(n.el,0,n.options,!0)),i=pA(n.el,n.options,EA),r=10;return e?t.clientXu+c*r/2:lh-GA)return-$A}else if(l>u+c*(1-i)/2&&lh-c*r/2))return l>u+c/2?1:-1;return 0}(t,a,n,i,k?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ZA,FA===a),0!==g){var x=aA(wA);do{x-=g,y=CA.children[x]}while(y&&("none"===Jx(y,"display")||y===EA))}if(0===g||y===a)return O(!1);FA=a,$A=g;var A=a.nextElementSibling,S=!1,T=pS(xA,r,wA,e,a,n,t,S=1===g);if(!1!==T)return 1!==T&&-1!==T||(S=1===T),QA=!0,setTimeout(mS,30),z(),S&&!A?r.appendChild(wA):a.parentNode.insertBefore(wA,S?A:a),C&&hA(C,0,E-C.scrollTop),CA=wA.parentNode,void 0===_||ZA||(GA=Math.abs(_-nA(a)[w])),I(),O(!0)}if(r.contains(wA))return O(!1)}return!1}function M(s,l){bA(s,p,Ox({evt:t,isOwner:u,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:d,target:a,completed:O,onMove:function(n,o){return pS(xA,r,wA,e,n,nA(n),t,o)},changed:I},l))}function z(){M("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function O(e){return M("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(p),p!==d&&(Zx(wA,NA?NA.options.ghostClass:c.options.ghostClass,!1),Zx(wA,s.ghostClass,!0)),NA!==p&&p!==dS.active?NA=p:p===dS.active&&NA&&(NA=null),d===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){M("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(a===wA&&!wA.animated||a===r&&!a.animated)&&(FA=null),s.dragoverBubble||t.rootEl||a===document||(wA.parentNode[fA]._isOutsideThisEl(t.target),!e&&uS(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function I(){OA=aA(wA),jA=aA(wA,s.draggable),kA({sortable:p,name:"change",toEl:r,newIndex:OA,newDraggableIndex:jA,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Gx(document,"mousemove",this._onTouchMove),Gx(document,"touchmove",this._onTouchMove),Gx(document,"pointermove",this._onTouchMove),Gx(document,"dragover",uS),Gx(document,"mousemove",uS),Gx(document,"touchmove",uS)},_offUpEvents:function(){var t=this.el.ownerDocument;Gx(t,"mouseup",this._onDrop),Gx(t,"touchend",this._onDrop),Gx(t,"pointerup",this._onDrop),Gx(t,"pointercancel",this._onDrop),Gx(t,"touchcancel",this._onDrop),Gx(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;OA=aA(wA),jA=aA(wA,n.draggable),bA("drop",this,{evt:t}),CA=wA&&wA.parentNode,OA=aA(wA),jA=aA(wA,n.draggable),dS.eventCanceled||(YA=!1,ZA=!1,XA=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_S(this.cloneId),_S(this._dragStartId),this.nativeDraggable&&(Gx(document,"drop",this),Gx(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Rx&&Jx(document.body,"user-select",""),Jx(wA,"transform",""),t&&(VA&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),EA&&EA.parentNode&&EA.parentNode.removeChild(EA),(xA===CA||NA&&"clone"!==NA.lastPutMode)&&TA&&TA.parentNode&&TA.parentNode.removeChild(TA),wA&&(this.nativeDraggable&&Gx(wA,"dragend",this),fS(wA),wA.style["will-change"]="",VA&&!YA&&Zx(wA,NA?NA.options.ghostClass:this.options.ghostClass,!1),Zx(wA,this.options.chosenClass,!1),kA({sortable:this,name:"unchoose",toEl:CA,newIndex:null,newDraggableIndex:null,originalEvent:t}),xA!==CA?(OA>=0&&(kA({rootEl:CA,name:"add",toEl:CA,fromEl:xA,originalEvent:t}),kA({sortable:this,name:"remove",toEl:CA,originalEvent:t}),kA({rootEl:CA,name:"sort",toEl:CA,fromEl:xA,originalEvent:t}),kA({sortable:this,name:"sort",toEl:CA,originalEvent:t})),NA&&NA.save()):OA!==zA&&OA>=0&&(kA({sortable:this,name:"update",toEl:CA,originalEvent:t}),kA({sortable:this,name:"sort",toEl:CA,originalEvent:t})),dS.active&&(null!=OA&&-1!==OA||(OA=zA,jA=IA),kA({sortable:this,name:"end",toEl:CA,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){bA("nulling",this),xA=wA=CA=EA=AA=TA=SA=MA=BA=LA=VA=OA=jA=zA=IA=FA=$A=NA=PA=dS.dragged=dS.ghost=dS.clone=dS.active=null,tS.forEach((function(t){t.checked=!0})),tS.length=HA=DA=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":wA&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o()=>(t&&(e=t(t=0)),e),Ct=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),$t=(t,e)=>{let o={};for(var i in t)_t(o,i,{get:t[i],enumerable:!0});return e||_t(o,Symbol.toStringTag,{value:"Module"}),o},Et=(t,e,o)=>(o=null!=t?gt(yt(t)):{},((t,e,o,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var n,r=bt(e),a=0,s=r.length;ae[t]).bind(null,n),enumerable:!(i=vt(e,n))||i.enumerable});return t})(!e&&t&&t.__esModule?o:_t(o,"default",{value:t,enumerable:!0}),t)),xt=/* @__PURE__ */(t=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(t,{get:(t,e)=>("undefined"!=typeof require?require:t)[e]}):t)(function(t){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Calling `require` for "'+t+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")}),At=kt(()=>{t="5.2.1",e={type:"git",url:"https://github.com/piitaya/lovelace-mushroom"}}),St=kt(()=>{o=globalThis,i=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=/* @__PURE__ */new WeakMap,a=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&r.set(e,t))}return t}toString(){return this.cssText}},s=t=>new a("string"==typeof t?t:t+"",void 0,n),l=(t,...e)=>new a(1===t.length?t[0]:e.reduce((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1],t[0]),t,n),c=(t,e)=>{if(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),n=o.litNonce;void 0!==n&&e.setAttribute("nonce",n),e.textContent=i.cssText,t.appendChild(e)}},u=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return s(e)})(t):t}),Tt=kt(()=>{St(),({is:f,defineProperty:g,getOwnPropertyDescriptor:_,getOwnPropertyNames:v,getOwnPropertySymbols:b,getPrototypeOf:y}=Object),w=globalThis,k=w.trustedTypes,C=k?k.emptyScript:"",$=w.reactiveElementPolyfillSupport,E=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?C:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},A=(t,e)=>!f(t,e),S={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:A},null!==(d=(h=Symbol).metadata)&&void 0!==d||(h.metadata=Symbol("metadata")),null!==(p=w.litPropertyMetadata)&&void 0!==p||(w.litPropertyMetadata=/* @__PURE__ */new WeakMap),T=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=S){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&g(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){var i;const{get:n,set:r}=null!==(i=_(this.prototype,t))&&void 0!==i?i:{get(){return this[e]},set(t){this[e]=t}};return{get:n,set(e){const i=null==n?void 0:n.call(this);null==r||r.call(this,e),this.requestUpdate(t,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:S}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=y(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...v(t),...b(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=/* @__PURE__ */new Map;for(const[e,o]of this.elementProperties){const t=this._$Eu(e,o);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach(t=>t(this))}addController(t){var e,o;(null!==(e=this._$EO)&&void 0!==e?e:this._$EO=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null===(o=t.hostConnected)||void 0===o||o.call(t))}removeController(t){var e;null===(e=this._$EO)||void 0===e||e.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$EO)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$EO)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){var n;const r=(void 0!==(null===(n=o.converter)||void 0===n?void 0:n.toAttribute)?o.converter:x).toAttribute(e,o.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){var n,r,a;const t=o.getPropertyOptions(i),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:x;this._$Em=i;const l=s.fromAttribute(e,t.type);this[i]=null!==(r=null!=l?l:null===(a=this._$Ej)||void 0===a?void 0:a.get(i))&&void 0!==r?r:l,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){var i,n,r;const a=this.constructor,s=this[t];if(null!==(i=o)&&void 0!==i||(o=a.getPropertyOptions(t)),!((null!==(n=o.hasChanged)&&void 0!==n?n:A)(s,e)||o.useDefault&&o.reflect&&s===(null===(r=this._$Ej)||void 0===r?void 0:r.get(t))&&!this.hasAttribute(a._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:n},r){var a,s,l;o&&!(null!==(a=this._$Ej)&&void 0!==a?a:this._$Ej=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,null!==(s=null!=r?r:e)&&void 0!==s?s:this[t]),!0!==n||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(null!==(l=this._$Eq)&&void 0!==l?l:this._$Eq=/* @__PURE__ */new Set).add(t))}async _$EP(){var t=this;t.isUpdatePending=!0;try{await t._$ES}catch(e){Promise.reject(e)}const e=t.scheduleUpdate();return null!=e&&await e,!t.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,o]of e){const{wrapped:e}=o,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,o,i)}}let e=!1;const o=this._$AL;try{var i;e=this.shouldUpdate(o),e?(this.willUpdate(o),null===(i=this._$EO)||void 0===i||i.forEach(t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)}),this.update(o)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(o)}willUpdate(t){}_$AE(t){var e;null===(e=this._$EO)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}},T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[E("elementProperties")]=/* @__PURE__ */new Map,T[E("finalized")]=/* @__PURE__ */new Map,null==$||$({ReactiveElement:T}),(null!==(m=w.reactiveElementVersions)&&void 0!==m?m:w.reactiveElementVersions=[]).push("2.1.1")});function Mt(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==P?P.createHTML(e):e}function It(t,e,o=t,i){var n,r,a;if(e===tt)return e;let s=void 0!==i?null===(n=o._$Co)||void 0===n?void 0:n[i]:o._$Cl;const l=H(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==l&&(null==s||null===(r=s._$AO)||void 0===r||r.call(s,!1),void 0===l?s=void 0:(s=new l(t),s._$AT(t,o,i)),void 0!==i?(null!==(a=o._$Co)&&void 0!==a?a:o._$Co=[])[i]=s:o._$Cl=s),void 0!==s&&(e=It(t,s._$AS(t,e.values),s,i)),e}var zt,Pt,Nt,Ot,Bt,Lt,Dt,jt,Ht=kt(()=>{I=globalThis,z=I.trustedTypes,P=z?z.createPolicy("lit-html",{createHTML:t=>t}):void 0,N="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,L=`<${B="?"+O}>`,D=document,j=()=>D.createComment(""),H=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,U=t=>R(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),V="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,K=/>/g,Y=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),q=/'/g,W=/"/g,X=/^(?:script|style|textarea|title)$/i,Z=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),J=Z(1),Q=Z(2),Z(3),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),ot=/* @__PURE__ */new WeakMap,it=D.createTreeWalker(D,129),nt=(t,e)=>{const o=t.length-1,i=[];let n,r=2===e?"":3===e?"":"",a=F;for(let l=0;l"===c[0]?(a=null!==(s=n)&&void 0!==s?s:F,u=-1):void 0===c[1]?u=-2:(u=a.lastIndex-c[2].length,o=c[1],a=void 0===c[3]?Y:'"'===c[3]?W:q):a===W||a===q?a=Y:a===G||a===K?a=F:(a=Y,n=void 0);const d=a===Y&&t[l+1].startsWith("/>")?" ":"";r+=a===F?e+L:u>=0?(i.push(o),e.slice(0,u)+N+e.slice(u)+O+d):e+O+(-2===u?l:d)}return[Mt(t,r+(t[o]||"")+(2===e?"":3===e?"":"")),i]},rt=class t{constructor({strings:e,_$litType$:o},i){let n;this.parts=[];let r=0,a=0;const s=e.length-1,l=this.parts,[c,u]=nt(e,o);if(this.el=t.createElement(c,i),it.currentNode=this.el.content,2===o||3===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(n=it.nextNode())&&l.length0){n.textContent=z?z.emptyScript:"";for(let o=0;o2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(/* @__PURE__ */new String),this.strings=o):this._$AH=et}_$AI(t,e=this,o,i){const n=this.strings;let r=!1;if(void 0===n)t=It(this,t,e,0),r=!H(t)||t!==this._$AH&&t!==tt,r&&(this._$AH=t);else{var a;const i=t;let s,l;for(t=n[0],s=0;s{var i;const n=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:e;let r=n._$litPart$;if(void 0===r){var a;const t=null!==(a=null==o?void 0:o.renderBefore)&&void 0!==a?a:null;n._$litPart$=r=new st(e.insertBefore(j(),t),t,void 0,null!=o?o:{})}return r._$AI(t),r}}),Rt=kt(()=>{Tt(),Tt(),Ht(),Ht(),Nt=globalThis,Ot=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const o=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=o.firstChild),o}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ft(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return tt}},Ot._$litElement$=!0,Ot.finalized=!0,null===(zt=Nt.litElementHydrateSupport)||void 0===zt||zt.call(Nt,{LitElement:Ot}),null==(Bt=Nt.litElementPolyfillSupport)||Bt({LitElement:Ot}),(null!==(Pt=Nt.litElementVersions)&&void 0!==Pt?Pt:Nt.litElementVersions=[]).push("4.2.1")}),Ut=kt(()=>{}),Vt=kt(()=>{Tt(),Ht(),Rt(),Ut()}),Ft=kt(()=>{Lt=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)}});function Gt(t){return(e,o)=>"object"==typeof o?jt(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}var Kt=kt(()=>{Tt(),Dt={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:A},jt=(t=Dt,e,o)=>{const{kind:i,metadata:n}=o;let r=globalThis.litPropertyMetadata.get(n);if(void 0===r&&globalThis.litPropertyMetadata.set(n,r=/* @__PURE__ */new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),r.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const n=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const n=this[i];e.call(this,o),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)}});function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}var qt=kt(()=>{});var Wt=kt(()=>{qt()});function Xt(t){var e=function(t,e){if("object"!=Yt(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!=Yt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Yt(e)?e:e+""}var Zt=kt(()=>{qt(),Wt()});function Jt(t,e,o){return(e=Xt(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var Qt=kt(()=>{Zt()});function te(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,i)}return o}function ee(t){for(var e=1;e{Qt()});function ie(t){return Gt(ee(ee({},t),{},{state:!0,attribute:!1}))}var ne,re=kt(()=>{Kt(),oe()}),ae=kt(()=>{}),se=kt(()=>{ne=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o)});function le(t,e){return(o,i,n)=>{const r=e=>{var o,i;return null!==(o=null===(i=e.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null};if(e){const{get:t,set:e}="object"==typeof i?o:null!=n?n:(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return ne(o,i,{get(){let o=t.call(this);return void 0===o&&(o=r(this),(null!==o||this.hasUpdated)&&e.call(this,o)),o}})}return ne(o,i,{get(){return r(this)}})}}var ce,ue,he,de,pe,me,fe,ge,_e,ve,be,ye,we,ke,Ce,$e,Ee,xe,Ae,Se,Te,Me,Ie=kt(()=>{se()}),ze=kt(()=>{}),Pe=kt(()=>{}),Ne=kt(()=>{}),Oe=kt(()=>{}),Be=kt(()=>{Ft(),Kt(),re(),ae(),Ie(),ze(),Pe(),Ne(),Oe()}),Le=kt(()=>{ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ue=t=>(...e)=>({_$litDirective$:t,values:e}),he=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}}),De=kt(()=>{Ht(),Le(),de=ue(class extends he{constructor(t){var e;if(super(t),t.type!==ce.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){var o;this.st=/* @__PURE__ */new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(t))&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const r of this.st)r in e||(i.remove(r),this.st.delete(r));for(const r in e){var n;const t=!!e[r];t===this.st.has(r)||null!==(n=this.nt)&&void 0!==n&&n.has(r)||(t?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return tt}})}),je=kt(()=>{De()}),He=kt(()=>{Ht(),Le(),me=" !"+(pe="important"),fe=ue(class extends he{constructor(t){var e;if(super(t),t.type!==ce.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,o)=>{const i=t[o];return null==i?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(t,[e]){const{style:o}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)null==e[i]&&(this.ft.delete(i),i.includes("-")?o.removeProperty(i):o[i]=null);for(const i in e){const t=e[i];if(null!=t){this.ft.add(i);const e="string"==typeof t&&t.endsWith(me);i.includes("-")||e?o.setProperty(i,e?t.slice(0,-11):t,e?pe:""):o[i]=t}}return tt}})}),Re=kt(()=>{He()}),Ue=kt(()=>{ge=(t,e,o,i)=>{const[n,r,a]=t.split(".",3);return Number(n)>e||Number(n)===e&&(void 0===i?Number(r)>=o:Number(r)>o||Number(r)===o&&Number(a)>=i)}}),Ve=kt(()=>{_e=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"])}),Fe=kt(()=>{ve=(t,e,o,i)=>{i=i||{},o=null==o?{}:o;const n=new Event(e,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return n.detail=o,t.dispatchEvent(n),n}}),Ge=kt(()=>{0}),Ke=kt(()=>{Ge(),"ha-main-window"===window.name?window:"ha-main-window"===parent.name?parent:top}),Ye=kt(()=>{be=t=>t.substr(0,t.indexOf("."))}),qe=kt(()=>{Ye(),ye=t=>be(t.entity_id)}),We=kt(()=>{we=(t,e)=>ke(t.attributes,e),ke=(t,e)=>0!==(t.supported_features&e)}),Xe=kt(()=>{Ce=(t,e,o)=>Math.min(Math.max(t,e),o),$e=(t,e,o)=>{let i;return i=e?Math.max(t,e):t,i=o?Math.min(i,o):i,i}}),Ze=kt(()=>{Ee=/* @__PURE__ */function(t){return t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none",t}({})}),Je=kt(()=>{xe=(t,e=2)=>Math.round(t*10**e)/10**e}),Qe=kt(()=>{Ze(),Je(),oe(),Ae=t=>{switch(t.number_format){case Ee.comma_decimal:return["en-US","en"];case Ee.decimal_comma:return["de","es","it"];case Ee.space_comma:return["fr","sv","cs"];case Ee.system:return;default:return t.language}},Se=(t,e,o)=>{const i=e?Ae(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==Ee.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(i,Me(t,o)).format(Number(t))}catch(n){return console.error(n),new Intl.NumberFormat(void 0,Me(t,o)).format(Number(t))}return"string"==typeof t?t:`${xe(t,null==o?void 0:o.maximumFractionDigits).toString()}${"currency"===(null==o?void 0:o.style)?` ${o.currency}`:""}`},Te=(t,e)=>{var o;const i=null==e?void 0:e.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(null===(o=t.attributes)||void 0===o?void 0:o.step))&&Number.isInteger(Number(t.state))?{maximumFractionDigits:0}:null!=t.attributes.step?{maximumFractionDigits:Math.ceil(Math.log10(1/t.attributes.step))}:void 0},Me=(t,e)=>{const o=ee({maximumFractionDigits:2},e);if("string"!=typeof t)return o;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;o.minimumFractionDigits=e,o.maximumFractionDigits=e}return o}});var to=kt(()=>{});var eo,oo,io,no=kt(()=>{to()});function ro(t){return"object"==typeof t&&null!=t}function ao(t){return ro(t)&&!Array.isArray(t)}function so(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function lo(t,e,o,i){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:n,branch:r}=e,{type:a}=o,{refinement:s,message:l=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${so(i)}\``}=t;return ee(ee({value:i,type:a,refinement:s,key:n[n.length-1],path:n,branch:r},t),{},{message:l})}function*co(t,e,o,i){(function(t){return ro(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const n of t){const t=lo(n,e,o,i);t&&(yield t)}}function*uo(t,e,o={}){const{path:i=[],branch:n=[t],coerce:r=!1,mask:a=!1}=o,s={path:i,branch:n,mask:a};r&&(t=e.coercer(t,s));let l="valid";for(const c of e.validator(t,s))c.explanation=o.message,l="not_valid",yield[c,void 0];for(let[c,u,h]of e.entries(t,s)){const e=uo(u,h,{path:void 0===c?i:[...i,c],branch:void 0===c?n:[...n,u],coerce:r,mask:a,message:o.message});for(const o of e)o[0]?(l=null!=o[0].refinement?"not_refined":"not_valid",yield[o[0],void 0]):r&&(u=o[1],void 0===c?t=u:t instanceof Map?t.set(c,u):t instanceof Set?t.add(u):ro(t)&&(void 0!==u||c in t)&&(t[c]=u))}if("not_valid"!==l)for(const c of e.refiner(t,s))c.explanation=o.message,l="not_refined",yield[c,void 0];"valid"===l&&(yield[void 0,t])}function ho(t,e,o){const i=po(t,e,{message:o});if(i[0])throw i[0]}function po(t,e,o={}){const i=uo(t,e,o),n=function(t){const{done:e,value:o}=t.next();return e?void 0:o}(i);return n[0]?[new oo(n[0],function*(){for(const t of i)t[0]&&(yield t[0])}),void 0]:[void 0,n[1]]}function mo(...t){const e="type"===t[0].type,o=t.map(t=>t.schema),i=Object.assign({},...o);return e?xo(i):Co(i)}function fo(t,e){return new io({type:t,schema:null,validator:e})}function go(t){return new io({type:"dynamic",schema:null,*entries(e,o){yield*t(e,o).entries(e,o)},validator:(e,o)=>t(e,o).validator(e,o),coercer:(e,o)=>t(e,o).coercer(e,o),refiner:(e,o)=>t(e,o).refiner(e,o)})}function _o(){return fo("any",()=>!0)}function vo(t){return new io({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[o,i]of e.entries())yield[o,i,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${so(t)}`})}function bo(){return fo("boolean",t=>"boolean"==typeof t)}function yo(t){const e={},o=t.map(t=>so(t)).join();for(const i of t)e[i]=i;return new io({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${o}\`, but received: ${so(e)}`})}function wo(t){const e=so(t),o=typeof t;return new io({type:"literal",schema:"string"===o||"number"===o||"boolean"===o?t:null,validator:o=>o===t||`Expected the literal \`${e}\`, but received: ${so(o)}`})}function ko(){return fo("number",t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${so(t)}`)}function Co(t){const e=t?Object.keys(t):[],o=fo("never",()=>!1);return new io({type:"object",schema:t||null,*entries(i){if(t&&ro(i)){const n=new Set(Object.keys(i));for(const o of e)n.delete(o),yield[o,i[o],t[o]];for(const t of n)yield[t,i[t],o]}},validator:t=>ao(t)||`Expected an object, but received: ${so(t)}`,coercer(e,o){if(!ao(e))return e;const i=ee({},e);if(o.mask&&t)for(const n in i)void 0===t[n]&&delete i[n];return i}})}function $o(t){return new io(ee(ee({},t),{},{validator:(e,o)=>void 0===e||t.validator(e,o),refiner:(e,o)=>void 0===e||t.refiner(e,o)}))}function Eo(){return fo("string",t=>"string"==typeof t||`Expected a string, but received: ${so(t)}`)}function xo(t){const e=Object.keys(t);return new io({type:"type",schema:t,*entries(o){if(ro(o))for(const i of e)yield[i,o[i],t[i]]},validator:t=>ao(t)||`Expected an object, but received: ${so(t)}`,coercer:t=>ao(t)?ee({},t):t})}function Ao(t){const e=t.map(t=>t.type).join(" | ");return new io({type:"union",schema:null,coercer(e,o){for(const i of t){const[t,n]=i.validate(e,{coerce:!0,mask:o.mask});if(!t)return n}return e},validator(o,i){const n=[];for(const e of t){const[...t]=uo(o,e,i),[r]=t;if(!r[0])return[];for(const[e]of t)e&&n.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${so(o)}`,...n]}})}var So,To=kt(()=>{no(),oe(),eo=["message","explanation"],oo=class extends TypeError{constructor(t,e){let o;const{message:i,explanation:n}=t,r=function(t,e){if(null==t)return{};var o,i,n=function(t,e){if(null==t)return{};var o={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;o[i]=t[i]}return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i{var i;return null!==(i=o)&&void 0!==i?i:o=[t,...e()]}}},io=class{constructor(t){const{type:e,schema:o,validator:i,refiner:n,coercer:r=t=>t,entries:a=function*(){}}=t;this.type=e,this.schema=o,this.entries=a,this.coercer=r,this.validator=i?(t,e)=>co(i(t,e),e,this,t):()=>[],this.refiner=n?(t,e)=>co(n(t,e),e,this,t):()=>[]}assert(t,e){return ho(t,this,e)}create(t,e){return function(t,e,o){const i=po(t,e,{coerce:!0,message:o});if(i[0])throw i[0];return i[1]}(t,this,e)}is(t){return function(t,e){return!po(t,e)[0]}(t,this)}mask(t,e){return function(t,e,o){const i=po(t,e,{coerce:!0,mask:!0,message:o});if(i[0])throw i[0];return i[1]}(t,this,e)}validate(t,e={}){return po(t,this,e)}}}),Mo=kt(()=>{To(),So=(t,e)=>{if(!(e instanceof oo))return{warnings:[e.message],errors:void 0};const o=[],i=[];for(const n of e.failures())if(void 0===n.value)o.push(t.localize("ui.errors.config.key_missing","key",n.path.join(".")));else if("never"===n.type)i.push(t.localize("ui.errors.config.key_not_expected","key",n.path.join(".")));else{if("union"===n.type)continue;"enums"===n.type?i.push(t.localize("ui.errors.config.key_wrong_type","key",n.path.join("."),"type_correct",n.message.replace("Expected ","").split(", ")[0],"type_wrong",JSON.stringify(n.value))):i.push(t.localize("ui.errors.config.key_wrong_type","key",n.path.join("."),"type_correct",n.refinement||n.type,"type_wrong",JSON.stringify(n.value)))}return{warnings:i,errors:o}}}),Io=kt(()=>{});function zo(t){const e=t.language||"en";return t.translationMetadata.translations[e]&&t.translationMetadata.translations[e].isRTL||!1}var Po,No,Oo,Bo,Lo,Do=kt(()=>{}),jo=kt(()=>{Po=(t,e,o=!1)=>{let i;const n=(...n)=>{const r=o&&!i;clearTimeout(i),i=window.setTimeout(()=>{i=void 0,o||t(...n)},e),r&&t(...n)};return n.cancel=()=>{clearTimeout(i)},n}}),Ho=kt(()=>{No=(t,e)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let o,i;if(Array.isArray(t)){if(i=t.length,i!==e.length)return!1;for(o=i;0!==o--;)if(!No(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!No(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(i=t.length,i!==e.length)return!1;for(o=i;0!==o--;)if(t[o]!==e[o])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(i=n.length,i!==Object.keys(e).length)return!1;for(o=i;0!==o--;)if(!Object.prototype.hasOwnProperty.call(e,n[o]))return!1;for(o=i;0!==o--;){const i=n[o];if(!No(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}}),Ro=kt(()=>{}),Uo=kt(()=>{Oo={auto:1,heat_cool:2,heat:3,cool:4,dry:5,fan_only:6,off:7},Bo=(t,e)=>Oo[t]-Oo[e],Lo=/* @__PURE__ */function(t){return t[t.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",t[t.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",t[t.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",t[t.FAN_MODE=8]="FAN_MODE",t[t.PRESET_MODE=16]="PRESET_MODE",t[t.SWING_MODE=32]="SWING_MODE",t[t.AUX_HEAT=64]="AUX_HEAT",t[t.TURN_OFF=128]="TURN_OFF",t[t.TURN_ON=256]="TURN_ON",t[t.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",t}({})});var Vo,Fo,Go,Ko=kt(()=>{});function Yo(t){const e=be(t.entity_id),o=t.state;if(["button","input_button","scene"].includes(e))return o!==Vo;if(Go.includes(o))return!1;switch(e){case"cover":case"valve":return!["closed","closing"].includes(o);case"device_tracker":case"person":return"not_home"!==o;case"media_player":return"standby"!==o;case"vacuum":return!["idle","docked","paused"].includes(o);case"plant":return"problem"===o;default:return!0}}function qo(t){return t.state!==Vo}function Wo(t){return"off"===t.state}function Xo(t){return t.attributes.entity_picture_local||t.attributes.entity_picture}var Zo,Jo,Qo,ti,ei,oi,ii,ni,ri,ai,si,li=kt(()=>{Ye(),Go=[Vo="unavailable",Fo="unknown","off"]}),ci=kt(()=>{}),ui=kt(()=>{}),hi=kt(()=>{}),di=kt(()=>{Jo=[(Zo=/* @__PURE__ */function(t){return t.UNKNOWN="unknown",t.ONOFF="onoff",t.BRIGHTNESS="brightness",t.COLOR_TEMP="color_temp",t.HS="hs",t.XY="xy",t.RGB="rgb",t.RGBW="rgbw",t.RGBWW="rgbww",t.WHITE="white",t}({})).HS,Zo.XY,Zo.RGB,Zo.RGBW,Zo.RGBWW],Qo=[...Jo,Zo.COLOR_TEMP,Zo.BRIGHTNESS,Zo.WHITE],ti=t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some(t=>Jo.includes(t)))||!1},ei=t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some(t=>Qo.includes(t)))||!1}}),pi=kt(()=>{oi="locked",ii="locking",ni="unlocked",ri="unlocking"}),mi=kt(()=>{}),fi=kt(()=>{ai=t=>{let e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;default:e=t.attributes.app_name||""}return e}});function gi(t,e){return t===e||!(!si(t)||!si(e))}function _i(t,e){if(t.length!==e.length)return!1;for(var o=0;o{si=Number.isNaN||function(t){return"number"==typeof t&&t!=t}}),Bi=kt(()=>{Oi(),vi(t=>new Intl.Collator(t)),vi(t=>new Intl.Collator(t,{sensitivity:"accent"}))}),Li=kt(()=>{We(),Bi(),bi=t=>yi(t.attributes),yi=t=>ke(t,4)&&"number"==typeof t.in_progress,wi=t=>bi(t)||!!t.attributes.in_progress}),Di=kt(()=>{ki="cleaning",Ci="docked",$i="idle",Ei="returning",xi=1024,Ai=8192}),ji=kt(()=>{oe(),Si=(t,e,o)=>t.subscribeMessage(t=>e(t),ee({type:"render_template"},o))}),Hi=kt(()=>{}),Ri=kt(()=>{}),Ui=kt(()=>{Le()}),Vi=kt(()=>{Vt(),Ui(),Fe(),Ho(),Ti="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,Mi=class extends HTMLElement{constructor(...t){super(...t),this.holdTime=500,this.held=!1,this.cancelled=!1}connectedCallback(){Object.assign(this.style,{position:"fixed",width:Ti?"100px":"50px",height:Ti?"100px":"50px",transform:"translate(-50%, -50%) scale(0)",pointerEvents:"none",zIndex:"999",background:"var(--primary-color)",display:null,opacity:"0.2",borderRadius:"50%",transition:"transform 180ms ease-in-out"}),["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach(t=>{document.addEventListener(t,()=>{this.cancelled=!0,this.timer&&(this._stopAnimation(),clearTimeout(this.timer),this.timer=void 0)},{passive:!0})})}bind(t,e={}){t.actionHandler&&No(e,t.actionHandler.options)||(t.actionHandler?(t.removeEventListener("touchstart",t.actionHandler.start),t.removeEventListener("touchend",t.actionHandler.end),t.removeEventListener("touchcancel",t.actionHandler.end),t.removeEventListener("mousedown",t.actionHandler.start),t.removeEventListener("click",t.actionHandler.end),t.removeEventListener("keydown",t.actionHandler.handleKeyDown)):t.addEventListener("contextmenu",t=>{const e=t||window.event;return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,e.returnValue=!1,!1}),t.actionHandler={options:e},e.disabled||(t.actionHandler.start=t=>{let o,i;this.cancelled=!1,t.touches?(o=t.touches[0].clientX,i=t.touches[0].clientY):(o=t.clientX,i=t.clientY),e.hasHold&&(this.held=!1,this.timer=window.setTimeout(()=>{this._startAnimation(o,i),this.held=!0},this.holdTime))},t.actionHandler.end=t=>{if("touchcancel"===t.type||"touchend"===t.type&&this.cancelled)return;const o=t.target;t.cancelable&&t.preventDefault(),e.hasHold&&(clearTimeout(this.timer),this._stopAnimation(),this.timer=void 0),e.hasHold&&this.held?ve(o,"action",{action:"hold"}):e.hasDoubleClick?"click"===t.type&&t.detail<2||!this.dblClickTimeout?this.dblClickTimeout=window.setTimeout(()=>{this.dblClickTimeout=void 0,!1!==e.hasTap&&ve(o,"action",{action:"tap"})},250):(clearTimeout(this.dblClickTimeout),this.dblClickTimeout=void 0,ve(o,"action",{action:"double_tap"})):!1!==e.hasTap&&ve(o,"action",{action:"tap"})},t.actionHandler.handleKeyDown=t=>{["Enter"," "].includes(t.key)&&t.currentTarget.actionHandler.end(t)},t.addEventListener("touchstart",t.actionHandler.start,{passive:!0}),t.addEventListener("touchend",t.actionHandler.end),t.addEventListener("touchcancel",t.actionHandler.end),t.addEventListener("mousedown",t.actionHandler.start,{passive:!0}),t.addEventListener("click",t.actionHandler.end),t.addEventListener("keydown",t.actionHandler.handleKeyDown)))}_startAnimation(t,e){Object.assign(this.style,{left:`${t}px`,top:`${e}px`,transform:"translate(-50%, -50%) scale(1)"})}_stopAnimation(){Object.assign(this.style,{left:null,top:null,transform:"translate(-50%, -50%) scale(0)"})}},Ii=()=>{const t=document.body;if(t.querySelector("action-handler"))return t.querySelector("action-handler");customElements.get("action-handler")||customElements.define("action-handler",Mi);const e=document.createElement("action-handler");return t.appendChild(e),e},zi=(t,e)=>{const o=Ii();o&&o.bind(t,e)},Pi=ue(class extends he{update(t,[e]){return zi(t.element,e),tt}render(t){}})}),Fi=kt(()=>{}),Gi=kt(()=>{}),Ki=kt(()=>{Fe(),Ni=async(t,e,o,i)=>{ve(t,"hass-action",{config:o,action:i})}});function Yi(t){return void 0!==t&&"none"!==t.action}var qi,Wi,Xi,Zi,Ji,Qi,tn,en,on,nn,rn,an=kt(()=>{}),sn=kt(()=>{}),ln=kt(()=>{To(),qi=Co({user:Eo()}),Wi=Ao([bo(),Co({text:$o(Eo()),excemptions:$o(vo(qi))})]),Xi=Co({action:wo("url"),url_path:Eo(),confirmation:$o(Wi)}),Zi=Co({action:yo(["call-service","perform-action"]),service:$o(Eo()),perform_action:$o(Eo()),service_data:$o(Co()),data:$o(Co()),target:$o(Co({entity_id:$o(Ao([Eo(),vo(Eo())])),device_id:$o(Ao([Eo(),vo(Eo())])),area_id:$o(Ao([Eo(),vo(Eo())])),floor_id:$o(Ao([Eo(),vo(Eo())])),label_id:$o(Ao([Eo(),vo(Eo())]))})),confirmation:$o(Wi)}),Ji=Co({action:wo("navigate"),navigation_path:Eo(),confirmation:$o(Wi)}),Qi=xo({action:wo("assist"),pipeline_id:$o(Eo()),start_listening:$o(bo())}),tn=xo({action:wo("fire-dom-event")}),en=Co({action:yo(["none","toggle","more-info","call-service","perform-action","url","navigate","assist"]),confirmation:$o(Wi)}),on=go(t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":case"perform-action":return Zi;case"fire-dom-event":return tn;case"navigate":return Ji;case"url":return Xi;case"assist":return Qi}return en})}),cn=kt(()=>{}),un=kt(()=>{Vt(),nn=l` + #sortable a:nth-of-type(2n) paper-icon-item { + animation-name: keyframes1; + animation-iteration-count: infinite; + transform-origin: 50% 10%; + animation-delay: -0.75s; + animation-duration: 0.25s; + } + + #sortable a:nth-of-type(2n-1) paper-icon-item { + animation-name: keyframes2; + animation-iteration-count: infinite; + animation-direction: alternate; + transform-origin: 30% 5%; + animation-delay: -0.5s; + animation-duration: 0.33s; + } + + #sortable a { + height: 48px; + display: flex; + } + + #sortable { + outline: none; + display: block !important; + } + + .hidden-panel { + display: flex !important; + } + + .sortable-fallback { + display: none; + } + + .sortable-ghost { + opacity: 0.4; + } + + .sortable-fallback { + opacity: 0; + } + + @keyframes keyframes1 { + 0% { + transform: rotate(-1deg); + animation-timing-function: ease-in; + } + + 50% { + transform: rotate(1.5deg); + animation-timing-function: ease-out; + } + } + + @keyframes keyframes2 { + 0% { + transform: rotate(1deg); + animation-timing-function: ease-in; + } + + 50% { + transform: rotate(-1.5deg); + animation-timing-function: ease-out; + } + } + + .show-panel, + .hide-panel { + display: none; + position: absolute; + top: 0; + right: 4px; + --mdc-icon-button-size: 40px; + } + + :host([rtl]) .show-panel { + right: initial; + left: 4px; + } + + .hide-panel { + top: 4px; + right: 8px; + } + + :host([rtl]) .hide-panel { + right: initial; + left: 8px; + } + + :host([expanded]) .hide-panel { + display: block; + } + + :host([expanded]) .show-panel { + display: inline-flex; + } + + paper-icon-item.hidden-panel, + paper-icon-item.hidden-panel span, + paper-icon-item.hidden-panel ha-icon[slot="item-icon"] { + color: var(--secondary-text-color); + cursor: pointer; + } +`}),hn=kt(()=>{}),dn=kt(()=>{rn=(t,e,o,i)=>{const[n,r,a]=t.split(".",3);return Number(n)>e||Number(n)===e&&(void 0===i?Number(r)>=o:Number(r)>o)||void 0!==i&&Number(n)===e&&Number(r)===o&&Number(a)>=i}}),pn=kt(()=>{Ue(),Ve(),Fe(),Ke(),Ye(),qe(),We(),Xe(),Qe(),Je(),Mo(),Io(),Do(),jo(),Ho(),Ro(),Uo(),Ko(),li(),ci(),ui(),hi(),di(),pi(),mi(),Ge(),fi(),Ze(),Li(),Di(),ji(),Hi(),Ri(),Vi(),Fi(),Gi(),Ki(),an(),sn(),ln(),cn(),un(),hn(),dn()});At(),Be(),je(),Re(),pn(),Oi(),Bi();vi(t=>{const e={};for(const o of t)e[o.entity_id]=o;return e}),vi(t=>{const e={};for(const o of t)e[o.id]=o;return e});var mn=/* @__PURE__ */function(t){return t[t.ARM_HOME=1]="ARM_HOME",t[t.ARM_AWAY=2]="ARM_AWAY",t[t.ARM_NIGHT=4]="ARM_NIGHT",t[t.TRIGGER=8]="TRIGGER",t[t.ARM_CUSTOM_BYPASS=16]="ARM_CUSTOM_BYPASS",t[t.ARM_VACATION=32]="ARM_VACATION",t}({}),fn={armed_home:{feature:mn.ARM_HOME,service:"alarm_arm_home",icon:"mdi:home"},armed_away:{feature:mn.ARM_AWAY,service:"alarm_arm_away",icon:"mdi:lock"},armed_night:{feature:mn.ARM_NIGHT,service:"alarm_arm_night",icon:"mdi:moon-waning-crescent"},armed_vacation:{feature:mn.ARM_VACATION,service:"alarm_arm_vacation",icon:"mdi:airplane"},armed_custom_bypass:{feature:mn.ARM_CUSTOM_BYPASS,service:"alarm_arm_custom_bypass",icon:"mdi:shield"},disarmed:{service:"alarm_disarm",icon:"mdi:shield-off"}};function gn(t,e,o,i){var n,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var s=t.length-1;s>=0;s--)(n=t[s])&&(a=(r<3?n(a):r>3?n(e,o,a):n(e,o))||a);return r>3&&a&&Object.defineProperty(e,o,a),a}var _n,vn=kt(()=>{}),bn=kt(()=>{Vt(),vn(),_n=class extends Ot{constructor(...t){super(...t),this.icon=""}render(){return J` +
+ +
+ `}static get styles(){return l` + :host { + --main-color: rgb(var(--rgb-grey)); + --icon-color: rgb(var(--rgb-white)); + } + .badge { + display: flex; + align-items: center; + justify-content: center; + line-height: 0; + width: var(--badge-size); + height: var(--badge-size); + font-size: var(--badge-size); + border-radius: var(--badge-border-radius); + background-color: var(--main-color); + transition: background-color 280ms ease-in-out; + } + .badge ha-icon { + --mdc-icon-size: var(--badge-icon-size); + color: var(--icon-color); + } + `}},gn([Gt()],_n.prototype,"icon",void 0),_n=gn([Lt("mushroom-badge-icon")],_n)});bn(),Vt(),Be(),vn();var yn=class extends Ot{constructor(...t){super(...t),this.title="",this.disabled=!1}render(){return J` + + `}static get styles(){return l` + :host { + --icon-color: var(--primary-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); + --bg-color: rgba(var(--rgb-primary-text-color), 0.05); + --bg-color-disabled: rgba(var(--rgb-disabled), 0.2); + height: var(--control-height); + width: calc(var(--control-height) * var(--control-button-ratio)); + flex: none; + } + .button { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + border-radius: var(--control-border-radius); + border: none; + background-color: var(--bg-color); + transition: background-color 280ms ease-in-out; + font-size: var(--control-height); + margin: 0; + padding: 0; + box-sizing: border-box; + line-height: 0; + } + .button:disabled { + cursor: not-allowed; + background-color: var(--bg-color-disabled); + } + .button ::slotted(*) { + --mdc-icon-size: var(--control-icon-size); + color: var(--icon-color); + pointer-events: none; + } + .button:disabled ::slotted(*) { + color: var(--icon-color-disabled); + } + `}};gn([Gt()],yn.prototype,"title",void 0),gn([Gt({type:Boolean})],yn.prototype,"disabled",void 0),yn=gn([Lt("mushroom-button")],yn),Vt(),Be(),vn();var wn,kn=class extends Ot{constructor(...t){super(...t),this.fill=!1,this.rtl=!1}render(){return J` +
+ +
+ `}static get styles(){return l` + :host { + display: flex; + flex-direction: row; + width: 100%; + } + .container { + width: 100%; + display: flex; + flex-direction: row; + justify-content: flex-end; + } + .container ::slotted(*:not(:last-child)) { + margin-right: var(--spacing); + } + :host([rtl]) .container ::slotted(*:not(:last-child)) { + margin-right: initial; + margin-left: var(--spacing); + } + .container > ::slotted(mushroom-button) { + width: 0; + flex-grow: 0; + flex-shrink: 1; + flex-basis: calc(var(--control-height) * var(--control-button-ratio)); + } + .container > ::slotted(mushroom-input-number) { + width: 0; + flex-grow: 0; + flex-shrink: 1; + flex-basis: calc( + var(--control-height) * var(--control-button-ratio) * 3 + ); + } + .container.fill > ::slotted(mushroom-button), + .container.fill > ::slotted(mushroom-input-number) { + flex-grow: 1; + } + `}};gn([Gt()],kn.prototype,"fill",void 0),gn([Gt()],kn.prototype,"rtl",void 0),kn=gn([Lt("mushroom-button-group")],kn);var Cn,$n,En,xn,An,Sn,Tn,Mn,In,zn,Pn=kt(()=>{Vt(),Be(),je(),vn(),wn=class extends Ot{render(){var t,e,o,i,n,r;return J` +
+ +
+ `}static get styles(){return l` + :host { + flex: 1; + display: flex; + flex-direction: column; + margin: calc(-1 * var(--ha-card-border-width, 1px)); + } + .container { + display: flex; + flex-direction: column; + flex-shrink: 0; + flex-grow: 0; + box-sizing: border-box; + justify-content: space-between; + height: 100%; + } + .container.horizontal { + flex-direction: row; + } + .container.horizontal > ::slotted(*) { + flex: 1; + min-width: 0; + } + .container.horizontal > ::slotted(*.actions) { + padding-top: 0 !important; + padding-bottom: 0 !important; + padding-left: 0 !important; + --control-spacing: var(--spacing); + --control-height: var(--icon-size); + } + .container > ::slotted(mushroom-state-item) { + flex: 1; + } + .container.horizontal.no-info > ::slotted(mushroom-state-item) { + flex: none; + } + .container.no-content > ::slotted(mushroom-state-item) { + display: none; + } + .container.no-content > ::slotted(.actions) { + --control-spacing: var(--spacing); + --control-height: var(--icon-size); + padding: var(--control-spacing) !important; + } + `}},gn([Gt()],wn.prototype,"appearance",void 0),wn=gn([Lt("mushroom-card")],wn)}),Nn=kt(()=>{Vt(),$n={pulse:l` + ${s((Cn={pulse:"@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }",spin:"@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }",cleaning:"@keyframes cleaning {\n 0% {\n transform: rotate(0) translate(0);\n }\n 5% {\n transform: rotate(0) translate(0, -3px);\n }\n 10% {\n transform: rotate(0) translate(0, 1px);\n }\n 15% {\n transform: rotate(0) translate(0);\n }\n\n 20% {\n transform: rotate(30deg) translate(0);\n }\n 25% {\n transform: rotate(30deg) translate(0, -3px);\n }\n 30% {\n transform: rotate(30deg) translate(0, 1px);\n }\n 35% {\n transform: rotate(30deg) translate(0);\n }\n 40% {\n transform: rotate(0) translate(0);\n }\n\n 45% {\n transform: rotate(-30deg) translate(0);\n }\n 50% {\n transform: rotate(-30deg) translate(0, -3px);\n }\n 55% {\n transform: rotate(-30deg) translate(0, 1px);\n }\n 60% {\n transform: rotate(-30deg) translate(0);\n }\n 70% {\n transform: rotate(0deg) translate(0);\n }\n 100% {\n transform: rotate(0deg);\n }\n }",returning:"@keyframes returning {\n 0% {\n transform: rotate(0);\n }\n 25% {\n transform: rotate(20deg);\n }\n 50% {\n transform: rotate(0);\n }\n 75% {\n transform: rotate(-20deg);\n }\n 100% {\n transform: rotate(0);\n }\n }"}).pulse)} + `,spin:l` + ${s(Cn.spin)} + `,cleaning:l` + ${s(Cn.cleaning)} + `,returning:l` + ${s(Cn.returning)} + `},En=l` + ${s(Object.values(Cn).join("\n"))} +`}),On=kt(()=>{Vt(),Be(),je(),Nn(),vn(),xn=class extends Ot{render(){return J` +
+ +
+ `}static get styles(){return[En,l` + :host { + --icon-color: var(--primary-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); + --shape-color: rgba(var(--rgb-primary-text-color), 0.05); + --shape-color-disabled: rgba(var(--rgb-disabled), 0.2); + --shape-animation: none; + --shape-outline-color: transparent; + flex: none; + } + .shape { + position: relative; + width: var(--icon-size); + height: var(--icon-size); + font-size: var(--icon-size); + border-radius: var(--icon-border-radius); + display: flex; + align-items: center; + justify-content: center; + background-color: var(--shape-color); + transition-property: background-color, box-shadow; + transition-duration: 280ms; + transition-timing-function: ease-out; + animation: var(--shape-animation); + box-shadow: 0 0 0 1px var(--shape-outline-color); + } + + .shape ::slotted(*) { + display: flex; + color: var(--icon-color); + transition: color 280ms ease-in-out; + } + ::slotted(ha-icon), + ::slotted(ha-state-icon) { + display: flex; + line-height: 0; + --mdc-icon-size: var(--icon-symbol-size); + } + .shape.disabled { + background-color: var(--shape-color-disabled); + } + .shape.disabled ::slotted(*) { + color: var(--icon-color-disabled); + } + `]}},gn([Gt({type:Boolean})],xn.prototype,"disabled",void 0),xn=gn([Lt("mushroom-shape-icon")],xn)}),Bn=kt(()=>{Vt(),Be(),vn(),An=class extends Ot{constructor(...t){super(...t),this.multiline_secondary=!1}render(){var t;return J` +
+ ${null!==(t=this.primary)&&void 0!==t?t:""} + ${this.secondary?J`${this.secondary}`:et} +
+ `}static get styles(){return l` + .container { + min-width: 0; + flex: 1; + display: flex; + flex-direction: column; + } + .primary { + font-weight: var(--card-primary-font-weight); + font-size: var(--card-primary-font-size); + line-height: var(--card-primary-line-height); + color: var(--card-primary-color); + letter-spacing: var(--card-primary-letter-spacing); + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + .secondary { + font-weight: var(--card-secondary-font-weight); + font-size: var(--card-secondary-font-size); + line-height: var(--card-secondary-line-height); + color: var(--card-secondary-color); + letter-spacing: var(--card-secondary-letter-spacing); + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + .multiline_secondary { + white-space: pre-wrap; + } + `}},gn([Gt({attribute:!1})],An.prototype,"primary",void 0),gn([Gt({attribute:!1})],An.prototype,"secondary",void 0),gn([Gt({type:Boolean})],An.prototype,"multiline_secondary",void 0),An=gn([Lt("mushroom-state-info")],An)}),Ln=kt(()=>{Vt(),Be(),je(),On(),vn(),Sn=class extends Ot{render(){var t,e,o,i;return J` +
+ ${"none"!==(null===(e=this.appearance)||void 0===e?void 0:e.icon_type)?J` +
+ + +
+ `:et} + ${"none"!==(null===(o=this.appearance)||void 0===o?void 0:o.primary_info)||"none"!==(null===(i=this.appearance)||void 0===i?void 0:i.secondary_info)?J` +
+ +
+ `:et} +
+ `}static get styles(){return l` + :host { + display: block; + height: 100%; + } + .container { + height: 100%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: var(--spacing); + gap: var(--spacing); + } + .icon { + position: relative; + } + .icon ::slotted(*[slot="badge"]) { + position: absolute; + top: -3px; + right: -3px; + } + :host([rtl]) .icon ::slotted(*[slot="badge"]) { + right: initial; + left: -3px; + } + .info { + min-width: 0; + width: 100%; + display: flex; + flex-direction: column; + } + .container.vertical { + flex-direction: column; + } + .container.vertical .info { + text-align: center; + } + `}},gn([Gt()],Sn.prototype,"appearance",void 0),Sn=gn([Lt("mushroom-state-item")],Sn)});function Dn(t){var e,o;return{layout:null!==(e=t.layout)&&void 0!==e?e:jn(t),fill_container:null!==(o=t.fill_container)&&void 0!==o&&o,primary_info:t.primary_info||Rn(t),secondary_info:t.secondary_info||Un(t),icon_type:t.icon_type||Hn(t)}}function jn(t){return t.vertical?"vertical":"default"}function Hn(t){return t.hide_icon?"none":t.use_entity_picture||t.use_media_artwork?"entity-picture":"icon"}function Rn(t){return t.hide_name?"none":"name"}function Un(t){return t.hide_state?"none":"state"}function Vn(t,e){const o=e&&e.cache?e.cache:In,i=e&&e.serializer?e.serializer:Tn;return(e&&e.strategy?e.strategy:Yn)(t,{cache:o,serializer:i})}function Fn(t,e,o,i){const n=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:o(i);var r;let a=e.get(n);return void 0===a&&(a=t.call(this,i),e.set(n,a)),a}function Gn(t,e,o){const i=Array.prototype.slice.call(arguments,3),n=o(i);let r=e.get(n);return void 0===r&&(r=t.apply(this,i),e.set(n,r)),r}function Kn(t,e,o,i,n){return o.bind(e,t,i,n)}function Yn(t,e){return Kn(t,this,1===t.length?Fn:Gn,e.cache.create(),e.serializer)}function qn(t,e){return Kn(t,this,Gn,e.cache.create(),e.serializer)}function Wn(t,e){return Kn(t,this,Fn,e.cache.create(),e.serializer)}Pn(),Bn(),Ln();var Xn,Zn,Jn,Qn,tr,er,or=kt(()=>{Tn=function(){return JSON.stringify(arguments)},Mn=class{constructor(){this.cache=Object.create(null)}get(t){return this.cache[t]}set(t,e){this.cache[t]=e}},In={create:function(){return new Mn}},zn={variadic:qn,monadic:Wn}});function ir(t){const e={};return t.replace(Xn,t=>{const o=t.length;switch(t[0]){case"G":e.era=4===o?"long":5===o?"narrow":"short";break;case"y":e.year=2===o?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][o-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][o-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===o?"long":5===o?"narrow":"short";break;case"e":if(o<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][o-4];break;case"c":if(o<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][o-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][o-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][o-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][o-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][o-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][o-1];break;case"s":e.second=["numeric","2-digit"][o-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=o<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}function nr(t){return t.replace(/^(.*?)-/,"")}function rr(t){const e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(Qn,function(t,o,i){return"string"!=typeof i?(e.minimumSignificantDigits=o.length,e.maximumSignificantDigits=o.length):"+"===i?e.minimumSignificantDigits=o.length:"#"===o[0]?e.maximumSignificantDigits=o.length:(e.minimumSignificantDigits=o.length,e.maximumSignificantDigits=o.length+("string"==typeof i?i.length:0)),""}),e}function ar(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function sr(t){let e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){const o=t.slice(0,2);if("+!"===o?(e.signDisplay="always",t=t.slice(2)):"+?"===o&&(e.signDisplay="exceptZero",t=t.slice(2)),!er.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function lr(t){const e=ar(t);return e||{}}function cr(t){let e={};for(const o of t){switch(o.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=o.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=nr(o.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ee(ee({},e),{},{notation:"scientific"},o.options.reduce((t,e)=>ee(ee({},t),lr(e)),{}));continue;case"engineering":e=ee(ee({},e),{},{notation:"engineering"},o.options.reduce((t,e)=>ee(ee({},t),lr(e)),{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(o.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.roundingMode="halfExpand";continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(tr,function(t,o,i,n,r,a){if(o)e.minimumIntegerDigits=i.length;else{if(n&&r)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""});continue}if(er.test(o.stem)){e.minimumIntegerDigits=o.stem.length;continue}if(Jn.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(Jn,function(t,o,i,n,r,a){return"*"===i?e.minimumFractionDigits=o.length:n&&"#"===n[0]?e.maximumFractionDigits=n.length:r&&a?(e.minimumFractionDigits=r.length,e.maximumFractionDigits=r.length+a.length):(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length),""});const t=o.options[0];"w"===t?e=ee(ee({},e),{},{trailingZeroDisplay:"stripIfInteger"}):t&&(e=ee(ee({},e),rr(t)));continue}if(Qn.test(o.stem)){e=ee(ee({},e),rr(o.stem));continue}const t=ar(o.stem);t&&(e=ee(ee({},e),t));const i=sr(o.stem);i&&(e=ee(ee({},e),i))}return e}var ur,hr,dr,pr,mr,fr,gr,_r,vr,br,yr,wr,kr,Cr,$r,Er=kt(()=>{oe(),Xn=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,Zn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,Jn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Qn=/^(@+)?(\+|#+)?[rs]?$/g,tr=/(\*)(0+)|(#+)(0+)|(0+)/g,er=/^(0+)$/});function xr(t){return t.type===hr.literal}function Ar(t){return t.type===hr.argument}function Sr(t){return t.type===hr.number}function Tr(t){return t.type===hr.date}function Mr(t){return t.type===hr.time}function Ir(t){return t.type===hr.select}function zr(t){return t.type===hr.plural}function Pr(t){return t.type===hr.pound}function Nr(t){return t.type===hr.tag}function Or(t){return!(!t||"object"!=typeof t||t.type!==dr.number)}function Br(t){return!(!t||"object"!=typeof t||t.type!==dr.dateTime)}function Lr(t){let e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}const o=t.language;let i;return"root"!==o&&(i=t.maximize().region),(mr[i||""]||mr[o||""]||mr[`${o}-001`]||mr["001"])[0]}function Dr(t,e){return{start:t,end:e}}function jr(t){return t>=97&&t<=122||t>=65&&t<=90}function Hr(t){return 45===t||46===t||t>=48&&t<=57||95===t||t>=97&&t<=122||t>=65&&t<=90||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Rr(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function Ur(t){t.forEach(t=>{if(delete t.location,Ir(t)||zr(t))for(const e in t.options)delete t.options[e].location,Ur(t.options[e].value);else Sr(t)&&Or(t.style)||(Tr(t)||Mr(t))&&Br(t.style)?delete t.style.location:Nr(t)&&Ur(t.children)})}function Vr(t,e={}){e=ee({shouldParseSkeletons:!0,requiresOtherClause:!0},e);const o=new $r(t,e).parse();if(o.err){const t=SyntaxError(ur[o.err.kind]);throw t.location=o.err.location,t.originalMessage=o.err.message,t}return(null==e?void 0:e.captureLocation)||Ur(o.val),o.val}var Fr=kt(()=>{Er(),oe(),ur=/* @__PURE__ */function(t){return t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG",t}({}),hr=/* @__PURE__ */function(t){return t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag",t}({}),dr=/* @__PURE__ */function(t){return t[t.number=0]="number",t[t.dateTime=1]="dateTime",t}({}),pr=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mr={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},fr=new RegExp(`^${pr.source}*`),gr=new RegExp(`${pr.source}*$`),_r=!!Object.fromEntries,vr=!!String.prototype.trimStart,br=!!String.prototype.trimEnd,yr=_r?Object.fromEntries:function(t){const e={};for(const[o,i]of t)e[o]=i;return e},wr=vr?function(t){return t.trimStart()}:function(t){return t.replace(fr,"")},kr=br?function(t){return t.trimEnd()}:function(t){return t.replace(gr,"")},Cr=/* @__PURE__ */new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),$r=class{constructor(t,e={}){this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(t,e,o){let i=[];for(;!this.isEOF();){const n=this.char();if(123===n){const e=this.parseArgument(t,o);if(e.err)return e;i.push(e.val)}else{if(125===n&&t>0)break;if(35!==n||"plural"!==e&&"selectordinal"!==e){if(60===n&&!this.ignoreTag&&47===this.peek()){if(o)break;return this.error(ur.UNMATCHED_CLOSING_TAG,Dr(this.clonePosition(),this.clonePosition()))}if(60===n&&!this.ignoreTag&&jr(this.peek()||0)){const o=this.parseTag(t,e);if(o.err)return o;i.push(o.val)}else{const o=this.parseLiteral(t,e);if(o.err)return o;i.push(o.val)}}else{const t=this.clonePosition();this.bump(),i.push({type:hr.pound,location:Dr(t,this.clonePosition())})}}}return{val:i,err:null}}parseTag(t,e){const o=this.clonePosition();this.bump();const i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:hr.literal,value:`<${i}/>`,location:Dr(o,this.clonePosition())},err:null};if(this.bumpIf(">")){const n=this.parseMessage(t+1,e,!0);if(n.err)return n;const r=n.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:hr.tag,value:i,children:r,location:Dr(o,this.clonePosition())},err:null}:this.error(ur.INVALID_TAG,Dr(a,this.clonePosition())))}return this.error(ur.UNCLOSED_TAG,Dr(o,this.clonePosition()))}return this.error(ur.INVALID_TAG,Dr(o,this.clonePosition()))}parseTagName(){const t=this.offset();for(this.bump();!this.isEOF()&&Hr(this.char());)this.bump();return this.message.slice(t,this.offset())}parseLiteral(t,e){const o=this.clonePosition();let i="";for(;;){const o=this.tryParseQuote(e);if(o){i+=o;continue}const n=this.tryParseUnquoted(t,e);if(n){i+=n;continue}const r=this.tryParseLeftAngleBracket();if(!r)break;i+=r}const n=Dr(o,this.clonePosition());return{val:{type:hr.literal,value:i,location:n},err:null}}tryParseLeftAngleBracket(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(jr(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t}tryParseQuote(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();const e=[this.char()];for(this.bump();!this.isEOF();){const t=this.char();if(39===t){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(t);this.bump()}return String.fromCodePoint(...e)}tryParseUnquoted(t,e){if(this.isEOF())return null;const o=this.char();return 60===o||123===o||35===o&&("plural"===e||"selectordinal"===e)||125===o&&t>0?null:(this.bump(),String.fromCodePoint(o))}parseArgument(t,e){const o=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition()));if(125===this.char())return this.bump(),this.error(ur.EMPTY_ARGUMENT,Dr(o,this.clonePosition()));let i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ur.MALFORMED_ARGUMENT,Dr(o,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:hr.argument,value:i,location:Dr(o,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(o,this.clonePosition())):this.parseArgumentOptions(t,e,i,o);default:return this.error(ur.MALFORMED_ARGUMENT,Dr(o,this.clonePosition()))}}parseIdentifierIfPossible(){const t=this.clonePosition(),e=this.offset(),o=function(t,e){var o;return Cr.lastIndex=e,null!==(o=Cr.exec(t)[1])&&void 0!==o?o:""}(this.message,e),i=e+o.length;return this.bumpTo(i),{value:o,location:Dr(t,this.clonePosition())}}parseArgumentOptions(t,e,o,i){let n=this.clonePosition(),r=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(r){case"":return this.error(ur.EXPECT_ARGUMENT_TYPE,Dr(n,a));case"number":case"date":case"time":{var s;this.bumpSpace();let t=null;if(this.bumpIf(",")){this.bumpSpace();const e=this.clonePosition(),o=this.parseSimpleArgStyleIfPossible();if(o.err)return o;const i=kr(o.val);if(0===i.length)return this.error(ur.EXPECT_ARGUMENT_STYLE,Dr(this.clonePosition(),this.clonePosition()));t={style:i,styleLocation:Dr(e,this.clonePosition())}}const e=this.tryParseArgumentClose(i);if(e.err)return e;const n=Dr(i,this.clonePosition());if(t&&t.style.startsWith("::")){let e=wr(t.style.slice(2));if("number"===r){const i=this.parseNumberSkeletonFromString(e,t.styleLocation);return i.err?i:{val:{type:hr.number,value:o,location:n,style:i.val},err:null}}{if(0===e.length)return this.error(ur.EXPECT_DATE_TIME_SKELETON,n);let i=e;this.locale&&(i=function(t,e){let o="";for(let i=0;i>1),l="a",c=Lr(e);for("H"!=c&&"k"!=c||(s=0);s-- >0;)o+=l;for(;a-- >0;)o=c+o}else o+="J"===n?"H":n}return o}(e,this.locale));const a={type:dr.dateTime,pattern:i,location:t.styleLocation,parsedOptions:this.shouldParseSkeletons?ir(i):{}};return{val:{type:"date"===r?hr.date:hr.time,value:o,location:n,style:a},err:null}}}return{val:{type:"number"===r?hr.number:"date"===r?hr.date:hr.time,value:o,location:n,style:null!==(s=null==t?void 0:t.style)&&void 0!==s?s:null},err:null}}case"plural":case"selectordinal":case"select":{const n=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ur.EXPECT_SELECT_ARGUMENT_OPTIONS,Dr(n,ee({},n)));this.bumpSpace();let a=this.parseIdentifierIfPossible(),s=0;if("select"!==r&&"offset"===a.value){if(!this.bumpIf(":"))return this.error(ur.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Dr(this.clonePosition(),this.clonePosition()));this.bumpSpace();const t=this.tryParseDecimalInteger(ur.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ur.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(t.err)return t;this.bumpSpace(),a=this.parseIdentifierIfPossible(),s=t.val}const l=this.tryParsePluralOrSelectOptions(t,r,e,a);if(l.err)return l;const c=this.tryParseArgumentClose(i);if(c.err)return c;const u=Dr(i,this.clonePosition());return"select"===r?{val:{type:hr.select,value:o,options:yr(l.val),location:u},err:null}:{val:{type:hr.plural,value:o,options:yr(l.val),offset:s,pluralType:"plural"===r?"cardinal":"ordinal",location:u},err:null}}default:return this.error(ur.INVALID_ARGUMENT_TYPE,Dr(n,a))}}tryParseArgumentClose(t){return this.isEOF()||125!==this.char()?this.error(ur.EXPECT_ARGUMENT_CLOSING_BRACE,Dr(t,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let t=0;const e=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let t=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ur.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Dr(t,this.clonePosition()));this.bump();break}case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}return{val:this.message.slice(e.offset,this.offset()),err:null}}parseNumberSkeletonFromString(t,e){let o=[];try{o=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");const e=t.split(Zn).filter(t=>t.length>0),o=[];for(const i of e){let t=i.split("/");if(0===t.length)throw new Error("Invalid number skeleton");const[e,...n]=t;for(const o of n)if(0===o.length)throw new Error("Invalid number skeleton");o.push({stem:e,options:n})}return o}(t)}catch(i){return this.error(ur.INVALID_NUMBER_SKELETON,e)}return{val:{type:dr.number,tokens:o,location:e,parsedOptions:this.shouldParseSkeletons?cr(o):{}},err:null}}tryParsePluralOrSelectOptions(t,e,o,i){let n=!1;const r=[],a=/* @__PURE__ */new Set;let{value:s,location:l}=i;for(;;){if(0===s.length){const t=this.clonePosition();if("select"===e||!this.bumpIf("="))break;{const e=this.tryParseDecimalInteger(ur.EXPECT_PLURAL_ARGUMENT_SELECTOR,ur.INVALID_PLURAL_ARGUMENT_SELECTOR);if(e.err)return e;l=Dr(t,this.clonePosition()),s=this.message.slice(t.offset,this.offset())}}if(a.has(s))return this.error("select"===e?ur.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ur.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===s&&(n=!0),this.bumpSpace();const i=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?ur.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ur.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Dr(this.clonePosition(),this.clonePosition()));const c=this.parseMessage(t+1,e,o);if(c.err)return c;const u=this.tryParseArgumentClose(i);if(u.err)return u;r.push([s,{value:c.val,location:Dr(i,this.clonePosition())}]),a.add(s),this.bumpSpace(),({value:s,location:l}=this.parseIdentifierIfPossible())}return 0===r.length?this.error("select"===e?ur.EXPECT_SELECT_ARGUMENT_SELECTOR:ur.EXPECT_PLURAL_ARGUMENT_SELECTOR,Dr(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!n?this.error(ur.MISSING_OTHER_CLAUSE,Dr(this.clonePosition(),this.clonePosition())):{val:r,err:null}}tryParseDecimalInteger(t,e){let o=1;const i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(o=-1);let n=!1,r=0;for(;!this.isEOF();){const t=this.char();if(!(t>=48&&t<=57))break;n=!0,r=10*r+(t-48),this.bump()}const a=Dr(i,this.clonePosition());return n?(r*=o,Number.isSafeInteger(r)?{val:r,err:null}:this.error(e,a)):this.error(t,a)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");const e=this.message.codePointAt(t);if(void 0===e)throw Error(`Offset ${t} is at invalid UTF-16 code unit boundary`);return e}error(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}}bump(){if(this.isEOF())return;const t=this.char();10===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}bumpIf(t){if(this.message.startsWith(t,this.offset())){for(let e=0;e=0?(this.bumpTo(o),!0):(this.bumpTo(this.message.length),!1)}bumpTo(t){if(this.offset()>t)throw Error(`targetOffset ${t} must be greater than or equal to the current offset ${this.offset()}`);for(t=Math.min(t,this.message.length);;){const e=this.offset();if(e===t)break;if(e>t)throw Error(`targetOffset ${t} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Rr(this.char());)this.bump()}peek(){var t;if(this.isEOF())return null;const e=this.char(),o=this.offset();return null!==(t=this.message.charCodeAt(o+(e>=65536?2:1)))&&void 0!==t?t:null}}});var Gr=kt(()=>{});function Kr(){return Kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{});function oa(t){return"function"==typeof t}function ia(t,e,o,i,n,r,a){if(1===t.length&&xr(t[0]))return[{type:Qr.literal,value:t[0].value}];const s=[];for(const c of t){if(xr(c)){s.push({type:Qr.literal,value:c.value});continue}if(Pr(c)){"number"==typeof r&&s.push({type:Qr.literal,value:o.getNumberFormat(e).format(r)});continue}const{value:t}=c;if(!n||!(t in n))throw new Jr(t,a);let l=n[t];if(Ar(c))l&&"string"!=typeof l&&"number"!=typeof l&&"bigint"!=typeof l||(l="string"==typeof l||"number"==typeof l||"bigint"==typeof l?String(l):""),s.push({type:"string"==typeof l?Qr.literal:Qr.object,value:l});else{if(Tr(c)){const t="string"==typeof c.style?i.date[c.style]:Br(c.style)?c.style.parsedOptions:void 0;s.push({type:Qr.literal,value:o.getDateTimeFormat(e,t).format(l)});continue}if(Mr(c)){const t="string"==typeof c.style?i.time[c.style]:Br(c.style)?c.style.parsedOptions:i.time.medium;s.push({type:Qr.literal,value:o.getDateTimeFormat(e,t).format(l)});continue}if(Sr(c)){const t="string"==typeof c.style?i.number[c.style]:Or(c.style)?c.style.parsedOptions:void 0;if(t&&t.scale){const e=t.scale||1;if("bigint"==typeof l){if(!Number.isInteger(e))throw new TypeError(`Cannot apply fractional scale ${e} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(e)}else l*=e}s.push({type:Qr.literal,value:o.getNumberFormat(e,t).format(l)});continue}if(Nr(c)){const{children:t,value:l}=c,u=n[l];if(!oa(u))throw new Zr(l,"function",a);let h=u(ia(t,e,o,i,n,r).map(t=>t.value));Array.isArray(h)||(h=[h]),s.push(...h.map(t=>({type:"string"==typeof t?Qr.literal:Qr.object,value:t})))}if(Ir(c)){const t=l,r=(Object.prototype.hasOwnProperty.call(c.options,t)?c.options[t]:void 0)||c.options.other;if(!r)throw new Xr(c.value,l,Object.keys(c.options),a);s.push(...ia(r.value,e,o,i,n));continue}if(zr(c)){const t=`=${l}`;let r=Object.prototype.hasOwnProperty.call(c.options,t)?c.options[t]:void 0;if(!r){if(!Intl.PluralRules)throw new Wr('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',qr.MISSING_INTL_API,a);const t="bigint"==typeof l?Number(l):l,i=o.getPluralRules(e,{type:c.pluralType}).select(t-(c.offset||0));r=(Object.prototype.hasOwnProperty.call(c.options,i)?c.options[i]:void 0)||c.options.other}if(!r)throw new Xr(c.value,l,Object.keys(c.options),a);const u="bigint"==typeof l?Number(l):l;s.push(...ia(r.value,e,o,i,n,u-(c.offset||0)));continue}}}return(l=s).length<2?l:l.reduce((t,e)=>{const o=t[t.length-1];return o&&o.type===Qr.literal&&e.type===Qr.literal?o.value+=e.value:t.push(e),t},[]);var l}function na(t,e){return e?Object.keys(t).reduce((o,i)=>{var n,r;return o[i]=(n=t[i],(r=e[i])?ee(ee(ee({},n),r),Object.keys(n).reduce((t,e)=>(t[e]=ee(ee({},n[e]),r[e]),t),{})):n),o},ee({},t)):t}function ra(t){return{create:()=>({get:e=>t[e],set(e,o){t[e]=o}})}}var aa,sa,la,ca,ua,ha,da,pa,ma,fa,ga,_a,va,ba,ya,wa,ka,Ca,$a,Ea,xa,Aa,Sa,Ta,Ma,Ia,za,Pa,Na,Oa,Ba,La,Da,ja,Ha,Ra,Ua,Va,Fa,Ga,Ka,Ya,qa,Wa,Xa,Za,Ja,Qa,ts,es,os,is,ns,rs,as,ss,ls,cs,us,hs,ds,ps,ms,fs,gs,_s,vs,bs,ys,ws,ks,Cs,$s,Es,xs,As,Ss,Ts,Ms,Is,zs,Ps,Ns,Os,Bs,Ls,Ds,js,Hs,Rs,Us,Vs,Fs,Gs,Ks,Ys=kt(()=>{or(),Fr(),oe(),Gr(),ea(),qr=/* @__PURE__ */function(t){return t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API",t}({}),Wr=class extends Error{constructor(t,e,o){super(t),this.code=e,this.originalMessage=o}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},Xr=class extends Wr{constructor(t,e,o,i){super(`Invalid values for "${t}": "${e}". Options are "${Object.keys(o).join('", "')}"`,qr.INVALID_VALUE,i)}},Zr=class extends Wr{constructor(t,e,o){super(`Value for "${t}" must be of type ${e}`,qr.INVALID_VALUE,o)}},Jr=class extends Wr{constructor(t,e){super(`The intl string context variable "${t}" was not provided to the string "${e}"`,qr.MISSING_VALUE,e)}},Qr=/* @__PURE__ */function(t){return t[t.literal=0]="literal",t[t.object=1]="object",t}({}),Yr=class t{constructor(e,o=t.defaultLocale,i,n){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=t=>{const e=this.formatToParts(t);if(1===e.length)return e[0].value;const o=e.reduce((t,e)=>(t.length&&e.type===Qr.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t),[]);return o.length<=1?o[0]||"":o},this.formatToParts=t=>ia(this.ast,this.locales,this.formatters,this.formats,t,void 0,this.message),this.resolvedOptions=()=>{var t;return{locale:(null===(t=this.resolvedLocale)||void 0===t?void 0:t.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=o,this.resolvedLocale=t.resolveLocale(o),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const o=n||{},i=Kr({},(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(o),o));this.ast=t.__parse(e,ee(ee({},i),{},{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=na(t.formats,i),this.formatters=n&&n.formatters||function(t={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Vn((...t)=>new Intl.NumberFormat(...t),{cache:ra(t.number),strategy:zn.variadic}),getDateTimeFormat:Vn((...t)=>new Intl.DateTimeFormat(...t),{cache:ra(t.dateTime),strategy:zn.variadic}),getPluralRules:Vn((...t)=>new Intl.PluralRules(...t),{cache:ra(t.pluralRules),strategy:zn.variadic})}}(this.formatterCache)}static get defaultLocale(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale}},Yr.memoizedDefaultLocale=null,Yr.resolveLocale=t=>{if(void 0===Intl.Locale)return;const e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},Yr.__parse=Vr,Yr.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},ta=Yr}),qs=/* @__PURE__ */$t({card:()=>aa,default:()=>la,editor:()=>sa}),Ws=kt(()=>{la={card:aa={not_found:"لم يتم العثور على الكيان"},editor:sa={card:{chips:{alignment:"محاذاة"},climate:{hvac_modes:"أوضاع HVAC",show_temperature_control:"التحكم في درجة الحرارة؟"},cover:{show_buttons_control:"أزرار التحكم؟",show_position_control:"التحكم في الموقع؟",show_tilt_position_control:"التحكم في الإمالة؟"},empty:{no_config_options:"لا تحتوي هذه البطاقة على خيارات التكوين."},fan:{show_direction_control:"التحكم بالإتجاه؟",show_oscillate_control:"التحكم في التذبذب؟",show_percentage_control:"التحكم في النسبة المئوية؟"},generic:{collapsible_controls:"تصغير عناصر التحكم عند الإيقاف",color:"اللون",content_info:"المحتوى",fill_container:"ملئ الحاوية",icon_animation:"تحريك الرمز عندما يكون نشطًا؟",icon_color:"لون الأيقونة",icon_type:"نوع الأيقونة",layout:"التخطيط",primary_info:"المعلومات الأساسية",secondary_info:"المعلومات الفرعية",use_entity_picture:"استخدم صورة الكيان؟"},humidifier:{show_target_humidity_control:"التحكم في الرطوبة؟?"},light:{incompatible_controls:"قد لا يتم عرض بعض عناصر التحكم إذا كان الضوء الخاص بك لا يدعم الميزة.",show_brightness_control:"التحكم في السطوع؟",show_color_control:"التحكم في اللون؟",show_color_temp_control:"التحكم في درجة حرارة اللون؟",use_light_color:"استخدم لون فاتح"},lock:{lock:"مقفل",open:"مفتوح",unlock:"إلغاء قفل"},"media-player":{media_controls:"التحكم في الوسائط",media_controls_list:{next:"التالي",on_off:"تشغيل/إيقاف",play_pause_stop:"تشغيل/إيقاف مؤقت/إيقاف",previous:"السابق",repeat:"وضع التكرار",shuffle:"خلط"},show_volume_level:"إظهار مستوى الصوت",use_media_artwork:"استخدم صورة الوسائط",use_media_info:"استخدم معلومات الوسائط",volume_controls:"التحكم في الصوت",volume_controls_list:{volume_buttons:"أزرار الصوت",volume_mute:"كتم",volume_set:"مستوى الصوت"}},number:{display_mode:"وضع العرض",display_mode_list:{buttons:"الأزرار",default:"الافتراضي(سحب)",slider:"سحب"}},template:{badge_color:"لون الشارة",badge_icon:"أيقونة الشارة",content:"المحتوى",entity_extra:"تستخدم في القوالب والإجراءات",label:"التسمية",multiline_secondary:"متعدد الأسطر الثانوية؟",picture:"صورة (ستحل محل الأيقونة)",primary:"المعلومات الأساسية",secondary:"المعلومات الثانوية"},title:{subtitle:"العنوان الفرعي",subtitle_tap_action:"إجراء النقر على العنوان الفرعي",title:"العنوان",title_tap_action:"إجراء النقر على العنوان"},update:{show_buttons_control:"أزرار التحكم؟"},vacuum:{commands:"الاوامر",commands_list:{on_off:"تشغيل/إيقاف"}},weather:{show_conditions:"الأحوال الجوية؟",show_temperature:"الطقس؟"}},chip:{"chip-picker":{add:"أضف رقاقة",chips:"رقاقات",clear:"مسح",edit:"تعديل",select:"اختر الرقاقة",types:{action:"إجراء","alarm-control-panel":"تنبيه",back:"رجوع",conditional:"مشروط",entity:"الكيان",light:"مظيء",menu:"القائمة",quickbar:"تبويب سريع",spacer:"مساحة",template:"قالب",weather:"الطقس"}},conditional:{chip:"رقاقة"},sub_element_editor:{title:"محرر الرقاقة"}},form:{alignment_picker:{values:{center:"توسيط",default:"المحاذاة الافتراضية",end:"نهاية",justify:"مساواة",start:"بداية"}},color_picker:{values:{default:"اللون الإفتراضي"}},icon_type_picker:{values:{default:"النوع افتراضي","entity-picture":"صورة الكيان",icon:"أيقونة",none:"لا شئ"}},info_picker:{values:{default:"المعلومات الافتراضية","last-changed":"آخر تغيير","last-updated":"آخر تحديث",name:"الإسم",none:"لا شئ",state:"الحالة"}},layout_picker:{values:{default:"تخطيط افتراضي",horizontal:"تخطيط أفقي",vertical:"تخطيط رأسي"}}}}}}),Xs=/* @__PURE__ */$t({default:()=>ua,editor:()=>ca}),Zs=kt(()=>{ua={editor:ca={card:{chips:{alignment:"Подравняване"},climate:{hvac_modes:"HVAC Режими",show_temperature_control:"Контрол на температурата?"},cover:{show_buttons_control:"Контролни бутони?",show_position_control:"Контрол на позицията?",show_tilt_position_control:"Контрол на наклона?"},fan:{show_oscillate_control:"Контрол на трептенето?",show_percentage_control:"Процентов контрол?"},generic:{collapsible_controls:"Свий контролите при изключен",content_info:"Съдържание",fill_container:"Изпълване на контейнера",icon_animation:"Анимирай иконата при активен?",icon_color:"Цвят на икона",icon_type:"Тип на икона",layout:"Оформление",primary_info:"Първостепенна информация",secondary_info:"Второстепенна информация",use_entity_picture:"Използвай снимката на обекта?"},humidifier:{show_target_humidity_control:"Контрол на влажността?"},light:{incompatible_controls:"Някои опции могат да бъдат скрити при условие че осветителното тяло не поддържа фунцията.",show_brightness_control:"Контрол на яркостта?",show_color_control:"Контрол на цвета?",show_color_temp_control:"Контрол на температурата?",use_light_color:"Използвай цвета на светлината"},lock:{lock:"Заключен",open:"Отворен",unlock:"Отключен"},"media-player":{media_controls:"Контрол на Медиата",media_controls_list:{next:"Следващ",on_off:"Вкл./Изкл.",play_pause_stop:"Пусни/пауза/стоп",previous:"Предишен",repeat:"Повтаряне",shuffle:"Разбъркано"},show_volume_level:"Покажи контрола за звук",use_media_artwork:"Използвай визуалните детайли от медията",use_media_info:"Използвай информация от медията",volume_controls:"Контрол на звука",volume_controls_list:{volume_buttons:"Бутони за звук",volume_mute:"Заглуши",volume_set:"Ниво на звука"}},template:{badge_color:"Цвят на значка",badge_icon:"Икона на значка",content:"Съдържание",entity_extra:"Използван в шаблони и действия",multiline_secondary:"Много-редова второстепенна информация?",picture:"Картина (ще замени иконата)",primary:"Първостепенна информация",secondary:"Второстепенна информация"},title:{subtitle:"Подзаглавие",title:"Заглавие"},update:{show_buttons_control:"Контролни бутони?"},vacuum:{commands:"Конади",commands_list:{on_off:"Вкл./Изкл."}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добави чип",chips:"Чипове",clear:"Изчисти",edit:"Редактирай",select:"Избери чип",types:{action:"Действия","alarm-control-panel":"Аларма",back:"Назад",conditional:"Условни",entity:"Обект",light:"Осветление",menu:"Меню",template:"Шаблон",weather:"Време"}},conditional:{chip:"Чип"},sub_element_editor:{title:"Чип редактор"}},form:{alignment_picker:{values:{center:"Център",default:"Основно подравняване",end:"Край",justify:"Подравнен",start:"Старт"}},color_picker:{values:{default:"Основен цвят"}},icon_type_picker:{values:{default:"Основен тип","entity-picture":"Картина на обекта",icon:"Икона",none:"Липсва"}},info_picker:{values:{default:"Основна информация","last-changed":"Последно Променен","last-updated":"Последно Актуализиран",name:"Име",none:"Липсва",state:"Състояние"}},layout_picker:{values:{default:"Основно оформление",horizontal:"Хоризонтално оформление",vertical:"Вертикално оформление"}}}}}}),Js=/* @__PURE__ */$t({card:()=>ha,default:()=>pa,editor:()=>da}),Qs=kt(()=>{pa={card:ha={not_found:"No s'ha trobat l'entitat"},editor:da={card:{chips:{alignment:"Alineació"},climate:{hvac_modes:"Modes HVAC",show_temperature_control:"Control de temperatura?"},cover:{show_buttons_control:"Botons de control?",show_position_control:"Control de posició?",show_tilt_position_control:"Control d'inclinació?"},fan:{show_oscillate_control:"Control d'oscil·lació?",show_percentage_control:"Control de percentatge?"},generic:{collapsible_controls:"Amaga els controls en desactivar",color:"Color",content_info:"Contingut",fill_container:"Emplena el contenidor",icon_animation:"Animar icona en activar?",icon_color:"Color d'icona",icon_type:"Tipus d'icona",layout:"Distribució",primary_info:"Informació primaria",secondary_info:"Informació secundaria",use_entity_picture:"Fer servir la imatge de l'entitat?"},humidifier:{show_target_humidity_control:"Control d'humitat?"},light:{incompatible_controls:"Alguns controls no es mostraran si l'entitat no suporta eixa funció.",show_brightness_control:"Control de brillantor?",show_color_control:"Control de color?",show_color_temp_control:"Control de la temperatura del color?",use_light_color:"Fes servir el color del llum"},lock:{lock:"Bloqueja",open:"Obri",unlock:"Desbloqueja"},"media-player":{media_controls:"Controls multimèdia",media_controls_list:{next:"Pista següent",on_off:"Engegar/Apagar",play_pause_stop:"Reproduïr/Pausar/Detindre",previous:"Pista anterior",repeat:"Mode de repetició",shuffle:"Mesclar"},show_volume_level:"Mostra el nivell de volum",use_media_artwork:"Fes servir l'art multimèdia",use_media_info:"Empra la informació multimèdia",volume_controls:"Controls de volum",volume_controls_list:{volume_buttons:"Botons de volum",volume_mute:"Silenci",volume_set:"Nivell de volum"}},number:{display_mode:"Mode de visualització",display_mode_list:{buttons:"Botons",default:"Per defecte (lliscant)",slider:"Lliscant"}},template:{badge_color:"Color de la insígnia",badge_icon:"Icona de la insígnia",content:"Contingut",entity_extra:"Utilitzats en plantilles i accions",label:"Etiqueta",multiline_secondary:"Secundaria en varies línies?",picture:"Imatge (reemplaçarà la icona)",primary:"Informació primaria",secondary:"Informació secundaria"},title:{subtitle:"Subtítol",subtitle_tap_action:"Acció en tocar el subtítol",title:"Títol",title_tap_action:"Acció en tocar el títol"},update:{show_buttons_control:"Botons de control?"},vacuum:{commands:"Comandaments",commands_list:{on_off:"Engegar/Apagar"}},weather:{show_conditions:"Condicions?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Afegir xip",chips:"Xips",clear:"Buidar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acció","alarm-control-panel":"Alarma",back:"Tornar",conditional:"Condicional",entity:"Entitat",light:"Llum",menu:"Menú",spacer:"Espai",template:"Plantilla",weather:"Oratge"}},conditional:{chip:"Xip"},sub_element_editor:{title:"Editor de xips"}},form:{alignment_picker:{values:{center:"Centre",default:"Alineació per defecte",end:"Final",justify:"Justifica",start:"Inici"}},color_picker:{values:{default:"Color per defecte"}},icon_type_picker:{values:{default:"Tipus per defecte","entity-picture":"Entitat d'imatge",icon:"Icona",none:"Cap"}},info_picker:{values:{default:"Informació per defecte","last-changed":"Últim Canvi","last-updated":"Última Actualització",name:"Nom",none:"Cap",state:"Estat"}},layout_picker:{values:{default:"Distribució per defecte",horizontal:"Distribució horitzontal",vertical:"Distribució vertical"}}}}}}),tl=/* @__PURE__ */$t({card:()=>ma,default:()=>ga,editor:()=>fa}),el=kt(()=>{ga={card:ma={not_found:"Entita nebyla nalezena"},editor:fa={card:{chips:{alignment:"Zarovnání"},climate:{hvac_modes:"Režimy HVAC",show_temperature_control:"Ovládání teploty?"},cover:{show_buttons_control:"Zobrazit ovládací tlačítka?",show_position_control:"Zobrazit ovládání polohy?",show_tilt_position_control:"Zobrazit ovládání náklonu?"},fan:{show_oscillate_control:"Ovládání oscilaceM",show_percentage_control:"Ovládání v procentech?"},generic:{collapsible_controls:"Pokud je vypnuto, skrýt ovládací prvky",content_info:"Obsah",fill_container:"Vyplnit prostor",icon_animation:"Pokud je aktivní, animovat ikonu?",icon_color:"Barva ikony",icon_type:"Typ ikony",layout:"Rozložení",primary_info:"Primární informace",secondary_info:"Sekundární informace",use_entity_picture:"Použít ikonu entity?"},humidifier:{show_target_humidity_control:"Ovládání vlhkosti?"},light:{incompatible_controls:"Některé ovládací prvky se nemusí zobrazit, pokud vaše světlo tuto funkci nepodporuje.",show_brightness_control:"Ovládání jasu?",show_color_control:"Ovládání barvy světla?",show_color_temp_control:"Ovládání teploty světla?",use_light_color:"Ikona podle barvy světla?"},lock:{lock:"Zamčeno",open:"Otevřeno",unlock:"Odemčeno"},"media-player":{media_controls:"Ovládání médií",media_controls_list:{next:"Další stopa",on_off:"Zapnout/Vypnout",play_pause_stop:"Přehrát/Pauza/Zastavit",previous:"Předchozí stopa",repeat:"Režim opakování",shuffle:"Zamíchat"},show_volume_level:"Zobrazit úroveň hlasitosti",use_media_artwork:"Použít artwork z média",use_media_info:"Použít informace z média",volume_controls:"Ovládání hlasitosti",volume_controls_list:{volume_buttons:"Tlačítka hlasitosti",volume_mute:"Ztlumit",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazení",display_mode_list:{buttons:"Tlačítka",default:"Výchozí (posuvník)",slider:"Posuvník"}},template:{badge_color:"Barva odznaku",badge_icon:"Ikona odznaku",content:"Obsah",entity_extra:"Použito v šablonách a akcích",multiline_secondary:"Víceřádková sekundární informace?",picture:"Obrázek (nahradí ikonu)",primary:"Primární informace",secondary:"Sekundární informace"},title:{subtitle:"Popis",subtitle_tap_action:"Akce při klepnutí na popis",title:"Nadpis",title_tap_action:"Akce při klepnutí na nadpis"},update:{show_buttons_control:"Zobrazit ovládací tlačítka?"},vacuum:{commands:"Příkazy",commands_list:{on_off:"Zapnout/Vypnout"}},weather:{show_conditions:"Zobrazit podmínky?",show_temperature:"Zobrazit teplotu?"}},chip:{"chip-picker":{add:"Přidat tlačítko",chips:"Tlačítka",clear:"Vymazat",edit:"Upravit",select:"Vybrat tlačítko",types:{action:"Akce","alarm-control-panel":"Alarm",back:"Zpět",conditional:"Podmínka",entity:"Entita",light:"Světlo",menu:"Menu",spacer:"Mezera",template:"Šablona",weather:"Počasí"}},conditional:{chip:"Tlačítko"},sub_element_editor:{title:"Editor tlačítek"}},form:{alignment_picker:{values:{center:"Na střed",default:"Výchozí zarovnání",end:"Na konec",justify:"Do bloku",start:"Na začátek"}},color_picker:{values:{default:"Výchozí barva"}},icon_type_picker:{values:{default:"Výchozí typ","entity-picture":"Ikona entity",icon:"Ikona",none:"Nic"}},info_picker:{values:{default:"Výchozí informace","last-changed":"Poslední změna","last-updated":"Poslední aktualizace",name:"Název",none:"Nic",state:"Stav"}},layout_picker:{values:{default:"Výchozí rozložení",horizontal:"Vodorovné rozložení",vertical:"Svislé rozložení"}}}}}}),ol=/* @__PURE__ */$t({card:()=>_a,default:()=>ba,editor:()=>va}),il=kt(()=>{ba={card:_a={not_found:"Enhed ikke fundet"},editor:va={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-tilstande",show_temperature_control:"Temperaturkontrol?"},cover:{show_buttons_control:"Betjeningsknapper?",show_position_control:"Positionskontrol?",show_tilt_position_control:"Tiltkontrol?"},fan:{show_oscillate_control:"Oscillationskontrol?",show_percentage_control:"Procentkontrol?"},generic:{collapsible_controls:"Skjul kontroller når slukket",color:"Farve",content_info:"Indhold",fill_container:"Fyld container",icon_animation:"Animér ikon når aktiv?",icon_color:"Ikon farve",icon_type:"Ikon type",layout:"Layout",primary_info:"Primær information",secondary_info:"Sekundær information",use_entity_picture:"Brug enhedsbillede?"},humidifier:{show_target_humidity_control:"Luftfugtighedskontrol?"},light:{incompatible_controls:"Nogle kontroller vises muligvis ikke, hvis dit lys ikke understøtter funktionen.",show_brightness_control:"Lysstyrkekontrol?",show_color_control:"Farvekontrol?",show_color_temp_control:"Temperaturfarvekontrol?",use_light_color:"Brug lysfarve"},lock:{lock:"Lås",open:"Åben",unlock:"Lås op"},"media-player":{media_controls:"Mediekontrol",media_controls_list:{next:"Næste nummer",on_off:"Tænd/Sluk",play_pause_stop:"Afspil/Pause/Stop",previous:"Forrige nummer",repeat:"Gentagelsestilstand",shuffle:"Bland"},show_volume_level:"Vis lydstyrke",use_media_artwork:"Brug mediebilleder",use_media_info:"Brug medieinformation",volume_controls:"Lydstyrkekontrol",volume_controls_list:{volume_buttons:"Lydstyrkeknapper",volume_mute:"Lydløs",volume_set:"Lydstyrke"}},number:{display_mode:"Visningstilstand",display_mode_list:{buttons:"Knapper",default:"Standard (slider)",slider:"Slider"}},template:{badge_color:"Badge farve",badge_icon:"Badge ikon",content:"Indhold",entity_extra:"Anvendes i skabeloner og handlinger",label:"Label",multiline_secondary:"Multi-linje sekundær?",picture:"Billede (erstatter ikonet)",primary:"Primær information",secondary:"Sekundær information"},title:{subtitle:"Undertitel",subtitle_tap_action:"Undertitel tryk handling",title:"Titel",title_tap_action:"Title tryk handling"},update:{show_buttons_control:"Betjeningsknapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå til/fra"}},weather:{show_conditions:"Vejrforhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Tilføj chip",chips:"Chips",clear:"Nulstil",edit:"Rediger",select:"Vælg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbage",conditional:"Betinget",entity:"Enhed",light:"Lys",menu:"Menu",spacer:"Afstand",template:"Skabelon",weather:"Vejr"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Centrer",default:"Standard justering",end:"Slut",justify:"Lige margener",start:"Start"}},color_picker:{values:{default:"Standardfarve"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhedsbillede",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard information","last-changed":"Sidst ændret","last-updated":"Sidst opdateret",name:"Navn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard layout",horizontal:"Horisontal layout",vertical:"Vertikal layout"}}}}}}),nl=/* @__PURE__ */$t({card:()=>ya,default:()=>ka,editor:()=>wa}),rl=kt(()=>{ka={card:ya={not_found:"Entität nicht gefunden"},editor:wa={card:{chips:{alignment:"Ausrichtung"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatursteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?",show_tilt_position_control:"Winkelsteuerung?"},empty:{no_config_options:"Diese Karte hat keine Optionen."},fan:{show_direction_control:"Richtungssteuerung?",show_oscillate_control:"Oszillationssteuerung?",show_percentage_control:"Prozentuale Kontrolle?"},generic:{collapsible_controls:"Schieberegler einklappen, wenn aus",color:"Farbe",content_info:"Inhalt",fill_container:"Container ausfüllen",icon_animation:"Icon animieren, wenn aktiv?",icon_color:"Icon-Farbe",icon_type:"Icon-Typ",layout:"Layout",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",use_entity_picture:"Entitätsbild verwenden?"},humidifier:{show_target_humidity_control:"Luftfeuchtigkeitssteuerung?"},light:{incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt.",show_brightness_control:"Helligkeitsregelung?",show_color_control:"Farbsteuerung?",show_color_temp_control:"Farbtemperatursteuerung?",use_light_color:"Farbsteuerung verwenden"},lock:{lock:"Verriegeln",open:"Öffnen",unlock:"Entriegeln"},"media-player":{media_controls:"Mediensteuerung",media_controls_list:{next:"Nächster Titel",on_off:"Ein/Aus",play_pause_stop:"Play/Pause/Stop",previous:"Vorheriger Titel",repeat:"Wiederholen",shuffle:"Zufällige Wiedergabe"},show_volume_level:"Lautstärke-Level anzeigen",use_media_artwork:"Mediengrafik verwenden",use_media_info:"Medieninfos verwenden",volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke-Buttons",volume_mute:"Stumm",volume_set:"Lautstärke-Level"}},number:{display_mode:"Anzeigemodus",display_mode_list:{buttons:"Buttons",default:"Standard (Schieberegler)",slider:"Schieberegler"}},template:{badge_color:"Badge-Farbe",badge_icon:"Badge-Icon",content:"Inhalt",entity_extra:"Wird in Vorlagen und Aktionen verwendet",label:"Beschriftung",multiline_secondary:"Mehrzeilig sekundär?",picture:"Bild (ersetzt das Icon)",primary:"Primäre Information",secondary:"Sekundäre Information"},title:{subtitle:"Untertitel",subtitle_tap_action:"Untertitel Tipp-Aktion",title:"Titel",title_tap_action:"Titel Tipp-Aktion"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle",commands_list:{on_off:"An/Ausschalten"}},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Chip hinzufügen",chips:"Chips",clear:"Löschen",edit:"Editieren",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",quickbar:"Quickbar",spacer:"Abstand",template:"Vorlage",weather:"Wetter"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip Editor"}},form:{alignment_picker:{values:{center:"Mitte",default:"Standard",end:"Ende",justify:"Ausrichten",start:"Anfang"}},color_picker:{values:{default:"Standardfarbe"}},icon_type_picker:{values:{default:"Standard-Typ","entity-picture":"Entitätsbild",icon:"Icon",none:"Keines"}},info_picker:{values:{default:"Standard-Information","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",name:"Name",none:"Keine",state:"Zustand"}},layout_picker:{values:{default:"Standard-Layout",horizontal:"Horizontales Layout",vertical:"Vertikales Layout"}}}}}}),al=/* @__PURE__ */$t({default:()=>$a,editor:()=>Ca}),sl=kt(()=>{$a={editor:Ca={card:{chips:{alignment:"Ευθυγράμμιση"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},fan:{show_oscillate_control:"Έλεγχος ταλάντωσης;",show_percentage_control:"Έλεγχος ποσοστού;"},generic:{content_info:"Περιεχόμενο",icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;",icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",use_entity_picture:"Χρήση εικόνας οντότητας;"},light:{incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία.",show_brightness_control:"Έλεγχος φωτεινότητας;",show_color_control:"Έλεγχος χρώματος;",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",use_light_color:"Χρήση χρώματος φωτος"},"media-player":{media_controls:"Έλεγχος πολυμέσων",media_controls_list:{next:"Επόμενο κομμάτι",on_off:"Ενεργοποίηση/απενεργοποίηση",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",previous:"Προηγούμενο κομμάτι",repeat:"Λειτουργία επανάληψης",shuffle:"Τυχαία σειρά"},use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",use_media_info:"Χρήση πληροφοριών πολυμέσων",volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_mute:"Σίγαση",volume_set:"Επίπεδο έντασης ήχου"}},template:{content:"Περιεχόμενο",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες"},title:{subtitle:"Υπότιτλος",title:"Τίτλος"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"}},chip:{"chip-picker":{add:"Προσθήκη chip",chips:"Chips",clear:"Καθαρισμός",edit:"Επεξεργασία",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Επεξεργαστής Chip"}},form:{alignment_picker:{values:{center:"Στοίχιση στο κέντρο",default:"Προεπιλεγμένη στοίχιση",end:"Στοίχιση δεξιά",justify:"Πλήρης στοίχιση",start:"Στοίχιση αριστερά"}},color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",name:"Όνομα",none:"Τίποτα",state:"Κατάσταση"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",horizontal:"Οριζόντια διάταξη",vertical:"Κάθετη διάταξη"}}}}}}),ll=/* @__PURE__ */$t({card:()=>Ea,default:()=>Sa,editor:()=>xa,migration:()=>Aa}),cl=kt(()=>{Sa={card:Ea={not_found:"Entity not found"},editor:xa={section:{context:"Context",content:"Content",features:"Features",interactions:"Interactions",layout:"Layout",badge:"Badge"},card:{chips:{alignment:"Alignment"},climate:{hvac_modes:"HVAC Modes",show_temperature_control:"Temperature control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?",show_tilt_position_control:"Tilt control?"},empty:{no_config_options:"This card has no config options."},fan:{show_direction_control:"Direction control?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Percentage control?"},generic:{entity:"Entity",area:"Area",color:"Color",content_info:"Content",fill_container:"Fill container",icon_animation:"Animate icon when active?",icon_color:"Icon color",icon_type:"Icon type",layout:"Layout",primary_info:"Primary information",secondary_info:"Secondary information",use_entity_picture:"Use entity picture?",collapsible_controls:"Collapse controls when off",picture:"Picture",picture_helper:"If set, it will replace the icon."},humidifier:{show_target_humidity_control:"Humidity control?"},light:{incompatible_controls:"Some controls may not be displayed if your light does not support the feature.",show_brightness_control:"Brightness control?",show_color_control:"Color control?",show_color_temp_control:"Color temperature control?",use_light_color:"Use light color"},lock:{lock:"Lock",open:"Open",unlock:"Unlock"},"media-player":{media_controls:"Media controls",media_controls_list:{next:"Next track",on_off:"Turn on/off",play_pause_stop:"Play/pause/stop",previous:"Previous track",repeat:"Repeat mode",shuffle:"Shuffle"},show_volume_level:"Show volume level",use_media_artwork:"Use media artwork",use_media_info:"Use media info",volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_mute:"Mute",volume_set:"Volume level"}},number:{display_mode:"Display Mode",display_mode_list:{buttons:"Buttons",default:"Default (slider)",slider:"Slider"}},template:{area_helper:"Used in templates and features",area:"Area",badge_color:"Badge color",badge_icon:"Badge icon",badge_text_helper:"If set, it will replace the icon.",badge_text:"Badge text",badge:"Badge",content:"Content",entity_helper:"Used in templates, interactions and features",entity_helper_legacy:"Used in templates and interactions",label:"Label",layout:"Layout",multiline_secondary_helper:"The card may be taller to fit the text and will not always align with the grid system.",multiline_secondary:"Allow multiline secondary information",primary:"Primary information",secondary:"Secondary information"},title:{alignment:"Alignment",subtitle:"Subtitle",subtitle_tap_action:"Subtitle tap action",title:"Title",title_tap_action:"Title tap action"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands",commands_list:{on_off:"Turn on/off"}},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"}},badge:{template:{label:"Label",content:"Content",entity_helper:"Used in templates and interactions",area_helper:"Used in templates"}},chip:{"chip-picker":{add:"Add chip",chips:"Chips",clear:"Clear",edit:"Edit",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",quickbar:"Quickbar",spacer:"Spacer",template:"Template",weather:"Weather"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip editor"}},form:{alignment_picker:{values:{center:"Center",default:"Default alignment",end:"End",justify:"Justify",start:"Start"}},color_picker:{values:{default:"Default color"}},icon_type_picker:{values:{default:"Default type","entity-picture":"Entity picture",icon:"Icon",none:"None"}},info_picker:{values:{default:"Default information","last-changed":"Last Changed","last-updated":"Last Updated",name:"Name",none:"None",state:"State"}},layout_picker:{values:{default:"Default layout",horizontal:"Horizontal layout",vertical:"Vertical layout"}}}},migration:Aa={title:"Card updated",description:"Your card’s configuration has been migrated to the new version. You can find more information about the changes in {link}.",post:"the GitHub post",revert:"Revert",ok:"Ok"}}}),ul=/* @__PURE__ */$t({card:()=>Ta,default:()=>Ia,editor:()=>Ma}),hl=kt(()=>{Ia={card:Ta={not_found:"Entidad no encontrada"},editor:Ma={card:{chips:{alignment:"Alineación"},climate:{hvac_modes:"Modos de climatización",show_temperature_control:"¿Control de temperatura?"},cover:{show_buttons_control:"¿Botones de control?",show_position_control:"¿Control de posición?",show_tilt_position_control:"¿Control de inclinación?"},empty:{no_config_options:"Esta carta no tiene opciones de config."},fan:{show_direction_control:"¿Control de dirección?",show_oscillate_control:"¿Controlar oscilación?",show_percentage_control:"¿Controlar porcentaje?"},generic:{collapsible_controls:"Contraer controles cuando está apagado",color:"Color",content_info:"Contenido",fill_container:"Rellenar",icon_animation:"¿Icono animado cuando está activo?",icon_color:"Color de icono",icon_type:"Tipo de icono",layout:"Diseño",primary_info:"Información primaria",secondary_info:"Información secundaria",use_entity_picture:"¿Usar imagen de entidad?"},humidifier:{show_target_humidity_control:"¿Controlar humedad?"},light:{incompatible_controls:"Es posible que algunos controles no se muestren si la luz no es compatible con esta función.",show_brightness_control:"¿Controlar brillo?",show_color_control:"¿Controlar color?",show_color_temp_control:"¿Controlar temperatura del color?",use_light_color:"Usar color de la luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles multimedia",media_controls_list:{next:"Pista siguiente",on_off:"Activar/desactivar",play_pause_stop:"Reproducir/pausa/parar",previous:"Pista anterior",repeat:"Modo de repetición",shuffle:"Aleatoria"},show_volume_level:"Mostrar nivel de volumen",use_media_artwork:"Usar ilustraciones multimedia",use_media_info:"Usar información multimedia",volume_controls:"Controles de volumen",volume_controls_list:{volume_buttons:"Botones de volumen",volume_mute:"Silenciar",volume_set:"Nivel de volumen"}},number:{display_mode:"Modo de visualización",display_mode_list:{buttons:"Botones",default:"Por defecto (deslizante)",slider:"Control deslizante"}},template:{badge_color:"Color del distintivo",badge_icon:"Icono del distintivo",content:"Contenido",entity_extra:"Utilizado en plantillas y acciones",label:"Etiqueta",multiline_secondary:"¿Secundaria multilínea?",picture:"Imagen (sustituirá al icono)",primary:"Información primaria",secondary:"Información secundaria"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Acción al tocar el subtítulo",title:"Título",title_tap_action:"Acción al tocar el título"},update:{show_buttons_control:"¿Botones de control?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Activar/desactivar"}},weather:{show_conditions:"¿Condiciones?",show_temperature:"¿Temperatura?"}},chip:{"chip-picker":{add:"Añadir chip",chips:"Chips",clear:"Limpiar",edit:"Editar",select:"Seleccionar chip",types:{action:"Acción","alarm-control-panel":"Alarma",back:"Volver",conditional:"Condicional",entity:"Entidad",light:"Luz",menu:"Menú",spacer:"Espaciador",template:"Plantilla",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alineación predeterminada",end:"Final",justify:"Justificado",start:"Inicio"}},color_picker:{values:{default:"Color predeterminado"}},icon_type_picker:{values:{default:"Por defecto","entity-picture":"Imagen de entidad",icon:"Icono",none:"Ninguno"}},info_picker:{values:{default:"Información predeterminada","last-changed":"Último cambio","last-updated":"Última actualización",name:"Nombre",none:"Ninguno",state:"Estado"}},layout_picker:{values:{default:"Diseño predeterminado",horizontal:"Diseño horizontal",vertical:"Diseño vertical"}}}}}}),dl=/* @__PURE__ */$t({card:()=>za,default:()=>Na,editor:()=>Pa}),pl=kt(()=>{Na={card:za={not_found:"Entiteettiä ei löytynyt"},editor:Pa={card:{chips:{alignment:"Asettelu"},climate:{hvac_modes:"HVAC-tilat",show_temperature_control:"Lämpötilan säätö?"},cover:{show_buttons_control:"Toimintopainikkeet?",show_position_control:"Sijainnin hallinta?",show_tilt_position_control:"Kallistuksen säätö?"},fan:{show_oscillate_control:"Oskillaation säätö?",show_percentage_control:"Prosentuaalinen säätö?"},generic:{collapsible_controls:"Supista säätimet ollessa pois-tilassa",color:"Väri",content_info:"Sisältö",fill_container:"Täytä alue",icon_animation:"Animoi kuvake, kun aktiivinen?",icon_color:"Ikonin väri",icon_type:"Kuvakkeen tyyppi",layout:"Asettelu",primary_info:"Ensisijaiset tiedot",secondary_info:"Toissijaiset tiedot",use_entity_picture:"Käytä kohteen kuvaa?"},humidifier:{show_target_humidity_control:"Kosteudenhallinta?"},light:{incompatible_controls:"Jotkin toiminnot eivät näy, jos valaisimesi ei tue niitä.",show_brightness_control:"Kirkkauden säätö?",show_color_control:"Värin säätö?",show_color_temp_control:"Värilämpötilan säätö?",use_light_color:"Käytä valaisimen väriä"},lock:{lock:"Lukitse",open:"Avaa",unlock:"Poista lukitus"},"media-player":{media_controls:"Toiminnot",media_controls_list:{next:"Seuraava kappale",on_off:"Päälle/pois",play_pause_stop:"Toista/keskeytä/pysäytä",previous:"Edellinen kappale",repeat:"Jatkuva toisto",shuffle:"Sekoita"},show_volume_level:"Näytä äänenvoimakkuuden hallinta",use_media_artwork:"Käytä median kuvituksia",use_media_info:"Käytä median tietoja",volume_controls:"Äänenvoimakkuuden hallinta",volume_controls_list:{volume_buttons:"Äänenvoimakkuuspainikkeet",volume_mute:"Mykistä",volume_set:"Äänenvoimakkuus"}},number:{display_mode:"Näyttötila",display_mode_list:{buttons:"Painikkeet",default:"Oletus (liukusäädin)",slider:"Liukusäädin"}},template:{badge_color:"Merkin väri",badge_icon:"Merkin kuvake",content:"Sisältö",entity_extra:"Käytetään malleissa ja toiminnoissa",label:"Nimiö",multiline_secondary:"Monirivinen toissijainen tieto?",picture:"Kuva (korvaa kuvakkeen)",primary:"Ensisijaiset tiedot",secondary:"Toissijaiset tiedot"},title:{subtitle:"Tekstitys",subtitle_tap_action:"Alaotsikon napautustoiminto",title:"Otsikko",title_tap_action:"Otsikkonapautustoiminto"},update:{show_buttons_control:"Toimintopainikkeet?"},vacuum:{commands:"Komennot",commands_list:{on_off:"Kytke päälle/pois"}},weather:{show_conditions:"Ehdot?",show_temperature:"Lämpötila?"}},chip:{"chip-picker":{add:"Lisää merkki",chips:"Merkit",clear:"Tyhjennä",edit:"Muokkaa",select:"Valitse merkki",types:{action:"Toiminto","alarm-control-panel":"Hälytys",back:"Takaisin",conditional:"Ehdollinen",entity:"Kohde",light:"Valaisin",menu:"Valikko",spacer:"Välikappale",template:"Malli",weather:"Sää"}},conditional:{chip:"Merkki"},sub_element_editor:{title:"Merkkieditori"}},form:{alignment_picker:{values:{center:"Keskitä",default:"Keskitys",end:"Loppu",justify:"Sovita",start:"Alku"}},color_picker:{values:{default:"Oletusväri"}},icon_type_picker:{values:{default:"Oletustyyppi","entity-picture":"Kohteen kuva",icon:"Kuvake",none:"Ei mitään"}},info_picker:{values:{default:"Oletustiedot","last-changed":"Viimeksi muuttunut","last-updated":"Viimeksi päivittynyt",name:"Nimi",none:"Ei mitään",state:"Tila"}},layout_picker:{values:{default:"Oletusasettelu",horizontal:"Vaakasuuntainen",vertical:"Pystysuuntainen"}}}}}}),ml=/* @__PURE__ */$t({card:()=>Oa,default:()=>Da,editor:()=>Ba,migration:()=>La}),fl=kt(()=>{Da={card:Oa={not_found:"Entité inconnue"},editor:Ba={badge:{template:{area_helper:"Utilisée dans les modèles",content:"Contenu",entity_helper:"Utilisée dans les modèles et les interactions",label:"Libellé"}},card:{chips:{alignment:"Alignement"},climate:{hvac_modes:"Modes du thermostat",show_temperature_control:"Contrôle de la température ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?",show_tilt_position_control:"Contrôle de l'inclinaison ?"},empty:{no_config_options:"Cette carte n'a pas de paramètres."},fan:{show_direction_control:"Contrôle de la direction ?",show_oscillate_control:"Contrôle de l'oscillation ?",show_percentage_control:"Contrôle de la vitesse ?"},generic:{area:"Pièce",collapsible_controls:"Reduire les contrôles quand éteint",color:"Couleur",content_info:"Contenu",entity:"Entité",fill_container:"Remplir le conteneur",icon_animation:"Animation de l'icône ?",icon_color:"Couleur de l'icône",icon_type:"Type d'icône",layout:"Disposition",picture:"Image",picture_helper:"Si définie, elle remplacera l'icône.",primary_info:"Information principale",secondary_info:"Information secondaire",use_entity_picture:"Utiliser l'image de l'entité ?"},humidifier:{show_target_humidity_control:"Contrôle d'humidité ?"},light:{incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité.",show_brightness_control:"Contrôle de luminosité ?",show_color_control:"Contrôle de la couleur ?",show_color_temp_control:"Contrôle de la température ?",use_light_color:"Utiliser la couleur de la lumière"},lock:{lock:"Verrouiller",open:"Ouvrir",unlock:"Déverrouiller"},"media-player":{media_controls:"Contrôles du media",media_controls_list:{next:"Suivant",on_off:"Allumer/Éteindre",play_pause_stop:"Lecture/pause/stop",previous:"Précédent",repeat:"Mode de répétition",shuffle:"Lecture aléatoire"},show_volume_level:"Afficher le niveau de volume",use_media_artwork:"Utiliser l'illustration du media",use_media_info:"Utiliser les informations du media",volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_mute:"Muet",volume_set:"Niveau de volume"}},number:{display_mode:"Mode d'affichage",display_mode_list:{buttons:"Boutons",default:"Par défaut (Curseur)",slider:"Curseur"}},template:{area:"Pièce",area_helper:"Utilisée dans les modèles et les fonctionnalités",badge:"Badge",badge_color:"Couleur du badge",badge_icon:"Icône du badge",badge_text:"Texte du badge",badge_text_helper:"Si définie, elle remplacera l'icône.",content:"Contenu",entity_extra:"Utilisée pour les modèles et les actions",entity_helper:"Utilisée dans les modèles, les interactions et les fonctionnalités",entity_helper_legacy:"Utilisé dans les modèles et les interactions",label:"Libellé",layout:"Disposition",multiline_secondary:"Autoriser les informations secondaires sur plusieurs lignes",multiline_secondary_helper:"La carte peut être plus haute pour s'adapter au texte et ne s'alignera pas toujours avec le système de grille.",picture:"Image (remplacera l'icône)",primary:"Information principale",secondary:"Information secondaire"},title:{subtitle:"Sous-titre",subtitle_tap_action:"Appui sur le sous-titre",title:"Titre",title_tap_action:"Appui sur le titre"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes",commands_list:{on_off:"Allumer/Éteindre"}},weather:{show_conditions:"Conditions ?",show_conditons:"Conditions ?",show_temperature:"Température ?"}},chip:{"chip-picker":{add:'Ajouter une "chip"',chips:'"Chips"',clear:"Effacer",edit:"Modifier",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",quickbar:"Barre d'accès rapide",spacer:"Espacement",template:"Modèle",weather:"Météo"}},conditional:{chip:"Chip"},sub_element_editor:{title:'Éditeur de "chip"'}},form:{alignment_picker:{values:{center:"Centré",default:"Alignement par défaut",end:"Fin",justify:"Justifié",start:"Début"}},color_picker:{values:{default:"Couleur par défaut"}},icon_type_picker:{values:{default:"Type par défaut","entity-picture":"Image de l'entité",icon:"Icône",none:"Aucune"}},info_picker:{values:{default:"Information par défaut","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",name:"Nom",none:"Aucune",state:"État"}},layout_picker:{values:{default:"Disposition par défault",horizontal:"Disposition horizontale",vertical:"Disposition verticale"}}},section:{badge:"Badge",content:"Contenu",context:"Contexte",features:"Fonctionnalités",interactions:"Interactions",layout:"Disposition"}},migration:La={description:"La configuration de votre carte a été migrée vers la nouvelle version. Vous pouvez trouver plus d’informations sur les changements dans {link}.",ok:"Ok",post:"l'article sur Github",revert:"Revenir en arrière",title:"Carte mise à jour"}}}),gl=/* @__PURE__ */$t({card:()=>ja,default:()=>Ra,editor:()=>Ha}),_l=kt(()=>{Ra={card:ja={not_found:"היישות לא נמצאה"},editor:Ha={card:{chips:{alignment:"יישור"},climate:{hvac_modes:"מצבי שואב אבק",show_temperature_control:"בקרת טמפרטורה?"},cover:{show_buttons_control:"הצג כפתורי שליטה?",show_position_control:"הצג פקדי מיקום?",show_tilt_position_control:"שליטה בהטייה?"},empty:{no_config_options:"לכרטיסיה זו אין אפשרויות להגדרה."},fan:{show_direction_control:"שליטה בכיוון?",show_oscillate_control:"שליטה בהתנדנדות?",show_percentage_control:"שליטה באחוז?"},generic:{collapsible_controls:"הסתר שליטה כשאר מכובה",color:"צבע",content_info:"תוכן",fill_container:"מלא גבולות",icon_animation:"הנפש צלמית אם פעיל?",icon_color:"צבע אייקון",icon_type:"סוג צלמית",layout:"סידור",primary_info:"מידע ראשי",secondary_info:"מידע מישני",use_entity_picture:"השתמש בתמונת הישות?"},humidifier:{show_target_humidity_control:"הצג פקדי לחות?"},light:{incompatible_controls:"יתכן וחלק מהכפתורים לא יופיעו אם התאורה אינה תומכת בתכונה.",show_brightness_control:"שליטה בבהירות?",show_color_control:"הצג פקד צבע?",show_color_temp_control:"הצג פקד גוון תאורה?",use_light_color:"השתמש בצבע האור"},lock:{lock:"נעל",open:"פתח",unlock:"בטל נעילה"},"media-player":{media_controls:"שליטה במדיה",media_controls_list:{next:"רצועה הבאה",on_off:"הדלק/כבה",play_pause_stop:"נגן/השהה/הפסק",previous:"רצועה קודמת",repeat:"חזרה",shuffle:"ערבב"},show_volume_level:"הצג שליטת ווליום",use_media_artwork:"השתמש באומנות מדיה",use_media_info:"השתמש במידע מדיה",volume_controls:"שליטה בווליום",volume_controls_list:{volume_buttons:"כפתורי ווליום",volume_mute:"השתק",volume_set:"רמת ווליום"}},number:{display_mode:"הגדרת מצב תצוגה",display_mode_list:{buttons:"לחצנים",default:"ברירת מחדל (סרגל גלילה)",slider:"סרגל גלילה"}},template:{badge_color:"צבע תג",badge_icon:"צלמית תג",content:"תוכן",entity_extra:"משמש בתבניות ופעולות",label:"תווית",multiline_secondary:"מידע משני בשורות?",picture:"תמונה (תחליף את הצלמית)",primary:"מידע ראשי",secondary:"מידע מישני"},title:{subtitle:"כתובית",subtitle_tap_action:"פעולה בלחיצה על כותרת משנה",title:"כותרת",title_tap_action:"פעולה בלחיצה על הכותרת"},update:{show_buttons_control:"הצג כפתורי שליטה?"},vacuum:{commands:"פקודות",commands_list:{on_off:"כיבוי/הדלקה"},icon_animation:"הנפשת אייקון"},weather:{show_conditions:"הצג תנאים?",show_temperature:"הצג טמפרטורה?"}},chip:{"chip-picker":{add:"הוסף שבב",chips:"שבבים",clear:"נקה",edit:"ערוך",select:"בחר שבב",types:{action:"פעולה","alarm-control-panel":"אזעקה",back:"חזור",conditional:"מותנה",entity:"ישות",light:"אור",menu:"תפריט",spacer:"מרווח",template:"תבנית",weather:"מזג אוויר"}},conditional:{chip:"שבב"},sub_element_editor:{title:"עורך שבב"}},form:{alignment_picker:{values:{center:"אמצע",default:"יישור ברירת מחדל",end:"סוף",justify:"מוצדק",start:"התחלה"}},color_picker:{values:{default:"צבע ברירת מחדל"}},icon_type_picker:{values:{default:"סוג ברירת מחדל","entity-picture":"תמונת יישות",icon:"צלמית",none:"ריק"}},info_picker:{values:{default:"מידע ברירת מחדל","last-changed":"שונה לאחרונה","last-updated":"עודכן לאחרונה",name:"שם",none:"ריק",state:"מצב"}},layout_picker:{values:{default:"סידור ברירת מחדל",horizontal:"סידור מאוזן",vertical:"סידור מאונך"}}}}}}),vl=/* @__PURE__ */$t({card:()=>Ua,default:()=>Fa,editor:()=>Va}),bl=kt(()=>{Fa={card:Ua={not_found:"Entitás nem található"},editor:Va={card:{chips:{alignment:"Rendezés"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Hőmérséklet vezérlő"},cover:{show_buttons_control:"Vezérlő gombok",show_position_control:"Pozíció vezérlő",show_tilt_position_control:"Dőlésszög szabályzó"},fan:{show_oscillate_control:"Oszcilláció vezérlő",show_percentage_control:"Százalékos vezérlő"},generic:{collapsible_controls:"Vezérlők összezárása kikapcsolt állapotban",content_info:"Tartalom",fill_container:"Tároló kitöltése",icon_animation:"Ikon animálása aktív állapotban",icon_color:"Ikon szín",icon_type:"Ikon típus",layout:"Elrendezés",primary_info:"Elsődleges információ",secondary_info:"Másodlagos információ",use_entity_picture:"Entitás kép használata"},humidifier:{show_target_humidity_control:"Páratartalom vezérlő"},light:{incompatible_controls:"Azok a vezérlők nem lesznek megjelenítve, amelyeket a fényforrás nem támogat.",show_brightness_control:"Fényerő vezérlő",show_color_control:"Szín vezérlő",show_color_temp_control:"Színhőmérséklet vezérlő",use_light_color:"Fény szín használata"},lock:{lock:"Zár",open:"Nyitva",unlock:"Nyit"},"media-player":{media_controls:"Média vezérlők",media_controls_list:{next:"Következő szám",on_off:"Ki/bekapcsolás",play_pause_stop:"Lejátszás/szünet/állj",previous:"Előző szám",repeat:"Ismétlés módja",shuffle:"Véletlen lejátszás"},show_volume_level:"Hangerő mutatása",use_media_artwork:"Média borító használata",use_media_info:"Média infó használata",volume_controls:"Hangerő vezérlők",volume_controls_list:{volume_buttons:"Hangerő gombok",volume_mute:"Némítás",volume_set:"Hangerő szint"}},number:{display_mode:"Megjelenítési mód",display_mode_list:{buttons:"Gombok",default:"Alepértelmezett (csúszka)",slider:"Csúszka"}},template:{badge_color:"Jelvény szín",badge_icon:"Jelvény ikon",content:"Tartalom",entity_extra:"Műveletek és sablonok használatakor",multiline_secondary:"Másodlagost több sorba?",picture:"Kép (lecseréli az ikont)",primary:"Elsődleges információ",secondary:"Másodlagos információ"},title:{subtitle:"Alcím",subtitle_tap_action:"Alcímre koppintáskor",title:"Fejléc",title_tap_action:"Fejlécre koppintáskor"},update:{show_buttons_control:"Vezérlő gombok"},vacuum:{commands:"Utasítások",commands_list:{on_off:"Ki/Bekapcsolás"}},weather:{show_conditions:"Állapotok",show_temperature:"Hőmérséklet"}},chip:{"chip-picker":{add:"Chip hozzáadása",chips:"Chip-ek",clear:"Ürítés",edit:"Szerkesztés",select:"Chip kiválasztása",types:{action:"Művelet","alarm-control-panel":"Riasztó",back:"Vissza",conditional:"Feltételes",entity:"Entitás",light:"Fényforrás",menu:"Menü",spacer:"Térköz",template:"Sablon",weather:"Időjárás"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip szerkesztő"}},form:{alignment_picker:{values:{center:"Közepe",default:"Alapértelmezett rendezés",end:"Vége",justify:"Sorkizárt",start:"Kezdete"}},color_picker:{values:{default:"Alapértelmezett szín"}},icon_type_picker:{values:{default:"Alapértelmezett típus","entity-picture":"Entitás kép",icon:"Ikon",none:"Egyik sem"}},info_picker:{values:{default:"Alepértelmezett információ","last-changed":"Utoljára módosítva","last-updated":"Utoljára frissítve",name:"Név",none:"Egyik sem",state:"Állapot"}},layout_picker:{values:{default:"Alapértelmezet elrendezés",horizontal:"Vízszintes elrendezés",vertical:"Függőleges elrendezés"}}}}}}),yl=/* @__PURE__ */$t({card:()=>Ga,default:()=>Ya,editor:()=>Ka}),wl=kt(()=>{Ya={card:Ga={not_found:"Entitas tidak ditemukan"},editor:Ka={card:{chips:{alignment:"Perataan"},climate:{hvac_modes:"Mode HVAC",show_temperature_control:"Kontrol suhu?"},cover:{show_buttons_control:"Tombol kontrol?",show_position_control:"Kontrol posisi?",show_tilt_position_control:"Kontrol kemiringan?"},fan:{show_oscillate_control:"Kontrol osilasi?",show_percentage_control:"Kontrol persentase?"},generic:{collapsible_controls:"Sembunyikan kontrol saat mati",color:"Warna",content_info:"Konten",fill_container:"Isi kontainer",icon_animation:"Animasikan ikon saat aktif?",icon_color:"Warna ikon",icon_type:"Tipe ikon",layout:"Tata letak",primary_info:"Informasi primer",secondary_info:"Informasi sekunder",use_entity_picture:"Gunakan gambar entitas?"},humidifier:{show_target_humidity_control:"Kontrol kelembapan?"},light:{incompatible_controls:"Beberapa kontrol mungkin tidak ditampilkan jika lampu Anda tidak mendukung fitur tersebut.",show_brightness_control:"Kontrol kecerahan?",show_color_control:"Kontrol warna?",show_color_temp_control:"Kontrol suhu warna?",use_light_color:"Gunakan warna lampu"},lock:{lock:"Kunci",open:"Buka",unlock:"Buka kunci"},"media-player":{media_controls:"Kontrol media",media_controls_list:{next:"Lagu berikutnya",on_off:"Nyalakan/Matikan",play_pause_stop:"Putar/jeda/stop",previous:"Lagu sebelumnya",repeat:"Mode pengulangan",shuffle:"Acak"},show_volume_level:"Tampilkan level volume",use_media_artwork:"Gunakan gambar seni media",use_media_info:"Gunakan info media",volume_controls:"Kontrol volume",volume_controls_list:{volume_buttons:"Tombol volume",volume_mute:"Bisukan",volume_set:"Level volume"}},number:{display_mode:"Mode Tampilan",display_mode_list:{buttons:"Tombol",default:"Bawaan (geser)",slider:"Geser"}},template:{badge_color:"Warna lencana",badge_icon:"Ikon lencana",content:"Konten",entity_extra:"Digunakan dalam templat dan tindakan",label:"Label",multiline_secondary:"Info sekunder multibaris?",picture:"Gambar (akan menggantikan ikon)",primary:"Informasi primer",secondary:"Informasi sekunder"},title:{subtitle:"Subjudul",subtitle_tap_action:"Tindakan ketuk subjudul",title:"Judul",title_tap_action:"Tindakan ketuk judul"},update:{show_buttons_control:"Tombol kontrol?"},vacuum:{commands:"Perintah",commands_list:{on_off:"Nyalakan/Matikan"}},weather:{show_conditions:"Kondisi?",show_temperature:"Suhu?"}},chip:{"chip-picker":{add:"Tambah cip",chips:"Cip",clear:"Hapus",edit:"Edit",select:"Pilih cip",types:{action:"Tindakan","alarm-control-panel":"Alarm",back:"Kembali",conditional:"Kondisional",entity:"Entitas",light:"Lampu",menu:"Menu",spacer:"Pemisah",template:"Templat",weather:"Cuaca"}},conditional:{chip:"Cip"},sub_element_editor:{title:"Editor cip"}},form:{alignment_picker:{values:{center:"Tengah",default:"Perataan bawaan",end:"Akhir",justify:"Rata kanan-kiri",start:"Awal"}},color_picker:{values:{default:"Warna bawaan"}},icon_type_picker:{values:{default:"Tipe bawaan","entity-picture":"Gambar entitas",icon:"Ikon",none:"Tidak ada"}},info_picker:{values:{default:"Informasi bawaan","last-changed":"Terakhir Diubah","last-updated":"Terakhir Diperbarui",name:"Nama",none:"Tidak ada",state:"Status"}},layout_picker:{values:{default:"Tata letak bawaan",horizontal:"Tata letak horizontal",vertical:"Tata letak vertikal"}}}}}}),kl=/* @__PURE__ */$t({card:()=>qa,default:()=>Xa,editor:()=>Wa}),Cl=kt(()=>{Xa={card:qa={not_found:"Entità non trovata"},editor:Wa={card:{chips:{alignment:"Allineamento"},climate:{hvac_modes:"Modalità del termostato",show_temperature_control:"Controllo della temperatura?"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura",show_tilt_position_control:"Controllo percentuale inclinazione"},fan:{show_oscillate_control:"Controllo oscillazione",show_percentage_control:"Controllo potenza"},generic:{collapsible_controls:"Nascondi i controlli quando spento",color:"Colore",content_info:"Contenuto",fill_container:"Riempi il contenitore",icon_animation:"Anima l'icona quando attiva",icon_color:"Colore dell'icona",icon_type:"Tipo icona",layout:"Disposizione",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",use_entity_picture:"Usa l'immagine dell'entità"},humidifier:{show_target_humidity_control:"Controllo umidità"},light:{incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta.",show_brightness_control:"Controllo luminosità",show_color_control:"Controllo colore",show_color_temp_control:"Controllo temperatura",use_light_color:"Usa il colore della luce"},lock:{lock:"Blocca",open:"Aperto",unlock:"Sblocca"},"media-player":{media_controls:"Controlli media",media_controls_list:{next:"Traccia successiva",on_off:"Accendi/Spegni",play_pause_stop:"Play/Pausa/Stop",previous:"Traccia precedente",repeat:"Ciclo continuo",shuffle:"Riproduzione casuale"},show_volume_level:"Mostra volume",use_media_artwork:"Usa la copertina della sorgente",use_media_info:"Mostra le informazioni della sorgente",volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del volume",volume_mute:"Silenzia",volume_set:"Livello del volume"}},number:{display_mode:"Modalità di visualizzazione",display_mode_list:{buttons:"Pulsanti",default:"Predefinito (cursore)",slider:"Cursore"}},template:{badge_color:"Colore del badge",badge_icon:"Icona del badge",content:"Contenuto",entity_extra:"Usato in templates ed azioni",label:"Etichetta",multiline_secondary:"Abilita frasi multilinea",picture:"Immagine (sostituirà l'icona)",primary:"Informazione primaria",secondary:"Informazione secondaria"},title:{subtitle:"Sottotitolo",subtitle_tap_action:"Azione di tap sul sottotitolo",title:"Titolo",title_tap_action:"Azione di tap sul titolo"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi",commands_list:{on_off:"Accendi/Spegni"}},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"}},chip:{"chip-picker":{add:"Aggiungi chip",chips:"Chips",clear:"Rimuovi",edit:"Modifica",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",spacer:"Distanziere",template:"Modello",weather:"Meteo"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor di chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Allineamento predefinito",end:"Fine",justify:"Giustificato",start:"Inizio"}},color_picker:{values:{default:"Colore predefinito"}},icon_type_picker:{values:{default:"Tipo predefinito","entity-picture":"Immagine dell'entità",icon:"Icona",none:"Nessuna"}},info_picker:{values:{default:"Informazione predefinita","last-changed":"Ultimo cambiamento","last-updated":"Ultimo aggiornamento",name:"Nome",none:"Nessuno",state:"Stato"}},layout_picker:{values:{default:"Disposizione predefinita",horizontal:"Disposizione orizzontale",vertical:"Disposizione verticale"}}}}}}),$l=/* @__PURE__ */$t({default:()=>Ja,editor:()=>Za}),El=kt(()=>{Ja={editor:Za={card:{chips:{alignment:"정렬"},climate:{hvac_modes:"HVAC 모드",show_temperature_control:"온도 조절 표시"},cover:{show_buttons_control:"컨트롤 버튼 표시",show_position_control:"위치 컨트롤 표시",show_tilt_position_control:"기울기 컨트롤 표시"},fan:{show_oscillate_control:"오실레이트 컨트롤",show_percentage_control:"퍼센트 컨트롤"},generic:{collapsible_controls:"꺼져있을 때 컨트롤 접기",content_info:"내용 정보",fill_container:"콘테이너 채우기",icon_animation:"활성화 시 아이콘 애니메이션 사용",icon_color:"아이콘 색",icon_type:"아이콘 타입",layout:"레이아웃",primary_info:"기본 정보",secondary_info:"보조 정보",use_entity_picture:"엔티티 사진 사용"},humidifier:{show_target_humidity_control:"습도 조절 표시"},light:{incompatible_controls:"조명이 기능을 지원하지 않는 경우 일부 컨트롤이 표시되지 않을 수 있습니다.",show_brightness_control:"밝기 컨트롤 표시",show_color_control:"색 컨트롤 표시",show_color_temp_control:"색 온도 컨트롤 표시",use_light_color:"조명 색 사용"},lock:{lock:"잠금",open:"열기",unlock:"잠금 해제"},"media-player":{media_controls:"미디어 컨트롤",media_controls_list:{next:"다음 트랙",on_off:"켜기/끄기",play_pause_stop:"재생/일시 정지/정지",previous:"이전 트랙",repeat:"반복 모드",shuffle:"섞기"},show_volume_level:"볼륨 레벨 표시",use_media_artwork:"미디어 아트워크 사용",use_media_info:"미디어 정보 사용",volume_controls:"볼륨 컨트롤",volume_controls_list:{volume_buttons:"볼륨 버튼",volume_mute:"음소거",volume_set:"볼륨 레벨"}},template:{badge_color:"뱃지 색",badge_icon:"뱃지 아이콘",content:"내용",entity_extra:"템플릿 및 작업에 사용",multiline_secondary:"Multiline secondary?",picture:"그림 (아이콘 대체)",primary:"기본 정보",secondary:"보조 정보"},title:{subtitle:"부제목",subtitle_tap_action:"부제목 탭 액션",title:"제목",title_tap_action:"제목 탭 액션"},update:{show_buttons_control:"컨트롤 버튼 표시"},vacuum:{commands:"명령어",commands_list:{on_off:"켜기/끄기"}},weather:{show_conditions:"조건 표시",show_temperature:"온도 표시"}},chip:{"chip-picker":{add:"칩 추가",chips:"칩",clear:"클리어",edit:"수정",select:"칩 선택",types:{action:"액션","alarm-control-panel":"알람",back:"이전",conditional:"Conditional",entity:"엔티티",light:"조명",menu:"메뉴",template:"템플릿",weather:"날씨"}},conditional:{chip:"칩"},sub_element_editor:{title:"칩 에디터"}},form:{alignment_picker:{values:{center:"중앙",default:"기본 정렬",end:"끝",justify:"행 정렬",start:"시작"}},color_picker:{values:{default:"기본 색"}},icon_type_picker:{values:{default:"기본 타입","entity-picture":"엔티티 사진",icon:"아이콘",none:"없음"}},info_picker:{values:{default:"기본 정보","last-changed":"마지막 변경","last-updated":"마지막 업데이트",name:"이름",none:"없음",state:"상태"}},layout_picker:{values:{default:"기본 레이아웃",horizontal:"수평 레이아웃",vertical:"수직 레이아웃"}}}}}}),xl=/* @__PURE__ */$t({card:()=>Qa,default:()=>es,editor:()=>ts}),Al=kt(()=>{es={card:Qa={not_found:"Enhet ikke funnet"},editor:ts={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-moduser",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Kontrollere med knapper?",show_position_control:"Posisjonskontroll?",show_tilt_position_control:"Vippe kontroll?"},fan:{show_oscillate_control:"Oscillerende kontroll?",show_percentage_control:"Prosentvis kontroll?"},generic:{collapsible_controls:"Skjul kontroller når av",color:"Farge",content_info:"Innhold",fill_container:"Fyll beholder",icon_animation:"Animer ikon når aktivt?",icon_color:"Ikon farge",icon_type:"Ikontype",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",use_entity_picture:"Bruk enhetsbilde?"},humidifier:{show_target_humidity_control:"Fuktighetskontroll?"},light:{incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen.",show_brightness_control:"Lysstyrkekontroll?",show_color_control:"Fargekontroll?",show_color_temp_control:"Temperatur fargekontroll?",use_light_color:"Bruk lys farge"},lock:{lock:"Lås",open:"Åpne",unlock:"Lås opp"},"media-player":{media_controls:"Media kontroller",media_controls_list:{next:"Neste spor",on_off:"Slå på/av",play_pause_stop:"Spill/pause/stopp",previous:"Forrige spor",repeat:"Gjenta",shuffle:"Bland"},show_volume_level:"Vis volumnivå",use_media_artwork:"Bruk mediabilde",use_media_info:"Bruk mediainformasjon",volume_controls:"Volumkontroller",volume_controls_list:{volume_buttons:"Volumknapper",volume_mute:"Demp",volume_set:"Volumnivå"}},number:{display_mode:"Visningsmodus",display_mode_list:{buttons:"Knapper",default:"Standard (skyveknapp)",slider:"Skyveknapp"}},template:{badge_color:"Badge farge",badge_icon:"Badge ikon",content:"Innhold",entity_extra:"Brukes i maler og handlinger",label:"Etikett",multiline_secondary:"Multilinje sekundær?",picture:"Bilde (erstatter ikonet)",primary:"Primærinformasjon",secondary:"Sekundærinformasjon"},title:{subtitle:"Undertekst",subtitle_tap_action:"Undertekst tap action",title:"Tittel",title_tap_action:"Tittel tap action"},update:{show_buttons_control:"Kontroller knapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå på/av"}},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Legg til chip",chips:"Chips",clear:"Klare",edit:"Endre",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",spacer:"Mellomrom",template:"Mal",weather:"Vær"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip redaktør"}},form:{alignment_picker:{values:{center:"Senter",default:"Standard justering",end:"Slutt",justify:"Blokkjuster",start:"Start"}},color_picker:{values:{default:"Standard farge"}},icon_type_picker:{values:{default:"Standard type","entity-picture":"Enhetsbilde",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Standard informasjon","last-changed":"Sist endret","last-updated":"Sist oppdatert",name:"Navn",none:"Ingen",state:"Tilstand"}},layout_picker:{values:{default:"Standardoppsett",horizontal:"Horisontalt oppsett",vertical:"Vertikalt oppsett"}}}}}}),Sl=/* @__PURE__ */$t({card:()=>os,default:()=>ns,editor:()=>is}),Tl=kt(()=>{ns={card:os={not_found:"Entiteit niet gevonden"},editor:is={card:{chips:{alignment:"Uitlijning"},climate:{hvac_modes:"HVAC-Modi",show_temperature_control:"Temperatuur bediening?"},cover:{show_buttons_control:"Bedieningsknoppen?",show_position_control:"Positie bediening?",show_tilt_position_control:"Kantel bediening?"},empty:{no_config_options:"Deze kaart heeft geen configuratie opties."},fan:{show_direction_control:"Richting bediening?",show_oscillate_control:"Oscillatie bediening?",show_percentage_control:"Bediening middels percentage?"},generic:{collapsible_controls:"Bedieningselementen verbergen wanneer uitgeschakeld",color:"Kleur",content_info:"Inhoud",fill_container:"Vul container",icon_animation:"Icoon animeren indien actief?",icon_color:"Icoon kleur",icon_type:"Icoon type",layout:"Lay-out",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",use_entity_picture:"Gebruik afbeelding van entiteit?"},humidifier:{show_target_humidity_control:"Vochtigheid bediening?"},light:{incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt.",show_brightness_control:"Helderheidsbediening?",show_color_control:"Kleur bediening?",show_color_temp_control:"Kleurtemperatuur bediening?",use_light_color:"Gebruik licht kleur"},lock:{lock:"Vergrendel",open:"Open",unlock:"Ontgrendel"},"media-player":{media_controls:"Mediabediening",media_controls_list:{next:"Volgende nummer",on_off:"Zet aan/uit",play_pause_stop:"Speel/pauze/stop",previous:"Vorige nummer",repeat:"Herhalen",shuffle:"Willekeurig afspelen"},show_volume_level:"Toon volumeniveau",use_media_artwork:"Gebruik media omslag",use_media_info:"Gebruik media informatie",volume_controls:"Volumebediening",volume_controls_list:{volume_buttons:"Volume knoppen",volume_mute:"Dempen",volume_set:"Volumeniveau"}},number:{display_mode:"Weergave Modus",display_mode_list:{buttons:"Knoppen",default:"Standaard (schuifbalk)",slider:"Schuifbalk"}},template:{badge_color:"Badge kleur",badge_icon:"Badge icoon",content:"Inhoud",entity_extra:"Gebruikt in sjablonen en acties",label:"Label",multiline_secondary:"Secundaire informatie op meerdere regels tonen?",picture:"Afbeelding (zal het icoon vervangen)",primary:"Primaire informatie",secondary:"Secundaire informatie"},title:{subtitle:"Ondertitel",subtitle_tap_action:"Ondertitel tik actie",title:"Titel",title_tap_action:"Titel tik actie"},update:{show_buttons_control:"Bedieningsknoppen?"},vacuum:{commands:"Commando's",commands_list:{on_off:"Zet aan/uit"}},weather:{show_conditions:"Weersomstandigheden?",show_temperature:"Temperatuur?"}},chip:{"chip-picker":{add:"Toevoegen chip",chips:"Chips",clear:"Maak leeg",edit:"Bewerk",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",spacer:"Afstandhouder",template:"Sjabloon",weather:"Weer"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip-editor"}},form:{alignment_picker:{values:{center:"Midden",default:"Standaard uitlijning",end:"Einde",justify:"Uitlijnen",start:"Begin"}},color_picker:{values:{default:"Standaard kleur"}},icon_type_picker:{values:{default:"Standaard icoon type","entity-picture":"Entiteit afbeelding",icon:"Icoon",none:"Geen"}},info_picker:{values:{default:"Standaard informatie","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",name:"Naam",none:"Geen",state:"Staat"}},layout_picker:{values:{default:"Standaard lay-out",horizontal:"Horizontale lay-out",vertical:"Verticale lay-out"}}}}}}),Ml=/* @__PURE__ */$t({card:()=>rs,default:()=>ss,editor:()=>as}),Il=kt(()=>{ss={card:rs={not_found:"Nie znaleziono encji"},editor:as={card:{chips:{alignment:"Wyrównanie"},climate:{hvac_modes:"Tryby urządzenia",show_temperature_control:"Sterowanie temperaturą?"},cover:{show_buttons_control:"Przyciski sterujące?",show_position_control:"Sterowanie położeniem?",show_tilt_position_control:"Sterowanie poziomem otwarcia?"},fan:{show_direction_control:"Kontrola kierunku?",show_oscillate_control:"Sterowanie oscylacją?",show_percentage_control:"Sterowanie procentowe?"},generic:{collapsible_controls:"Zwiń sterowanie, jeśli wyłączone",color:"Kolor",content_info:"Zawartość",fill_container:"Wypełnij zawartością",icon_animation:"Animować, gdy aktywny?",icon_color:"Kolor ikony",icon_type:"Typ ikony",layout:"Układ",primary_info:"Informacje główne",secondary_info:"Informacje drugorzędne",use_entity_picture:"Użyć obrazu encji?"},humidifier:{show_target_humidity_control:"Sterowanie wilgotnością?"},light:{incompatible_controls:"Niektóre funkcje są niewidoczne, jeśli światło ich nie obsługuje.",show_brightness_control:"Sterowanie jasnością?",show_color_control:"Sterowanie kolorami?",show_color_temp_control:"Sterowanie temperaturą światła?",use_light_color:"Użyj koloru światła"},lock:{lock:"Zablokuj",open:"Otwórz",unlock:"Odblokuj"},"media-player":{media_controls:"Sterowanie multimediami",media_controls_list:{next:"Następne nagranie",on_off:"Włącz/wyłącz",play_pause_stop:"Odtwórz/Pauza/Zatrzymaj",previous:"Poprzednie nagranie",repeat:"Powtarzanie",shuffle:"Losowo"},show_volume_level:"Wyświetl poziom głośności",use_media_artwork:"Użyj okładek multimediów",use_media_info:"Użyj informacji o multimediach",volume_controls:"Sterowanie głośnością",volume_controls_list:{volume_buttons:"Przyciski głośności",volume_mute:"Wycisz",volume_set:"Poziom głośności"}},number:{display_mode:"Sposób wyświetlania",display_mode_list:{buttons:"Przyciski",default:"Domyślnie (suwak)",slider:"Suwak"}},template:{badge_color:"Kolor odznaki",badge_icon:"Ikona odznaki",content:"Zawartość",entity_extra:"Używane w szablonach i akcjach",label:"Etykieta",multiline_secondary:"Drugorzędne wielowierszowe?",picture:"Obraz (zamiast ikony)",primary:"Informacje główne",secondary:"Informacje drugorzędne"},title:{subtitle:"Podtytuł",subtitle_tap_action:"Akcja na podtytule",title:"Tytuł",title_tap_action:"Akcja na tytule"},update:{show_buttons_control:"Przyciski sterujące?"},vacuum:{commands:"Polecenia",commands_list:{on_off:"Włącz/Wyłącz"}},weather:{show_conditions:"Warunki?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj czip",chips:"Czipy",clear:"Wyczyść",edit:"Edytuj",select:"Wybierz czip",types:{action:"Akcja","alarm-control-panel":"Alarm",back:"Wstecz",conditional:"Warunkowy",entity:"Encja",light:"Światło",menu:"Menu",spacer:"Odstęp",template:"Szablon",weather:"Pogoda"}},conditional:{chip:"Czip"},sub_element_editor:{title:"Edytor czipów"}},form:{alignment_picker:{values:{center:"Wyśrodkowanie",default:"Wyrównanie domyślne",end:"Wyrównanie do prawej",justify:"Justowanie",start:"Wyrównanie do lewej"}},color_picker:{values:{default:"Domyślny kolor"}},icon_type_picker:{values:{default:"Domyślny typ","entity-picture":"Obraz encji",icon:"Ikona",none:"Brak"}},info_picker:{values:{default:"Domyślne informacje","last-changed":"Ostatnia zmiana","last-updated":"Ostatnia aktualizacja",name:"Nazwa",none:"Brak",state:"Stan"}},layout_picker:{values:{default:"Układ domyślny",horizontal:"Układ poziomy",vertical:"Układ pionowy"}}}}}}),zl=/* @__PURE__ */$t({card:()=>ls,default:()=>us,editor:()=>cs}),Pl=kt(()=>{us={card:ls={not_found:"Entidade não encontrada"},editor:cs={card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos do HVAC",show_temperature_control:"Controle de temperatura?"},cover:{show_buttons_control:"Botões de controle?",show_position_control:"Controle de posição?",show_tilt_position_control:"Controle de inclinação?"},empty:{no_config_options:"Esse card não possui opções de configuração."},fan:{show_direction_control:"Controle de direção?",show_oscillate_control:"Controle de oscilação?",show_percentage_control:"Controle de porcentagem?"},generic:{collapsible_controls:"Recolher controles quando desligado",color:"Cor",content_info:"Conteúdo",fill_container:"Preencher espaço",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo do ícone",layout:"Layout",primary_info:"Informação primária",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controle de umidade?"},light:{incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso.",show_brightness_control:"Controle de brilho?",show_color_control:"Controle de cor?",show_color_temp_control:"Controle de temperatura de cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Bloquear",open:"Abrir",unlock:"Desbloquear"},"media-player":{media_controls:"Controles de mídia",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Reproduzir/pausar/parar",previous:"Faixa anterior",repeat:"Modo repetição",shuffle:"Embaralhar"},show_volume_level:"Mostrar nível de volume",use_media_artwork:"Usar arte da mídia",use_media_info:"Usar informação da mídia",volume_controls:"Controles de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Mudo",volume_set:"Nível de volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Padrão (deslizante)",slider:"Deslizante"}},template:{badge_color:"Cor do badge",badge_icon:"Ícone do badge",content:"Conteúdo",entity_extra:"Usado em modelos e ações",label:"Label",multiline_secondary:"Multilinha secundária?",picture:"Imagem (irá substituir o ícone)",primary:"Informação primária",secondary:"Informação secundária"},title:{subtitle:"Legenda",subtitle_tap_action:"Ação de toque na legenda",title:"Título",title_tap_action:"Ação de toque no título"},update:{show_buttons_control:"Botões de controle?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar chip",chips:"Chips",clear:"Limpar",edit:"Editar",select:"Selecionar chip",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Luz",menu:"Menu",quickbar:"Barra rápida",spacer:"Espaçador",template:"Template",weather:"Clima"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Editor de chip"}},form:{alignment_picker:{values:{center:"Centro",default:"Alinhamento padrão",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo padrão","entity-picture":"Imagem da entidade",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informação padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}}}}}),Nl=/* @__PURE__ */$t({card:()=>hs,default:()=>ps,editor:()=>ds}),Ol=kt(()=>{ps={card:hs={not_found:"Entidade não encontrada"},editor:ds={card:{chips:{alignment:"Alinhamento"},climate:{hvac_modes:"Modos HVAC",show_temperature_control:"Controlo de temperatura?"},cover:{show_buttons_control:"Botões de controlo?",show_position_control:"Controlo de posição?",show_tilt_position_control:"Controlo de inclinação?"},fan:{show_oscillate_control:"Controlo de oscilação?",show_percentage_control:"Controlo de percentagem?"},generic:{collapsible_controls:"Colapsar controlos quando desligado",color:"Cor",content_info:"Conteúdo",fill_container:"Preencher contentor",icon_animation:"Animar ícone quando ativo?",icon_color:"Cor do ícone",icon_type:"Tipo de ícone",layout:"Layout",primary_info:"Informação principal",secondary_info:"Informação secundária",use_entity_picture:"Usar imagem da entidade?"},humidifier:{show_target_humidity_control:"Controlo de humidade?"},light:{incompatible_controls:"Alguns controlos podem não ser exibidos se a luz não suportar a funcionalidade.",show_brightness_control:"Controlo de brilho?",show_color_control:"Controlo de cor?",show_color_temp_control:"Controlo de temperatura da cor?",use_light_color:"Usar cor da luz"},lock:{lock:"Trancar",open:"Aberto",unlock:"Destrancar"},"media-player":{media_controls:"Controlos de media",media_controls_list:{next:"Próxima faixa",on_off:"Ligar/Desligar",play_pause_stop:"Tocar/pausa/stop",previous:"Faixa anterior",repeat:"Modo repetir",shuffle:"Baralhar"},show_volume_level:"Mostrar nível do volume",use_media_artwork:"Usar arte do media",use_media_info:"Usar informação do media",volume_controls:"Controlos de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_mute:"Calar",volume_set:"Nível do volume"}},number:{display_mode:"Modo de exibição",display_mode_list:{buttons:"Botões",default:"Por defeito (slider)",slider:"Deslizador"}},template:{badge_color:"Cor do crachá",badge_icon:"Icóne do crachá",content:"Conteúdo",entity_extra:"Usado em modelos e ações",label:"Rótulo",multiline_secondary:"Secundária multilinha?",picture:"Imagem (irá substituir o ícone)",primary:"Informação principal",secondary:"Informação secundária"},title:{subtitle:"Subtítulo",subtitle_tap_action:"Ação ao tocar no subtítulo",title:"Título",title_tap_action:"Ação ao tocar no título"},update:{show_buttons_control:"Botões de controlo?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Adicionar ficha",chips:"Fichas",clear:"Limpar",edit:"Editar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",spacer:"Espaçador",template:"Modelo",weather:"Clima"}},conditional:{chip:"Ficha"},sub_element_editor:{title:"Editor de fichas"}},form:{alignment_picker:{values:{center:"Centrado",default:"Alinhamento predefinido",end:"Fim",justify:"Justificado",start:"Início"}},color_picker:{values:{default:"Cor padrão"}},icon_type_picker:{values:{default:"Tipo predefinido","entity-picture":"Entidade de imagem",icon:"Ícone",none:"Nenhum"}},info_picker:{values:{default:"Informações padrão","last-changed":"Última alteração","last-updated":"Última atualização",name:"Nome",none:"Nenhum",state:"Estado"}},layout_picker:{values:{default:"Layout padrão",horizontal:"Layout horizontal",vertical:"Layout vertical"}}}}}}),Bl=/* @__PURE__ */$t({default:()=>fs,editor:()=>ms}),Ll=kt(()=>{fs={editor:ms={card:{chips:{alignment:"Aliniere"},climate:{hvac_modes:"Moduri HVAC",show_temperature_control:"Comenzi temperatură?"},cover:{show_buttons_control:"Comenzi pentru control?",show_position_control:"Comandă pentru poziție?",show_tilt_position_control:"Comandă pentru înclinare?"},fan:{icon_animation:"Animare pictograma la activare?",show_oscillate_control:"Comandă oscilație?",show_percentage_control:"Comandă procent?"},generic:{collapsible_controls:"Restrângere la dezactivare",content_info:"Conținut",fill_container:"Umplere container",icon_color:"Culoare pictogramă",icon_type:"Tip pictogramă",layout:"Aranjare",primary_info:"Informație principală",secondary_info:"Informație secundară",use_entity_picture:"Imagine?"},humidifier:{show_target_humidity_control:"Comenzi umiditate?"},light:{incompatible_controls:"Unele comenzi ar putea să nu fie afișate dacă lumina nu suportă această caracteristică.",show_brightness_control:"Comandă pentru strălucire?",show_color_control:"Comandă pentru culoare?",show_color_temp_control:"Comandă pentru temperatură de culoare?",use_light_color:"Folosește culoarea luminii"},lock:{lock:"Încuie",open:"Deschide",unlock:"Descuie"},"media-player":{media_controls:"Comenzi media",media_controls_list:{next:"Pista următoare",on_off:"Pornit/Oprit",play_pause_stop:"Redare/Pauză/Stop",previous:"Pista anterioară",repeat:"Mod repetare",shuffle:"Amestecare"},show_volume_level:"Nivel volum",use_media_artwork:"Grafică media",use_media_info:"Informații media",volume_controls:"Comenzi volum",volume_controls_list:{volume_buttons:"Comenzi volum",volume_mute:"Dezactivare sunet",volume_set:"Nivel volum"}},template:{badge_color:"Culoare insignă",badge_icon:"Pictogramă insignă",content:"Conținut",entity_extra:"Folosită în șabloane și acțiuni",multiline_secondary:"Informație secundară pe mai multe linii?",picture:"Imagine (inlocuiește pictograma)",primary:"Informație principală",secondary:"Informație secundară"},title:{subtitle:"Subtitlu",title:"Titlu"},update:{show_buttons_control:"Comenzi control?"},vacuum:{commands:"Comenzi"},weather:{show_conditions:"Condiții?",show_temperature:"Temperatură?"}},chip:{"chip-picker":{add:"Adaugă jeton",chips:"Jetoane",clear:"Șterge",edit:"Modifică",select:"Alege jeton",types:{action:"Acțiune","alarm-control-panel":"Alarmă",back:"Înapoi",conditional:"Condițional",entity:"Entitate",light:"Lumină",menu:"Meniu",template:"Șablon",weather:"Vreme"}},conditional:{chip:"Jeton"},sub_element_editor:{title:"Editor jeton"}},form:{alignment_picker:{values:{center:"Centrat",default:"Aliniere implicită",end:"Dreapta",justify:"Umplere",start:"Stânga"}},color_picker:{values:{default:"Culoare implicită"}},icon_type_picker:{values:{default:"Tip implicit","entity-picture":"Imagine",icon:"Pictogramă",none:"Niciuna"}},info_picker:{values:{default:"Informație implicită","last-changed":"Ultima modificare","last-updated":"Ultima actulizare",name:"Nume",none:"Niciuna",state:"Stare"}},layout_picker:{values:{default:"Aranjare implicită",horizontal:"Orizontală",vertical:"Verticală"}}}}}}),Dl=/* @__PURE__ */$t({card:()=>gs,default:()=>vs,editor:()=>_s}),jl=kt(()=>{vs={card:gs={not_found:"Сущность не найдена"},editor:_s={card:{chips:{alignment:"Выравнивание"},climate:{hvac_modes:"Режимы работы",show_temperature_control:"Управлять целевой температурой?"},cover:{show_buttons_control:"Добавить кнопки управления?",show_position_control:"Управлять позицией?",show_tilt_position_control:"Управлять наклоном?"},empty:{no_config_options:"Эта карточка не имеет опций конфигурации."},fan:{icon_animation:"Анимировать иконку когда включено?",show_direction_control:"Направление?",show_oscillate_control:"Oscillate control?",show_percentage_control:"Управлять процентами?"},generic:{collapsible_controls:"Сворачивать элементы управления при выключении",color:"Цвет",content_info:"Содержимое",fill_container:"Заполнение",icon_animation:"Анимировать иконку, когда активна?",icon_color:"Цвет иконки",icon_type:"Тип иконки",layout:"Расположение",primary_info:"Основная информация",secondary_info:"Второстепенная информация",use_entity_picture:"Использовать изображение объекта?"},humidifier:{show_target_humidity_control:"Управлять целевым уровенем влажности?"},light:{incompatible_controls:"Некоторые элементы управления могут не отображаться, если ваш светильник не поддерживает эти функции.",show_brightness_control:"Управлять яркостью?",show_color_control:"Управлять цветом?",show_color_temp_control:"Управлять цветовой температурой?",use_light_color:"Использовать текущий цвет света"},lock:{lock:"Закрыто",open:"Открыто",unlock:"Разблокировано"},"media-player":{media_controls:"Управление медиа-устройством",media_controls_list:{next:"Следующий трек",on_off:"Включение/выключение",play_pause_stop:"Воспроизведение/пауза/остановка",previous:"Предыдущий трек",repeat:"Режим повтора",shuffle:"Перемешивание"},show_volume_level:"Показать уровень громкости",use_media_artwork:"Использовать обложку с медиа-устройства",use_media_info:"Использовать информацию с медиа-устройства",volume_controls:"Регулятор громкости",volume_controls_list:{volume_buttons:"Кнопки громкости",volume_mute:"Без звука",volume_set:"Уровень громкости"}},number:{display_mode:"Режим отображения",display_mode_list:{buttons:"Кнопки",default:"Стандартно (слайдер)",slider:"Слайдер"}},template:{badge_color:"Цвет значка",badge_icon:"Иконка значка",content:"Содержимое",entity_extra:"Используется в шаблонах и действиях",label:"Ярлык",multiline_secondary:"Многострочная Второстепенная информация?",picture:"Изображение (заменить иконку)",primary:"Основная информация",secondary:"Второстепенная информация"},title:{subtitle:"Подзаголовок",subtitle_tap_action:"Действие при нажатии на подзаголовок",title:"Заголовок",title_tap_action:"Действие при нажатии на заголовок"},update:{show_buttons_control:"Кнопки управления?"},vacuum:{commands:"Команды",commands_list:{on_off:"Включить/выключить"}},weather:{show_conditions:"Условия?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Добавить мини-карточку",chips:"Мини-карточки",clear:"Очистить",edit:"Изменить",select:"Выбрать мини-карточку",types:{action:"Действие","alarm-control-panel":"Тревога",back:"Назад",conditional:"Условия",entity:"Объект",light:"Освещение",menu:"Меню",quickbar:"Панель быстрого доступа",spacer:"Пробел",template:"Шаблон",weather:"Погода"}},conditional:{chip:"Мини-карточка"},sub_element_editor:{title:"Редактор мини-карточек"}},form:{alignment_picker:{values:{center:"По центру",default:"Выравнивание по умолчанию",end:"К концу",justify:"На всю ширину",start:"К началу"}},color_picker:{values:{default:"Цвет по умолчанию"}},icon_type_picker:{values:{default:"По умолчанию","entity-picture":"Изображение",icon:"Иконка",none:"Нет"}},info_picker:{values:{default:"По умолчанию","last-changed":"Последнее изменение","last-updated":"Последнее обновление",name:"Имя",none:"Нет",state:"Статус"}},layout_picker:{values:{default:"Расположение по умолчанию",horizontal:"Горизонтальное расположение",vertical:"Вертикальное расположение"}}}}}}),Hl=/* @__PURE__ */$t({card:()=>bs,default:()=>ks,editor:()=>ys,migration:()=>ws}),Rl=kt(()=>{ks={card:bs={not_found:"Entita nenájdená"},editor:ys={badge:{template:{area_helper:"Používa sa v šablónach",content:"Obsah",entity_helper:"Používa sa v šablónach a interakciách",label:"Nápis"}},card:{chips:{alignment:"Zarovnanie"},climate:{hvac_modes:"HVAC mód",show_temperature_control:"Ovládanie teploty?"},cover:{show_buttons_control:"Zobraziť ovládacie tlačidlá?",show_position_control:"Ovládanie pozície?",show_tilt_position_control:"Ovládanie natočenia?"},empty:{no_config_options:"Táto karta nemá žiadne možnosti konfigurácie."},fan:{show_direction_control:"Ovládanie smeru?",show_oscillate_control:"Ovládanie oscilácie?",show_percentage_control:"Ovládanie rýchlosti v percentách?"},generic:{area:"Oblasť",collapsible_controls:"Skryť ovládanie v stave VYP",color:"Farba",content_info:"Obsah",entity:"Entita",fill_container:"Vyplniť priestor",icon_animation:"Animovaná ikona v stave ZAP?",icon_color:"Farba ikony",icon_type:"Typ ikony",layout:"Rozloženie",picture:"Obrázok",picture_helper:"Ak je nastavené, nahradí ikonu.",primary_info:"Základné info",secondary_info:"Doplnkové info",use_entity_picture:"Použiť obrázok entity?"},humidifier:{show_target_humidity_control:"Ovládanie vlhkosti?"},light:{incompatible_controls:"Niektoré ovládacie prvky sa nemusia zobraziť, pokiaľ ich svetlo nepodporuje.",show_brightness_control:"Ovládanie jasu?",show_color_control:"Ovládanie farby?",show_color_temp_control:"Ovládanie teploty farby?",use_light_color:"Použiť farbu svetla"},lock:{lock:"Zamknuté",open:"Otvorené",unlock:"Odomknuté"},"media-player":{media_controls:"Ovládanie média",media_controls_list:{next:"Ďalšia",on_off:"Zap / Vyp",play_pause_stop:"Spustiť/pauza/stop",previous:"Predchádzajúca",repeat:"Opakovať",shuffle:"Premiešať"},show_volume_level:"Zobraziť úroveň hlasitosti",use_media_artwork:"Použiť obrázok z média",use_media_info:"Použiť info o médiu",volume_controls:"Ovládanie hlasitosti",volume_controls_list:{volume_buttons:"Tlačidlá hlasitosti",volume_mute:"Stlmiť",volume_set:"Úroveň hlasitosti"}},number:{display_mode:"Režim zobrazenia",display_mode_list:{buttons:"Tlačidlá",default:"Predvolené (posúvač)",slider:"Posúvač"}},template:{area:"Oblasť",area_helper:"Používa sa v šablónach a funkciách",badge:"Odznak",badge_color:"Farba odznaku",badge_icon:"Ikona odznaku",badge_text:"Text odznaku",badge_text_helper:"Ak je nastavené, nahradí ikonu.",content:"Obsah",entity_extra:"Použitá v šablónach a akciách",entity_helper:"Používa sa v šablónach, interakciách a funkciách",entity_helper_legacy:"Používa sa v šablónach a interakciách",label:"Štítok",layout:"Rozloženie",multiline_secondary:"Povoliť viacriadkové doplnkové informácie",multiline_secondary_helper:"Karta môže byť vyššia, aby sa do nej vošiel text, a nemusí byť vždy zarovnaná s mriežkovým systémom.",picture:"Obrázok (nahrádza ikonu)",primary:"Základné info",secondary:"Doplnkové info"},title:{subtitle:"Podnadpis",subtitle_tap_action:"Akcia klepnutia na titulky",title:"Nadpis",title_tap_action:"Akcia klepnutia na názov"},update:{show_buttons_control:"Zobraziť ovládacie tlačidlá?"},vacuum:{commands:"Príkazy",commands_list:{on_off:"Zapnúť/Vypnúť"}},weather:{show_conditions:"Zobraziť podmienky?",show_temperature:"Zobraziť teplotu?"}},chip:{"chip-picker":{add:"Pridať štítok",chips:"Štítky",clear:"Vymazať",edit:"Editovať",select:"Vybrať štítok",types:{action:"Akcia","alarm-control-panel":"Alarm",back:"Späť",conditional:"Podmienené",entity:"Entita",light:"Svetlo",menu:"Menu",quickbar:"Rýchla lišta",spacer:"Medzera",template:"Šablóna",weather:"Počasie"}},conditional:{chip:"Čip"},sub_element_editor:{title:"Editor štítkov"}},form:{alignment_picker:{values:{center:"Stred",default:"Predvolené zarovnanie",end:"Koniec",justify:"Vyplniť",start:"Začiatok"}},color_picker:{values:{default:"Predvolená farba"}},icon_type_picker:{values:{default:"Predvolený typ","entity-picture":"Obrázok entity",icon:"Ikona",none:"Žiadny"}},info_picker:{values:{default:"Predvolené informácie","last-changed":"Posledná zmena","last-updated":"Posledná aktualizácia",name:"Názov",none:"Žiadna",state:"Stav"}},layout_picker:{values:{default:"Predvolené rozloženie",horizontal:"Vodorovné rozloženie",vertical:"Zvislé rozloženie"}}},section:{badge:"Odznak",content:"Obsah",context:"Kontext",features:"Funkcie",interactions:"Interakcie",layout:"Rozloženie"}},migration:ws={description:"Nastavenie vašej karty bolo prenesené do novej verzie. Viac informácií o zmenách nájdete na {link}.",ok:"Ok",post:"príspevku na GitHub",revert:"Vrátiť späť",title:"Karta aktualizovaná"}}}),Ul=/* @__PURE__ */$t({card:()=>Cs,default:()=>Es,editor:()=>$s}),Vl=kt(()=>{Es={card:Cs={not_found:"Entiteta ni najdena"},editor:$s={card:{chips:{alignment:"Poravnava"},climate:{hvac_modes:"HVAC načini",show_temperature_control:"Nadzor temperature?"},cover:{show_buttons_control:"Gumbi za upravljanje?",show_position_control:"Nadzor položaja?",show_tilt_position_control:"Nadzor nagiba?"},fan:{show_oscillate_control:"Kontrola nihanja?",show_percentage_control:"Kontrola v odstotkih?"},generic:{collapsible_controls:"Strni kontrolnike, ko so izklopljeni",content_info:"Vsebina",fill_container:"Zapolnitev prostora",icon_animation:"Animacija ikone, ko je aktivna?",icon_color:"Barva ikone",icon_type:"Vrsta ikone",layout:"Postavitev",primary_info:"Primarna informacija",secondary_info:"Sekundarna informacija",use_entity_picture:"Uporabi sliko entitete?"},humidifier:{show_target_humidity_control:"Nadzor vlažnosti?"},light:{incompatible_controls:"Nekateri kontrolniki morda ne bodo prikazani, če vaša luč ne podpira te funkcije.",show_brightness_control:"Nadzor svetlosti?",show_color_control:"Nadzor barv?",show_color_temp_control:"Nadzor temperature barve?",use_light_color:"Uporabi svetlo barvo"},lock:{lock:"Zaklepanje",open:"Odprto",unlock:"Odkleni"},"media-player":{media_controls:"Nadzor medijev",media_controls_list:{next:"Naslednja skladba",on_off:"Vklop/izklop",play_pause_stop:"Predvajaj/pavza/ustavi",previous:"Prejšnja skladba",repeat:"Ponavljajoči način",shuffle:"Naključno"},show_volume_level:"Pokaži raven glasnosti",use_media_artwork:"Uporabite medijsko umetniško delo",use_media_info:"Uporabite informacije o medijih",volume_controls:"Kontrole glasnosti",volume_controls_list:{volume_buttons:"Gumbi za glasnost",volume_mute:"Tiho",volume_set:"Raven glasnosti"}},number:{display_mode:"Način prikaza",display_mode_list:{buttons:"Gumbi",default:"Privzeto (drsnik)",slider:"Drsnik"}},template:{badge_color:"Barva značke",badge_icon:"Ikona značke",content:"Vsebina",entity_extra:"Uporablja se v predlogah in dejanjih",multiline_secondary:"Večvrstični sekundarni?",picture:"Slika (nadomestila bo ikono)",primary:"Primarna informacija",secondary:"Sekundarna informacija"},title:{subtitle:"Podnaslov",subtitle_tap_action:"Dejanje dotika podnapisov",title:"Naziv",title_tap_action:"Dejanje dotika naslova"},update:{show_buttons_control:"Gumbi za upravljanje?"},vacuum:{commands:"Ukazi",commands_list:{on_off:"Vklop/izklop"}},weather:{show_conditions:"Pogoji?",show_temperature:"Temperatura?"}},chip:{"chip-picker":{add:"Dodaj čip",chips:"Čipi",clear:"Pobriši",edit:"Uredi",select:"Izbira čipa",types:{action:"Dejanje","alarm-control-panel":"Alarm",back:"Nazaj",conditional:"Pogojno",entity:"Entiteta",light:"Svetloba",menu:"Meni",spacer:"Distančnik",template:"Predloga",weather:"Vreme"}},conditional:{chip:"Ćiš"},sub_element_editor:{title:"Urejevalnik čipov"}},form:{alignment_picker:{values:{center:"Center",default:"Privzeta poravnava",end:"Konec",justify:"Poravnava",start:"Pričetek"}},color_picker:{values:{default:"Privzeta barva"}},icon_type_picker:{values:{default:"Privzeta vrsta","entity-picture":"Slika entitete",icon:"Ikona",none:"Brez"}},info_picker:{values:{default:"Privzete informacije","last-changed":"Zadnja sprememba","last-updated":"Zadnja posodobitev",name:"Naziv",none:"Brez",state:"Stanje"}},layout_picker:{values:{default:"Privzeta postavitev",horizontal:"Horizontalna postavitev",vertical:"Vertikalna postavitev"}}}}}}),Fl=/* @__PURE__ */$t({card:()=>xs,default:()=>Ss,editor:()=>As}),Gl=kt(()=>{Ss={card:xs={not_found:"Enheten hittades inte"},editor:As={card:{chips:{alignment:"Justering"},climate:{hvac_modes:"HVAC-lägen",show_temperature_control:"Temperaturkontroll?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?",show_tilt_position_control:"Visa lutningskontroll?"},empty:{no_config_options:"Detta kort har inga konfigurationsalternativ."},fan:{show_direction_control:"Riktningskontroll?",show_oscillate_control:"Kontroll för oscillera?",show_percentage_control:"Procentuell kontroll?"},generic:{collapsible_controls:"Dölj kontroller när enheten är av",color:"Färg",content_info:"Innehåll",fill_container:"Fyll container",icon_animation:"Animera ikonen när enheten är på?",icon_color:"Ikonens färg",icon_type:"Ikontyp",layout:"Layout",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enhetens bild?"},humidifier:{show_target_humidity_control:"Fuktkontroll?"},light:{incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas.",show_brightness_control:"Styr ljushet?",show_color_control:"Styr färg?",show_color_temp_control:"Färgtemperaturkontroll?",use_light_color:"Styr ljusets färg"},lock:{lock:"Lås",open:"Öppna",unlock:"Lås upp"},"media-player":{media_controls:"Mediakontroller",media_controls_list:{next:"Nästa spår",on_off:"Slå på/av",play_pause_stop:"Spela/pausa/stoppa",previous:"Föregående spår",repeat:"Upprepa",shuffle:"Blanda"},show_volume_level:"Volymkontroll",use_media_artwork:"Visa mediaomslag",use_media_info:"Använd media information",volume_controls:"Volymkontroller",volume_controls_list:{volume_buttons:"Volymknappar",volume_mute:"Ljud av",volume_set:"Volymnivå"}},number:{display_mode:"Visningsläge",display_mode_list:{buttons:"Knappar",default:"Standard (skjutreglage)",slider:"Skjutreglage"}},template:{badge_color:"Färg på märke",badge_icon:"Märke ikon",content:"Innehåll",entity_extra:"Används i mallar och åtgärder",label:"Etikett",multiline_secondary:"Sekundär med flera rader?",picture:"Bild (ersätter ikonen)",primary:"Primär information",secondary:"Sekundär information"},title:{subtitle:"Underrubrik",subtitle_tap_action:"Subtitle tap action",title:"Rubrik",title_tap_action:"Titel tryck åtgärd"},update:{show_buttons_control:"Visa kontrollknappar?"},vacuum:{commands:"Kommandon",commands_list:{on_off:"Slå av/på"}},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"}},chip:{"chip-picker":{add:"Lägg till chip",chips:"Chips",clear:"Rensa",edit:"Redigera",select:"Välj chip",types:{action:"Åtgärd","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",quickbar:"Snabbfält",spacer:"Avståndshållare",template:"Mall",weather:"Väder"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chipredigerare"}},form:{alignment_picker:{values:{center:"Centrerad",default:"Standard (början)",end:"Slutet",justify:"Anpassa",start:"Starta"}},color_picker:{values:{default:"Standardfärg"}},icon_type_picker:{values:{default:"Standard typ","entity-picture":"Enhetsbild",icon:"Ikon",none:"Ingen"}},info_picker:{values:{default:"Förvald information","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",name:"Namn",none:"Ingen",state:"Status"}},layout_picker:{values:{default:"Standard",horizontal:"Horisontell",vertical:"Vertikal"}}}}}}),Kl=/* @__PURE__ */$t({card:()=>Ts,default:()=>Is,editor:()=>Ms}),Yl=kt(()=>{Is={card:Ts={not_found:"Varlık bulunamadı"},editor:Ms={card:{chips:{alignment:"Hizalama"},climate:{hvac_modes:"HVAC Modları",show_temperature_control:"Sıcaklık kontrolü?"},cover:{show_buttons_control:"Düğme kontrolleri?",show_position_control:"Pozisyon kontrolü?",show_tilt_position_control:"Eğim kontrolü?"},empty:{no_config_options:"Bu kartın yapılandırma seçeneği yok."},fan:{show_direction_control:"Yön kontrolü?",show_oscillate_control:"Salınım kontrolü?",show_percentage_control:"Yüzde kontrolü?"},generic:{collapsible_controls:"Kapalıyken kontrolleri daralt",color:"Renk",content_info:"İçerik",fill_container:"Alanı doldur",icon_animation:"Aktif olduğunda simgeyi hareket ettir?",icon_color:"Simge renki",icon_type:"İkon tipi",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",use_entity_picture:"Varlık resmi kullanılsın?"},humidifier:{show_target_humidity_control:"Nem kontrolü?"},light:{incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir.",show_brightness_control:"Parlaklık kontrolü?",show_color_control:"Renk kontrolü?",show_color_temp_control:"Renk ısısı kontrolü?",use_light_color:"Işık rengini kullan"},lock:{lock:"Kilitle",open:"Aç",unlock:"Kilidi aç"},"media-player":{media_controls:"Medya kontrolleri",media_controls_list:{next:"Sonraki parça",on_off:"Aç/Kapat",play_pause_stop:"Oynat/duraklat/durdur",previous:"Önceki parça",repeat:"Tekrarlama modu",shuffle:"Karışık çal"},show_volume_level:"Ses seviyesini göster",use_media_artwork:"Medya resimlerini kullan",use_media_info:"Medya bilgilerini kullan",volume_controls:"Ses seviyesi kontrolleri",volume_controls_list:{volume_buttons:"Ses butonları",volume_mute:"Sessize al",volume_set:"Ses seviyesi"}},number:{display_mode:"Görüntüleme Modu",display_mode_list:{buttons:"Butonlar",default:"Varsayılan (kayan)",slider:"Kayan"}},template:{badge_color:"Rozet rengi",badge_icon:"Rozet simgesi",content:"İçerik",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",label:"Etiket",multiline_secondary:"İkinci bilgi çok satır olsun?",picture:"Resim (ikonun yerine geçecek)",primary:"Birinci bilgi",secondary:"İkinci bilgi"},title:{subtitle:"Altbaşlık",subtitle_tap_action:"Dokunma eylemi alt başlığı",title:"Başlık",title_tap_action:"Dokunma eylemi başlığı"},update:{show_buttons_control:"Düğme kontrolü?"},vacuum:{commands:"Komutlar",commands_list:{on_off:"Aç/Kapat"}},weather:{show_conditions:"Hava koşulu?",show_temperature:"Sıcaklık?"}},chip:{"chip-picker":{add:"Chip ekle",chips:"Chipler",clear:"Temizle",edit:"Düzenle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",spacer:"Boşluk",template:"Şablon",weather:"Hava Durumu"}},conditional:{chip:"Chip"},sub_element_editor:{title:"Chip düzenleyici"}},form:{alignment_picker:{values:{center:"Ortala",default:"Varsayılan hizalama",end:"Sağa yasla",justify:"İki yana yasla",start:"Sola yasla"}},color_picker:{values:{default:"Varsayılan renk"}},icon_type_picker:{values:{default:"Varsayılan tip","entity-picture":"Varlık resmi",icon:"Simge",none:"Hiçbiri"}},info_picker:{values:{default:"Varsayılan bilgi","last-changed":"Son Değişim","last-updated":"Son Güncelleme",name:"İsim",none:"None",state:"Durum"}},layout_picker:{values:{default:"Varsayılan düzen",horizontal:"Yatay düzen",vertical:"Dikey düzen"}}}}}}),ql=/* @__PURE__ */$t({card:()=>zs,default:()=>Ns,editor:()=>Ps}),Wl=kt(()=>{Ns={card:zs={not_found:"Сутність не знайдено"},editor:Ps={card:{chips:{alignment:"Вирівнювання"},climate:{hvac_modes:"Режими",show_temperature_control:"Керування температурою?"},cover:{show_buttons_control:"Кнопки керування?",show_position_control:"Керування позицією?",show_tilt_position_control:"Керування нахилом?"},fan:{show_oscillate_control:"Керування повротом?",show_percentage_control:"Керування швидкістю?"},generic:{collapsible_controls:"Приховувати елементи керування коли вимкнено?",content_info:"Вміст",fill_container:"Заповнити контейнер",icon_animation:"Анімувати іконку при активації?",icon_color:"Колір іконки",icon_type:"Тип іконки",layout:"Розташування",primary_info:"Головна інформація",secondary_info:"Додаткова інформація",use_entity_picture:"Використовувати зображення сутності?"},humidifier:{show_target_humidity_control:"Керування вологістю?"},light:{incompatible_controls:"Деякі елементи керування можуть не відображатись якщо ваш пристрій не підтримує цю функцію.",show_brightness_control:"Контроль яскравості?",show_color_control:"Керування кольором світла?",show_color_temp_control:"Керування температурою світла?",use_light_color:"Використовувати колір світла"},lock:{lock:"Зачинити",open:"Відкрити",unlock:"Відчинити"},"media-player":{media_controls:"Керування медіа",media_controls_list:{next:"Наступний трек",on_off:"Увімкнути/Вимкнути",play_pause_stop:"Відтворити/пауза/стоп",previous:"Попередній трек",repeat:"Режим повторення",shuffle:"Перемішати"},show_volume_level:"Показати рівень гучності",use_media_artwork:"Використовувати зображення медіа",use_media_info:"Використовувати інформацію медіа",volume_controls:"Елементи керування гучністю",volume_controls_list:{volume_buttons:"Кнопки гучності",volume_mute:"Вимк. звук",volume_set:"Рівень гучності"}},number:{display_mode:"Відображати режим",display_mode_list:{buttons:"Кнопки",default:"За замовчуванням (повзунок)",slider:"Повзунок"}},template:{badge_color:"Колір значка",badge_icon:"Іконка значка",content:"Вміст",entity_extra:"Використовується в шаблонах та діях",multiline_secondary:"Багаторядкова додаткова інформація?",picture:"Зображення (замінить іконку)",primary:"Головна інформація",secondary:"Додаткова інформація"},title:{subtitle:"Підзаголовок",subtitle_tap_action:"Дія при дотику до підзаголовку",title:"Заголовок",title_tap_action:"Дія при дотику до заголовку"},update:{show_buttons_control:"Кнопки керування?"},vacuum:{commands:"Команди",commands_list:{on_off:"Увімкнути/Вимкнути"}},weather:{show_conditions:"Умови?",show_temperature:"Температура?"}},chip:{"chip-picker":{add:"Додати міні-картку",chips:"Міні-картки",clear:"Очистити",edit:"Редагувати",select:"Обрати міні-картку",types:{action:"Дія","alarm-control-panel":"Сигналізація",back:"Назад",conditional:"Умовна",entity:"Сутність",light:"Світло",menu:"Меню",spacer:"Порожнє місце",template:"Вручну",weather:"Погода"}},conditional:{chip:"Міні-картка"},sub_element_editor:{title:"Редактор міні-карток"}},form:{alignment_picker:{values:{center:"По центру",default:"Вирівнювання за замовчуванням",end:"В кінці",justify:"Вирівняти",start:"На початку"}},color_picker:{values:{default:"Колір за замовчуванням"}},icon_type_picker:{values:{default:"За замовчуванням","entity-picture":"Зображення сутності",icon:"Іконка",none:"Нічого"}},info_picker:{values:{default:"Інформація за замовчуванням","last-changed":"Востаннє змінено","last-updated":"Востаннє оновлено",name:"Назва",none:"Нічого",state:"Стан"}},layout_picker:{values:{default:"Розташування за замовчуванням",horizontal:"Горизонтальне розташування",vertical:"Вертикальне розташування"}}}}}}),Xl=/* @__PURE__ */$t({card:()=>Os,default:()=>Ds,editor:()=>Bs,migration:()=>Ls}),Zl=kt(()=>{Ds={card:Os={not_found:"Không tìm thấy thực thể"},editor:Bs={section:{context:"Ngữ cảnh",content:"Nội dung",features:"Tính năng",interactions:"Tương tác",layout:"Bố cục",badge:"Huy hiệu"},card:{chips:{alignment:"Căn chỉnh"},climate:{hvac_modes:"Chế độ điều hòa",show_temperature_control:"Điều khiển nhiệt độ?"},cover:{show_buttons_control:"Điều khiển nút bấm?",show_position_control:"Điều khiển vị trí?",show_tilt_position_control:"Điều khiển độ nghiêng?"},empty:{no_config_options:"Thẻ này không có tùy chọn cấu hình."},fan:{show_direction_control:"Điều khiển hướng?",show_oscillate_control:"Điều khiển xoay?",show_percentage_control:"Điều khiển phần trăm?"},generic:{entity:"Thực thể",area:"Khu vực",color:"Màu",content_info:"Nội dung",fill_container:"Làm đầy ô chứa",icon_animation:"Biểu tượng chuyển động khi kích hoạt?",icon_color:"Màu biểu tượng",icon_type:"Kiểu biểu tượng",layout:"Bố cục",primary_info:"Thông tin chính",secondary_info:"Thông tin phụ",use_entity_picture:"Dùng ảnh của thực thể?",collapsible_controls:"Thu nhỏ điều kiển khi tắt",picture:"Hình ảnh",picture_helper:"Nếu đặt, nó sẽ thay cho biểu tượng."},humidifier:{show_target_humidity_control:"Điều khiển độ ẩm?"},light:{incompatible_controls:"Một số điều khiển sẽ không được hiển thị nếu đèn của bạn không hỗ trợ tính năng đó.",show_brightness_control:"Điều khiển độ sáng?",show_color_control:"Điều khiển màu sắc?",show_color_temp_control:"Điều khiển nhiệt độ màu?",use_light_color:"Dùng màu đèn"},lock:{lock:"Khóa",open:"Mở",unlock:"Mở khóa"},"media-player":{media_controls:"Điều khiển đa phương tiện",media_controls_list:{next:"Bài tiếp theo",on_off:"Bật/tắt",play_pause_stop:"Phát/tạm dừng/dừng",previous:"Bài trước",repeat:"Chế độ lặp lại",shuffle:"Xáo trộn"},show_volume_level:"Hiện mức âm lượng",use_media_artwork:"Dùng ảnh đa phương tiện",use_media_info:"Dùng thông tin đa phương tiện",volume_controls:"Điều khiển âm lượng",volume_controls_list:{volume_buttons:"Nút âm lượng",volume_mute:"Im lặng",volume_set:"Mức âm lượng"}},number:{display_mode:"Chế độ hiển thị",display_mode_list:{buttons:"Nút",default:"Mặc định (thanh trượt)",slider:"Thanh trượt"}},template:{area_helper:"Dùng trong bản mẫu và tính năng",area:"Khu vực",badge_color:"Màu huy hiệu",badge_icon:"Biểu tượng huy hiệu",badge_text_helper:"Nếu đặt, nó sẽ thay thế biểu tượng.",badge_text:"Chữ trong huy hiệu",badge:"Huy hiệu",content:"Nội dung",entity_helper:"Dùng trong bản mẫu, tương tác và tính năng",entity_helper_legacy:"Dùng trong bản mẫu và tương tác",label:"Nhãn",layout:"Bố cục",multiline_secondary_helper:"Thẻ có thể được kéo cao lên để vừa với văn bản và không phải lúc nào cũng vừa vặn với hệ thống lưới.",multiline_secondary:"Cho phép nhiều dòng thông tin phụ",primary:"Thông tin chính",secondary:"Thông tin phụ"},title:{subtitle:"Phụ đề",subtitle_tap_action:"Hành động khi nhấp phụ đề",title:"Tiêu đề",title_tap_action:"Hành động khi nhấp tiêu đề"},update:{show_buttons_control:"Điều khiển nút bấm?"},vacuum:{commands:"Mệnh lệnh",commands_list:{on_off:"Bật/tắt"}},weather:{show_conditions:"Điều kiện?",show_temperature:"Nhiệt độ?"}},badge:{template:{label:"Nhãn",content:"Nội dung",entity_helper:"Dùng trong bản mẫu và tương tác",area_helper:"Dùng trong bản mẫu"}},chip:{"chip-picker":{add:"Thêm phỉnh",chips:"Phỉnh",clear:"Tẩy trống",edit:"Chỉnh sửa",select:"Chọn phỉnh",types:{action:"Hành động","alarm-control-panel":"Báo động",back:"Quay về",conditional:"Điều kiện",entity:"Thực thể",light:"Đèn",menu:"Trình đơn",quickbar:"Thanh nhanh",spacer:"Ngăn cách",template:"Mẫu",weather:"Thời tiết"}},conditional:{chip:"Phỉnh"},sub_element_editor:{title:"Trình soạn phỉnh"}},form:{alignment_picker:{values:{center:"Căn giữa",default:"Căn chỉnh mặc định",end:"Căn cuối",justify:"Căn hai bên",start:"Căn đầu"}},color_picker:{values:{default:"Màu mặc định"}},icon_type_picker:{values:{default:"Kiểu mặc định","entity-picture":"Ảnh thực thể",icon:"Biểu tượng",none:"Không có"}},info_picker:{values:{default:"Thông tin mặc định","last-changed":"Lần thay đổi cuối","last-updated":"Lần cập nhật cuối",name:"Tên",none:"Không có",state:"Trạng thái"}},layout_picker:{values:{default:"Bố cục mặc định",horizontal:"Bố cục ngang",vertical:"Bố cục dọc"}}}},migration:Ls={title:"Thẻ đã cập nhật",description:"Cấu hình thẻ của bạn đã được nhập thành phiên bản mới. Bạn có thể tìm thêm thông tin về thay đổi tại {link}.",post:"bài trên GitHub",revert:"Đảo ngược",ok:"Ok"}}}),Jl=/* @__PURE__ */$t({card:()=>js,default:()=>Rs,editor:()=>Hs}),Ql=kt(()=>{Rs={card:js={not_found:"未找到实体"},editor:Hs={card:{chips:{alignment:"对齐"},climate:{hvac_modes:"空调模式",show_temperature_control:"温度控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},empty:{no_config_options:"这个卡片没有可配置的选项。"},fan:{show_direction_control:"方向控制?",show_oscillate_control:"摆动控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"关闭时隐藏控制器",color:"颜色",content_info:"内容",fill_container:"填满容器",icon_animation:"激活时使用动态图标?",icon_color:"图标颜色",icon_type:"图标类型",layout:"布局",primary_info:"首要信息",secondary_info:"次要信息",use_entity_picture:"使用实体图片?"},humidifier:{show_target_humidity_control:"湿度控制?"},light:{incompatible_controls:"设备不支持的控制器将不会显示。",show_brightness_control:"亮度控制?",show_color_control:"颜色控制?",show_color_temp_control:"色温控制?",use_light_color:"使用灯光颜色"},lock:{lock:"锁定",open:"打开",unlock:"解锁"},"media-player":{media_controls:"媒体控制",media_controls_list:{next:"下一曲",on_off:"开启/关闭",play_pause_stop:"播放/暂停/停止",previous:"上一曲",repeat:"循环模式",shuffle:"随机"},show_volume_level:"显示音量大小",use_media_artwork:"使用媒体插图",use_media_info:"使用媒体信息",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按钮",volume_mute:"静音",volume_set:"音量等级"}},number:{display_mode:"显示模式",display_mode_list:{buttons:"按钮",default:"默认 (滑块)",slider:"滑块"}},template:{badge_color:"徽标颜色",badge_icon:"徽标图标",content:"内容",entity_extra:"用于模板和动作",label:"标签",multiline_secondary:"多行次要信息?",picture:"图片 (将会替代图标)",primary:"首要信息",secondary:"次要信息"},title:{subtitle:"子标题",subtitle_tap_action:"子标题点击动作",title:"标题",title_tap_action:"标题点击动作"},update:{show_buttons_control:"控制按钮?"},vacuum:{commands:"命令",commands_list:{on_off:"开/关"}},weather:{show_conditions:"条件?",show_temperature:"温度?"}},chip:{"chip-picker":{add:"添加 chip",chips:"小卡片",clear:"清除",edit:"编辑",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",quickbar:"快捷栏",spacer:"占位符",template:"模板",weather:"天气"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"Chip 编辑"}},form:{alignment_picker:{values:{center:"居中对齐",default:"默认",end:"右对齐",justify:"两端对齐",start:"左对齐"}},color_picker:{values:{default:"默认颜色"}},icon_type_picker:{values:{default:"默认类型","entity-picture":"实体图片",icon:"图标",none:"无"}},info_picker:{values:{default:"默认信息","last-changed":"变更时间","last-updated":"更新时间",name:"名称",none:"无",state:"状态"}},layout_picker:{values:{default:"默认布局",horizontal:"水平布局",vertical:"垂直布局"}}}}}}),tc=/* @__PURE__ */$t({card:()=>Us,default:()=>Fs,editor:()=>Vs}),ec=kt(()=>{Fs={card:Us={not_found:"未找到實體"},editor:Vs={card:{chips:{alignment:"對齊"},climate:{hvac_modes:"空調模式",show_temperature_control:"溫度控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},fan:{show_oscillate_control:"擺頭控制?",show_percentage_control:"百分比控制?"},generic:{collapsible_controls:"關閉時隱藏控制項",color:"顏色",content_info:"內容",fill_container:"填滿容器",icon_animation:"啟動時使用動態圖示?",icon_color:"圖示顏色",icon_type:"圖示樣式",layout:"佈局",primary_info:"主要訊息",secondary_info:"次要訊息",use_entity_picture:"使用實體圖片?"},humidifier:{show_target_humidity_control:"溼度控制?"},light:{incompatible_controls:"不會顯示裝置不支援的控制。",show_brightness_control:"亮度控制?",show_color_control:"色彩控制?",show_color_temp_control:"色溫控制?",use_light_color:"使用燈光顏色"},lock:{lock:"上鎖",open:"打開",unlock:"解鎖"},"media-player":{media_controls:"媒體控制",media_controls_list:{next:"下一首",on_off:"開啟、關閉",play_pause_stop:"播放、暫停、停止",previous:"上一首",repeat:"重複播放",shuffle:"隨機播放"},show_volume_level:"顯示音量大小",use_media_artwork:"使用媒體插圖",use_media_info:"使用媒體資訊",volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_mute:"靜音",volume_set:"音量等級"}},number:{display_mode:"顯示模式",display_mode_list:{buttons:"按鈕",default:"預設 (滑桿)",slider:"滑桿"}},template:{badge_color:"角標顏色",badge_icon:"角標圖示",content:"內容",entity_extra:"用於模板與動作",label:"標籤",multiline_secondary:"多行次要訊息?",picture:"圖片 (將會取代圖示)",primary:"主要訊息",secondary:"次要訊息"},title:{subtitle:"副標題",subtitle_tap_action:"副標題點擊動作",title:"標題",title_tap_action:"標題點擊動作"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令",commands_list:{on_off:"開啟、關閉"}},weather:{show_conditions:"狀況?",show_temperature:"溫度?"}},chip:{"chip-picker":{add:"新增小卡片",chips:"小卡片",clear:"清除",edit:"編輯",select:"選擇小卡片",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",spacer:"佔位符",template:"模板",weather:"天氣"}},conditional:{chip:"小卡片"},sub_element_editor:{title:"小卡片編輯器"}},form:{alignment_picker:{values:{center:"居中對齊",default:"預設對齊",end:"居右對齊",justify:"兩端對齊",start:"居左對齊"}},color_picker:{values:{default:"預設顏色"}},icon_type_picker:{values:{default:"預設樣式","entity-picture":"實體圖片",icon:"圖示",none:"無"}},info_picker:{values:{default:"預設訊息","last-changed":"最近變動時間","last-updated":"最近更新時間",name:"名稱",none:"無",state:"狀態"}},layout_picker:{values:{default:"預設佈局",horizontal:"水平佈局",vertical:"垂直佈局"}}}}}});function oc(t,e){try{return t.split(".").reduce((t,e)=>t[e],Gs[e])}catch(K){return}}function ic(t){return function(e,o={}){var i;const n=null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:Ks;let r=oc(e,n);if(r||(r=oc(e,Ks)),!r)return e;try{return new ta(r,n).format(o)}catch(a){return console.error(`Error formatting message for key "${e}" with lang "${n}":`,a),r}}}var nc,rc,ac,sc,lc,cc,uc,hc,dc,pc,mc,fc,gc,_c,vc,bc,yc,wc,kc,Cc,$c,Ec,xc,Ac,Sc,Tc,Mc,Ic,zc,Pc,Nc,Oc=kt(()=>{Ys(),Ws(),Zs(),Qs(),el(),il(),rl(),sl(),cl(),hl(),pl(),fl(),_l(),bl(),wl(),Cl(),El(),Al(),Tl(),Il(),Pl(),Ol(),Ll(),jl(),Rl(),Vl(),Gl(),Yl(),Wl(),Zl(),Ql(),ec(),Gs={ar:qs,bg:Xs,ca:Js,cs:tl,da:ol,de:nl,el:al,en:ll,es:ul,fi:dl,fr:ml,he:gl,hu:vl,id:yl,it:kl,"ko-KR":$l,nb:xl,nl:Sl,pl:Ml,"pt-BR":zl,"pt-PT":Nl,ro:Bl,ru:Dl,sl:Ul,sk:Hl,sv:Fl,tr:Kl,uk:ql,vi:Xl,"zh-Hans":Jl,"zh-Hant":tc},Ks="en"}),Bc=kt(()=>{Vt(),Be(),je(),vn(),nc=class extends Ot{constructor(...t){super(...t),this.picture_url=""}render(){return J` +
+ +
+ `}static get styles(){return l` + :host { + --main-color: var(--primary-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); + --shape-color: rgba(var(--rgb-primary-text-color), 0.05); + --shape-color-disabled: rgba(var(--rgb-disabled), 0.2); + flex: none; + } + .container { + position: relative; + width: var(--icon-size); + height: var(--icon-size); + flex: none; + display: flex; + align-items: center; + justify-content: center; + } + .picture { + width: 100%; + height: 100%; + border-radius: var(--icon-border-radius); + } + `}},gn([Gt()],nc.prototype,"picture_url",void 0),nc=gn([Lt("mushroom-shape-avatar")],nc)}),Lc=kt(()=>{rc=(t,e)=>{if("number"==typeof t)return 3===e?{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|240&t)/255,b:(15&t|t<<4&240)/255}:4===e?{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|240&t)/255,alpha:(15&t|t<<4&240)/255}:6===e?{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(255&t)/255}:8===e?{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(255&t)/255}:void 0}}),Dc=kt(()=>{ac={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}}),jc=kt(()=>{Lc(),Dc(),sc=t=>rc(ac[t.toLowerCase()],6)}),Hc=kt(()=>{Lc(),lc=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,cc=t=>{let e;return(e=t.match(lc))?rc(parseInt(e[1],16),e[1].length):void 0}}),Rc=kt(()=>{`(?:${uc="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)"}|none)`,hc=`${uc}%`,dc=`(?:${uc}%|${uc})`,pc=`(?:${uc}%|${uc}|none)`,mc=`(?:${uc}(deg|grad|rad|turn)|${uc})`,fc="\\s*,\\s*",new RegExp("^"+pc+"$")}),Uc=kt(()=>{Rc(),gc=new RegExp(`^rgba?\\(\\s*${uc}${fc}${uc}${fc}${uc}\\s*(?:,\\s*${dc}\\s*)?\\)$`),_c=new RegExp(`^rgba?\\(\\s*${hc}${fc}${hc}${fc}${hc}\\s*(?:,\\s*${dc}\\s*)?\\)$`),vc=t=>{let e,o={mode:"rgb"};if(e=t.match(gc))void 0!==e[1]&&(o.r=e[1]/255),void 0!==e[2]&&(o.g=e[2]/255),void 0!==e[3]&&(o.b=e[3]/255);else{if(!(e=t.match(_c)))return;void 0!==e[1]&&(o.r=e[1]/100),void 0!==e[2]&&(o.g=e[2]/100),void 0!==e[3]&&(o.b=e[3]/100)}return void 0!==e[4]?o.alpha=Math.max(0,Math.min(1,e[4]/100)):void 0!==e[5]&&(o.alpha=Math.max(0,Math.min(1,+e[5]))),o}}),Vc=kt(()=>{Qc(),oe(),bc=(t,e)=>void 0===t?void 0:"object"!=typeof t?Nc(t):void 0!==t.mode?t:e?ee(ee({},t),{},{mode:e}):void 0}),Fc=kt(()=>{Gc(),Vc(),yc=(t="rgb")=>e=>void 0!==(e=bc(e,t))?e.mode===t?e:wc[e.mode][t]?wc[e.mode][t](e):"rgb"===t?wc[e.mode].rgb(e):wc.rgb[t](wc[e.mode].rgb(e)):void 0}),Gc=kt(()=>{Fc(),oe(),wc={},kc={},Cc=[],$c={},Ec=t=>t,xc=t=>(wc[t.mode]=ee(ee({},wc[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{wc[e]||(wc[e]={}),wc[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(void 0===t.ranges[e]&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);"function"==typeof t.interpolate[e]&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=Ec)}),kc[t.mode]=t,(t.parse||[]).forEach(e=>{Sc(e,t.mode)}),yc(t.mode)),Ac=t=>kc[t],Sc=(t,e)=>{if("string"==typeof t){if(!e)throw new Error("'mode' required when 'parser' is a string");$c[t]=e}else"function"==typeof t&&Cc.indexOf(t)<0&&Cc.push(t)}});function Kc(t){let e=t[zc],o=t[zc+1];return"-"===e||"+"===e?/\d/.test(o)||"."===o&&/\d/.test(t[zc+2]):/\d/.test("."===e?o:e)}function Yc(t){if(zc>=t.length)return!1;let e=t[zc];if(Tc.test(e))return!0;if("-"===e){if(t.length-zc<2)return!1;let e=t[zc+1];return!("-"!==e&&!Tc.test(e))}return!1}function qc(t){let e="";if("-"!==t[zc]&&"+"!==t[zc]||(e+=t[zc++]),e+=Wc(t),"."===t[zc]&&/\d/.test(t[zc+1])&&(e+=t[zc++]+Wc(t)),"e"!==t[zc]&&"E"!==t[zc]||("-"!==t[zc+1]&&"+"!==t[zc+1]||!/\d/.test(t[zc+2])?/\d/.test(t[zc+1])&&(e+=t[zc++]+Wc(t)):e+=t[zc++]+t[zc++]+Wc(t)),Yc(t)){let o=Xc(t);return"deg"===o||"rad"===o||"turn"===o||"grad"===o?{type:Ic.Hue,value:e*Pc[o]}:void 0}return"%"===t[zc]?(zc++,{type:Ic.Percentage,value:+e}):{type:Ic.Number,value:+e}}function Wc(t){let e="";for(;/\d/.test(t[zc]);)e+=t[zc++];return e}function Xc(t){let e="";for(;zc4)){if(4===o.length){if(o[3].type!==Ic.Alpha)return;o[3]=o[3].value}return 3===o.length&&o.push({type:Ic.None,value:void 0}),o.every(t=>t.type!==Ic.Alpha)?o:void 0}}var Qc=kt(()=>{Gc(),Tc=/[^\x00-\x7F]|[a-zA-Z_]/,Mc=/[^\x00-\x7F]|[-\w]/,Ic={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},zc=0,Pc={deg:1,rad:180/Math.PI,grad:.9,turn:360},Nc=t=>{if("string"!=typeof t)return;const e=function(t=""){let e,o=t.trim(),i=[];for(zc=0;zc{Qc()}),nh=kt(()=>{eu=t=>"transparent"===t?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0}),rh=kt(()=>{ou=(t,e,o)=>t+o*(e-t)}),ah=kt(()=>{iu=t=>{let e=[];for(let o=0;oe=>{let o=iu(e);return e=>{let i=e*o.length,n=e>=1?o.length-1:Math.max(Math.floor(i),0),r=o[n];return void 0===r?void 0:t(r[0],r[1],i-n)}}}),sh=kt(()=>{rh(),ah(),ru=nu(ou)}),lh=kt(()=>{au=t=>{let e=!1,o=t.map(t=>void 0!==t?(e=!0,t):1);return e?o:t}}),ch=kt(()=>{jc(),Hc(),Uc(),ih(),nh(),sh(),lh(),su={mode:"rgb",channels:["r","g","b","alpha"],parse:[tu,cc,vc,sc,eu,"srgb"],serialize:"srgb",interpolate:{r:ru,g:ru,b:ru,alpha:{use:ru,fixup:au}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}}}),uh=kt(()=>{lu=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),cu=t=>{let e=lu(t.r),o=lu(t.g),i=lu(t.b),n={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*o+.1882286462349947*i,y:.297344975250536*e+.6273635662554661*o+.0752914584939979*i,z:.0270313613864123*e+.0706888525358272*o+.9913375368376386*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),hh=kt(()=>{uu=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),hu=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"a98",r:uu(2.0415879038107465*t-.5650069742788597*e-.3447313507783297*o),g:uu(-.9692436362808798*t+1.8759675015077206*e+.0415550574071756*o),b:uu(.0134442806320312*t-.1183623922310184*e+1.0151749943912058*o)};return void 0!==i&&(n.alpha=i),n}}),dh=kt(()=>{du=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},pu=({r:t,g:e,b:o,alpha:i})=>{let n={mode:"lrgb",r:du(t),g:du(e),b:du(o)};return void 0!==i&&(n.alpha=i),n}}),ph=kt(()=>{dh(),mu=t=>{let{r:e,g:o,b:i,alpha:n}=pu(t),r={mode:"xyz65",x:.4123907992659593*e+.357584339383878*o+.1804807884018343*i,y:.2126390058715102*e+.715168678767756*o+.0721923153607337*i,z:.0193308187155918*e+.119194779794626*o+.9505321522496607*i};return void 0!==n&&(r.alpha=n),r}}),mh=kt(()=>{fu=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):12.92*t},gu=({r:t,g:e,b:o,alpha:i},n="rgb")=>{let r={mode:n,r:fu(t),g:fu(e),b:fu(o)};return void 0!==i&&(r.alpha=i),r}}),fh=kt(()=>{mh(),_u=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=gu({r:3.2409699419045226*t-1.537383177570094*e-.4986107602930034*o,g:-.9692436362808796*t+1.8759675015077204*e+.0415550574071756*o,b:.0556300796969936*t-.2039769588889765*e+1.0569715142428784*o});return void 0!==i&&(n.alpha=i),n}}),gh=kt(()=>{ch(),uh(),hh(),ph(),fh(),oe(),vu=ee(ee({},su),{},{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>hu(mu(t)),xyz65:hu},toMode:{rgb:t=>_u(cu(t)),xyz65:cu}})}),_h=kt(()=>{bu=t=>(t%=360)<0?t+360:t}),vh=kt(()=>{_h(),yu=(t,e)=>t.map((o,i,n)=>{if(void 0===o)return o;let r=bu(o);return 0===i||void 0===t[i-1]?r:e(r-bu(n[i-1]))}).reduce((t,e)=>t.length&&void 0!==e&&void 0!==t[t.length-1]?(t.push(e+t[t.length-1]),t):(t.push(e),t),[]),wu=t=>yu(t,t=>Math.abs(t)<=180?t:t-360*Math.sign(t))}),bh=kt(()=>{ku=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Cu=Math.PI/180,$u=180/Math.PI}),yh=kt(()=>{bh(),Eu=ku[3]*ku[4],xu=ku[1]*ku[4],Au=ku[1]*ku[2]-ku[0]*ku[3],Su=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(Au*o+t*Eu-e*xu)/(Au+Eu-xu),r=o-n,a=(ku[4]*(e-n)-ku[2]*r)/ku[3],s={mode:"cubehelix",l:n,s:0===n||1===n?void 0:Math.sqrt(r*r+a*a)/(ku[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(a,r)*$u-120),void 0!==i&&(s.alpha=i),s}}),wh=kt(()=>{bh(),Tu=({h:t,s:e,l:o,alpha:i})=>{let n={mode:"rgb"};t=(void 0===t?0:t+120)*Cu,void 0===o&&(o=0);let r=void 0===e?0:e*o*(1-o),a=Math.cos(t),s=Math.sin(t);return n.r=o+r*(ku[0]*a+ku[1]*s),n.g=o+r*(ku[2]*a+ku[3]*s),n.b=o+r*(ku[4]*a+ku[5]*s),void 0!==i&&(n.alpha=i),n}}),kh=kt(()=>{_h(),Mu=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.s||!e.s)return 0;let o=bu(t.h),i=bu(e.h),n=Math.sin((i-o+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*n},Iu=(t,e)=>{if(void 0===t.h||void 0===e.h)return 0;let o=bu(t.h),i=bu(e.h);return Math.abs(i-o)>180?o-(i-360*Math.sign(i-o)):i-o},zu=(t,e)=>{if(void 0===t.h||void 0===e.h||!t.c||!e.c)return 0;let o=bu(t.h),i=bu(e.h),n=Math.sin((i-o+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*n}}),Ch=kt(()=>{Pu=t=>{let e=t.reduce((t,e)=>{if(void 0!==e){let o=e*Math.PI/180;t.sin+=Math.sin(o),t.cos+=Math.cos(o)}return t},{sin:0,cos:0}),o=180*Math.atan2(e.sin,e.cos)/Math.PI;return o<0?360+o:o}}),$h=kt(()=>{vh(),lh(),sh(),yh(),wh(),kh(),Ch(),Nu={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Su},toMode:{rgb:Tu},interpolate:{h:{use:ru,fixup:wu},s:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}}),Eh=kt(()=>{_h(),Ou=({l:t,a:e,b:o,alpha:i},n="lch")=>{void 0===e&&(e=0),void 0===o&&(o=0);let r=Math.sqrt(e*e+o*o),a={mode:n,l:t,c:r};return r&&(a.h=bu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(a.alpha=i),a}}),xh=kt(()=>{Bu=({l:t,c:e,h:o,alpha:i},n="lab")=>{void 0===o&&(o=0);let r={mode:n,l:t,a:e?e*Math.cos(o/180*Math.PI):0,b:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(r.alpha=i),r}}),Ah=kt(()=>{Lu=Math.pow(29,3)/Math.pow(3,3),Du=Math.pow(6,3)/Math.pow(29,3)}),Sh=kt(()=>{ju={X:.3457/.3585,Y:1,Z:.2958/.3585},Hu={X:.3127/.329,Y:1,Z:.3583/.329},Math.pow(29,3)/Math.pow(3,3),Math.pow(6,3)/Math.pow(29,3)}),Th=kt(()=>{Ah(),Sh(),Ru=t=>Math.pow(t,3)>Du?Math.pow(t,3):(116*t-16)/Lu,Uu=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+16)/116,r=n-o/200,a={mode:"xyz65",x:Ru(e/500+n)*Hu.X,y:Ru(n)*Hu.Y,z:Ru(r)*Hu.Z};return void 0!==i&&(a.alpha=i),a}}),Mh=kt(()=>{Th(),fh(),Vu=t=>_u(Uu(t))}),Ih=kt(()=>{Ah(),Sh(),Fu=t=>t>Du?Math.cbrt(t):(Lu*t+16)/116,Gu=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Fu(t/Hu.X),r=Fu(e/Hu.Y),a={mode:"lab65",l:116*r-16,a:500*(n-r),b:200*(r-Fu(o/Hu.Z))};return void 0!==i&&(a.alpha=i),a}}),zh=kt(()=>{ph(),Ih(),Ku=t=>{let e=Gu(mu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),Ph=kt(()=>{Yu=26/180*Math.PI,qu=Math.cos(Yu),Wu=Math.sin(Yu),Xu=100/Math.log(1.39)}),Nh=kt(()=>{Ph(),Zu=({l:t,c:e,h:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"lab65",l:(Math.exp(1*t/Xu)-1)/.0039},r=(Math.exp(.0435*e*1*1)-1)/.075,a=r*Math.cos(o/180*Math.PI-Yu),s=r*Math.sin(o/180*Math.PI-Yu);return n.a=a*qu-s/.83*Wu,n.b=a*Wu+s/.83*qu,void 0!==i&&(n.alpha=i),n}}),Oh=kt(()=>{Ph(),_h(),Ju=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=e*qu+o*Wu,r=.83*(o*qu-e*Wu),a=Math.sqrt(n*n+r*r),s={mode:"dlch",l:Xu/1*Math.log(1+.0039*t),c:Math.log(1+.075*a)/.0435};return s.c&&(s.h=bu((Math.atan2(r,n)+Yu)/Math.PI*180)),void 0!==i&&(s.alpha=i),s}}),Bh=kt(()=>{Eh(),xh(),Mh(),zh(),Nh(),Oh(),sh(),lh(),Qu=t=>Zu(Ou(t,"dlch")),th=t=>Bu(Ju(t),"dlab"),eh={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Qu,rgb:t=>Vu(Qu(t))},fromMode:{lab65:th,rgb:t=>th(Ku(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ru,a:ru,b:ru,alpha:{use:ru,fixup:au}}}}),Lh=kt(()=>{Eh(),xh(),Nh(),Oh(),Mh(),zh(),vh(),lh(),sh(),kh(),Ch(),oh={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Zu,dlab:t=>Bu(t,"dlab"),rgb:t=>Vu(Zu(t))},fromMode:{lab65:Ju,dlab:t=>Ou(t,"dlch"),rgb:t=>Ju(Ku(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ru,c:ru,h:{use:ru,fixup:wu},alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}});function Dh({h:t,s:e,i:o,alpha:i}){t=bu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:o*(1+e*(3/(2-r)-1)),g:o*(1+e*(3*(1-r)/(2-r)-1)),b:o*(1-e)};break;case 1:n={r:o*(1+e*(3*(1-r)/(2-r)-1)),g:o*(1+e*(3/(2-r)-1)),b:o*(1-e)};break;case 2:n={r:o*(1-e),g:o*(1+e*(3/(2-r)-1)),b:o*(1+e*(3*(1-r)/(2-r)-1))};break;case 3:n={r:o*(1-e),g:o*(1+e*(3*(1-r)/(2-r)-1)),b:o*(1+e*(3/(2-r)-1))};break;case 4:n={r:o*(1+e*(3*(1-r)/(2-r)-1)),g:o*(1-e),b:o*(1+e*(3/(2-r)-1))};break;case 5:n={r:o*(1+e*(3/(2-r)-1)),g:o*(1-e),b:o*(1+e*(3*(1-r)/(2-r)-1))};break;default:n={r:o*(1-e),g:o*(1-e),b:o*(1-e)}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var jh=kt(()=>{_h()});function Hh({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsi",s:t+e+o===0?0:1-3*r/(t+e+o),i:(t+e+o)/3};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),Vh=kt(()=>{jh(),Uh(),vh(),lh(),sh(),kh(),Ch(),Rh={mode:"hsi",toMode:{rgb:Dh},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Hh},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ru,fixup:wu},s:ru,i:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}});function Fh({h:t,s:e,l:o,alpha:i}){t=bu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=o+e*(o<.5?o:1-o),a=r-2*(r-o)*Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:r,g:a,b:2*o-r};break;case 1:n={r:a,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:a};break;case 3:n={r:2*o-r,g:a,b:r};break;case 4:n={r:a,g:2*o-r,b:r};break;case 5:n={r:r,g:2*o-r,b:a};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var Gh=kt(()=>{_h()});function Kh({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsl",s:n===r?0:(n-r)/(1-Math.abs(n+r-1)),l:.5*(n+r)};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),Zh=kt(()=>{Yh=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return 360*t}}}),Jh=kt(()=>{Zh(),Rc(),qh=new RegExp(`^hsla?\\(\\s*${mc}${fc}${hc}${fc}${hc}\\s*(?:,\\s*${dc}\\s*)?\\)$`),Wh=t=>{let e=t.match(qh);if(!e)return;let o={mode:"hsl"};return void 0!==e[3]?o.h=+e[3]:void 0!==e[1]&&void 0!==e[2]&&(o.h=Yh(e[1],e[2])),void 0!==e[4]&&(o.s=Math.min(Math.max(0,e[4]/100),1)),void 0!==e[5]&&(o.l=Math.min(Math.max(0,e[5]/100),1)),void 0!==e[6]?o.alpha=Math.max(0,Math.min(1,e[6]/100)):void 0!==e[7]&&(o.alpha=Math.max(0,Math.min(1,+e[7]))),o}});function Qh(t,e){if(!e||"hsl"!==e[0]&&"hsla"!==e[0])return;const o={mode:"hsl"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Percentage)return;o.h=i.value}if(n.type!==Ic.None){if(n.type===Ic.Hue)return;o.s=n.value/100}if(r.type!==Ic.None){if(r.type===Ic.Hue)return;o.l=r.value/100}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var td,ed=kt(()=>{Qc()}),od=kt(()=>{Gh(),Xh(),Jh(),ed(),vh(),lh(),sh(),kh(),Ch(),td={mode:"hsl",toMode:{rgb:Fh},fromMode:{rgb:Kh},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qh,Wh],serialize:t=>`hsl(${void 0!==t.h?t.h:"none"} ${void 0!==t.s?100*t.s+"%":"none"} ${void 0!==t.l?100*t.l+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ru,fixup:wu},s:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}});function id({h:t,s:e,v:o,alpha:i}){t=bu(void 0!==t?t:0),void 0===e&&(e=0),void 0===o&&(o=0);let n,r=Math.abs(t/60%2-1);switch(Math.floor(t/60)){case 0:n={r:o,g:o*(1-e*r),b:o*(1-e)};break;case 1:n={r:o*(1-e*r),g:o,b:o*(1-e)};break;case 2:n={r:o*(1-e),g:o,b:o*(1-e*r)};break;case 3:n={r:o*(1-e),g:o*(1-e*r),b:o};break;case 4:n={r:o*(1-e*r),g:o*(1-e),b:o};break;case 5:n={r:o,g:o*(1-e),b:o*(1-e*r)};break;default:n={r:o*(1-e),g:o*(1-e),b:o*(1-e)}}return n.mode="rgb",void 0!==i&&(n.alpha=i),n}var nd=kt(()=>{_h()});function rd({r:t,g:e,b:o,alpha:i}){void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.max(t,e,o),r=Math.min(t,e,o),a={mode:"hsv",s:0===n?0:1-r/n,v:n};return n-r!==0&&(a.h=60*(n===t?(e-o)/(n-r)+6*(e{}),ld=kt(()=>{nd(),sd(),vh(),lh(),sh(),kh(),Ch(),ad={mode:"hsv",toMode:{rgb:id},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:rd},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ru,fixup:wu},s:ru,v:ru,alpha:{use:ru,fixup:au}},difference:{h:Mu},average:{h:Pu}}});function cd({h:t,w:e,b:o,alpha:i}){if(void 0===e&&(e=0),void 0===o&&(o=0),e+o>1){let t=e+o;e/=t,o/=t}return id({h:t,s:1===o?1:1-e/(1-o),v:1-o,alpha:i})}var ud=kt(()=>{nd()});function hd(t){let e=rd(t);if(void 0===e)return;let o=void 0!==e.s?e.s:0,i=void 0!==e.v?e.v:0,n={mode:"hwb",w:(1-o)*i,b:1-i};return void 0!==e.h&&(n.h=e.h),void 0!==e.alpha&&(n.alpha=e.alpha),n}var dd=kt(()=>{sd()});function pd(t,e){if(!e||"hwb"!==e[0])return;const o={mode:"hwb"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Percentage)return;o.h=i.value}if(n.type!==Ic.None){if(n.type===Ic.Hue)return;o.w=n.value/100}if(r.type!==Ic.None){if(r.type===Ic.Hue)return;o.b=r.value/100}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var md,fd,gd,_d,vd,bd,yd=kt(()=>{Qc()}),wd=kt(()=>{ud(),dd(),yd(),vh(),lh(),sh(),kh(),Ch(),md={mode:"hwb",toMode:{rgb:cd},fromMode:{rgb:hd},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[pd],serialize:t=>`hwb(${void 0!==t.h?t.h:"none"} ${void 0!==t.w?100*t.w+"%":"none"} ${void 0!==t.b?100*t.b+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ru,fixup:wu},w:ru,b:ru,alpha:{use:ru,fixup:au}},difference:{h:Iu},average:{h:Pu}}}),kd=kt(()=>{});function Cd(t){if(t<0)return 0;const e=Math.pow(t,1/gd);return 1e4*Math.pow(Math.max(0,e-_d)/(vd-bd*e),1/fd)}function $d(t){if(t<0)return 0;const e=Math.pow(t/1e4,fd);return Math.pow((_d+vd*e)/(1+bd*e),gd)}var Ed,xd,Ad,Sd,Td,Md,Id,zd,Pd,Nd,Od,Bd,Ld,Dd,jd,Hd,Rd,Ud,Vd,Fd,Gd,Kd,Yd,qd,Wd,Xd,Zd,Jd,Qd=kt(()=>{fd=.1593017578125,gd=78.84375,_d=.8359375,vd=18.8515625,bd=18.6875}),tp=kt(()=>{kd(),Qd(),Ed=t=>Math.max(t/203,0),xd=({i:t,t:e,p:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n=Cd(t+.008609037037932761*e+.11102962500302593*o),r=Cd(t-.00860903703793275*e-.11102962500302599*o),a=Cd(t+.5600313357106791*e-.32062717498731885*o),s={mode:"xyz65",x:Ed(2.070152218389422*n-1.3263473389671556*r+.2066510476294051*a),y:Ed(.3647385209748074*n+.680566024947227*r-.0453045459220346*a),z:Ed(-.049747207535812*n-.0492609666966138*r+1.1880659249923042*a)};return void 0!==i&&(s.alpha=i),s}}),ep=kt(()=>{kd(),Qd(),Ad=(t=0)=>Math.max(203*t,0),Sd=({x:t,y:e,z:o,alpha:i})=>{const n=Ad(t),r=Ad(e),a=Ad(o),s=$d(.3592832590121217*n+.6976051147779502*r-.0358915932320289*a),l=$d(-.1920808463704995*n+1.1004767970374323*r+.0753748658519118*a),c=$d(.0070797844607477*n+.0748396662186366*r+.8433265453898765*a),u={mode:"itp",i:.5*s+.5*l,t:1.61376953125*s-3.323486328125*l+1.709716796875*c,p:4.378173828125*s-4.24560546875*l-.132568359375*c};return void 0!==i&&(u.alpha=i),u}}),op=kt(()=>{sh(),lh(),tp(),ep(),ph(),fh(),Td={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:xd,rgb:t=>_u(xd(t))},fromMode:{xyz65:Sd,rgb:t=>Sd(mu(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ru,t:ru,p:ru,alpha:{use:ru,fixup:au}}}}),ip=kt(()=>{Qd(),Md=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,fd);return Math.pow((_d+vd*e)/(1+bd*e),134.03437499999998)},Id=(t=0)=>Math.max(203*t,0),zd=({x:t,y:e,z:o,alpha:i})=>{t=Id(t),e=Id(e);let n=1.15*t-.15*(o=Id(o)),r=.66*e+.34*t,a=Md(.41478972*n+.579999*r+.014648*o),s=Md(-.20151*n+1.120649*r+.0531008*o),l=Md(-.0166008*n+.2648*r+.6684799*o),c=(a+s)/2,u={mode:"jab",j:.44*c/(1-.56*c)-16295499532821565e-27,a:3.524*a-4.066708*s+.542708*l,b:.199076*a+1.096799*s-1.295875*l};return void 0!==i&&(u.alpha=i),u}}),np=kt(()=>{Qd(),Pd=16295499532821565e-27,Nd=t=>{if(t<0)return 0;let e=Math.pow(t,.007460772656268216);return 1e4*Math.pow((_d-e)/(bd*e-vd),1/fd)},Od=t=>t/203,Bd=({j:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+Pd)/(.44+.56*(t+Pd)),r=Nd(n+.13860504*e+.058047316*o),a=Nd(n-.13860504*e-.058047316*o),s=Nd(n-.096019242*e-.8118919*o),l={mode:"xyz65",x:Od(1.661373024652174*r-.914523081304348*a+.23136208173913045*s),y:Od(-.3250758611844533*r+1.571847026732543*a-.21825383453227928*s),z:Od(-.090982811*r-.31272829*a+1.5227666*s)};return void 0!==i&&(l.alpha=i),l}}),rp=kt(()=>{ip(),ph(),Ld=t=>{let e=zd(mu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),ap=kt(()=>{fh(),np(),Dd=t=>_u(Bd(t))}),sp=kt(()=>{ip(),np(),rp(),ap(),sh(),lh(),jd={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Ld,xyz65:zd},toMode:{rgb:Dd,xyz65:Bd},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ru,a:ru,b:ru,alpha:{use:ru,fixup:au}}}}),lp=kt(()=>{_h(),Hd=({j:t,a:e,b:o,alpha:i})=>{void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.sqrt(e*e+o*o),r={mode:"jch",j:t,c:n};return n&&(r.h=bu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(r.alpha=i),r}}),cp=kt(()=>{Rd=({j:t,c:e,h:o,alpha:i})=>{void 0===o&&(o=0);let n={mode:"jab",j:t,a:e?e*Math.cos(o/180*Math.PI):0,b:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n}}),up=kt(()=>{lp(),cp(),ap(),rp(),vh(),lh(),sh(),kh(),Ch(),Ud={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Rd,rgb:t=>Dd(Rd(t))},fromMode:{rgb:t=>Hd(Ld(t)),jab:Hd},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ru,fixup:wu},c:ru,j:ru,alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}}),hp=kt(()=>{Vd=Math.pow(29,3)/Math.pow(3,3),Fd=Math.pow(6,3)/Math.pow(29,3)}),dp=kt(()=>{hp(),Sh(),Gd=t=>Math.pow(t,3)>Fd?Math.pow(t,3):(116*t-16)/Vd,Kd=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=(t+16)/116,r=n-o/200,a={mode:"xyz50",x:Gd(e/500+n)*ju.X,y:Gd(n)*ju.Y,z:Gd(r)*ju.Z};return void 0!==i&&(a.alpha=i),a}}),pp=kt(()=>{mh(),Yd=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=gu({r:3.1341359569958707*t-1.6173863321612538*e-.4906619460083532*o,g:-.978795502912089*t+1.916254567259524*e+.03344273116131949*o,b:.07195537988411677*t-.2289768264158322*e+1.405386058324125*o});return void 0!==i&&(n.alpha=i),n}}),mp=kt(()=>{dp(),pp(),qd=t=>Yd(Kd(t))}),fp=kt(()=>{dh(),Wd=t=>{let{r:e,g:o,b:i,alpha:n}=pu(t),r={mode:"xyz50",x:.436065742824811*e+.3851514688337912*o+.14307845442264197*i,y:.22249319175623702*e+.7168870538238823*o+.06061979053616537*i,z:.013923904500943465*e+.09708128566574634*o+.7140993584005155*i};return void 0!==n&&(r.alpha=n),r}}),gp=kt(()=>{hp(),Sh(),Xd=t=>t>Fd?Math.cbrt(t):(Vd*t+16)/116,Zd=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Xd(t/ju.X),r=Xd(e/ju.Y),a={mode:"lab",l:116*r-16,a:500*(n-r),b:200*(r-Xd(o/ju.Z))};return void 0!==i&&(a.alpha=i),a}}),_p=kt(()=>{fp(),gp(),Jd=t=>{let e=Zd(Wd(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}});function vp(t,e){if(!e||"lab"!==e[0])return;const o={mode:"lab"},[,i,n,r,a]=e;return i.type!==Ic.Hue&&n.type!==Ic.Hue&&r.type!==Ic.Hue?(i.type!==Ic.None&&(o.l=Math.min(Math.max(0,i.value),100)),n.type!==Ic.None&&(o.a=n.type===Ic.Number?n.value:125*n.value/100),r.type!==Ic.None&&(o.b=r.type===Ic.Number?r.value:125*r.value/100),a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o):void 0}var bp,yp,wp=kt(()=>{Qc()}),kp=kt(()=>{mp(),dp(),_p(),gp(),wp(),sh(),lh(),bp={mode:"lab",toMode:{xyz50:Kd,rgb:qd},fromMode:{xyz50:Zd,rgb:Jd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[vp],serialize:t=>`lab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:ru,a:ru,b:ru,alpha:{use:ru,fixup:au}}}}),Cp=kt(()=>{Mh(),Th(),zh(),Ih(),kp(),oe(),yp=ee(ee({},bp),{},{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Uu,rgb:Vu},fromMode:{xyz65:Gu,rgb:Ku},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}})});function $p(t,e){if(!e||"lch"!==e[0])return;const o={mode:"lch"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Hue)return;o.l=Math.min(Math.max(0,i.value),100)}if(n.type!==Ic.None&&(o.c=Math.max(0,n.type===Ic.Number?n.value:150*n.value/100)),r.type!==Ic.None){if(r.type===Ic.Percentage)return;o.h=r.value}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var Ep,xp,Ap,Sp,Tp,Mp,Ip,zp,Pp,Np,Op,Bp,Lp,Dp,jp,Hp,Rp,Up,Vp,Fp,Gp,Kp,Yp,qp,Wp=kt(()=>{Qc()}),Xp=kt(()=>{Eh(),xh(),mp(),_p(),Wp(),vh(),lh(),sh(),kh(),Ch(),Ep={mode:"lch",toMode:{lab:Bu,rgb:t=>qd(Bu(t))},fromMode:{rgb:t=>Ou(Jd(t)),lab:Ou},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$p],serialize:t=>`lch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:ru,fixup:wu},c:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}}),Zp=kt(()=>{Eh(),xh(),Mh(),zh(),Xp(),oe(),xp=ee(ee({},Ep),{},{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>Bu(t,"lab65"),rgb:t=>Vu(Bu(t,"lab65"))},fromMode:{rgb:t=>Ou(Ku(t),"lch65"),lab65:t=>Ou(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}})}),Jp=kt(()=>{_h(),Ap=({l:t,u:e,v:o,alpha:i})=>{void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.sqrt(e*e+o*o),r={mode:"lchuv",l:t,c:n};return n&&(r.h=bu(180*Math.atan2(o,e)/Math.PI)),void 0!==i&&(r.alpha=i),r}}),Qp=kt(()=>{Sp=({l:t,c:e,h:o,alpha:i})=>{void 0===o&&(o=0);let n={mode:"luv",l:t,u:e?e*Math.cos(o/180*Math.PI):0,v:e?e*Math.sin(o/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n}}),tm=kt(()=>{hp(),Sh(),Tp=(t,e,o)=>4*t/(t+15*e+3*o),Mp=(t,e,o)=>9*e/(t+15*e+3*o),Ip=Tp(ju.X,ju.Y,ju.Z),zp=Mp(ju.X,ju.Y,ju.Z),Pp=t=>t<=Fd?Vd*t:116*Math.cbrt(t)-16,Np=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Pp(e/ju.Y),r=Tp(t,e,o),a=Mp(t,e,o);isFinite(r)&&isFinite(a)?(r=13*n*(r-Ip),a=13*n*(a-zp)):n=r=a=0;let s={mode:"luv",l:n,u:r,v:a};return void 0!==i&&(s.alpha=i),s}}),em=kt(()=>{hp(),Sh(),Op=(t,e,o)=>4*t/(t+15*e+3*o),Bp=(t,e,o)=>9*e/(t+15*e+3*o),Lp=Op(ju.X,ju.Y,ju.Z),Dp=Bp(ju.X,ju.Y,ju.Z),jp=({l:t,u:e,v:o,alpha:i})=>{if(void 0===t&&(t=0),0===t)return{mode:"xyz50",x:0,y:0,z:0};void 0===e&&(e=0),void 0===o&&(o=0);let n=e/(13*t)+Lp,r=o/(13*t)+Dp,a=ju.Y*(t<=8?t/Vd:Math.pow((t+16)/116,3)),s={mode:"xyz50",x:a*(9*n)/(4*r),y:a,z:a*(12-3*n-20*r)/(4*r)};return void 0!==i&&(s.alpha=i),s}}),om=kt(()=>{Jp(),Qp(),tm(),em(),pp(),fp(),vh(),lh(),sh(),kh(),Ch(),Hp=t=>Ap(Np(Wd(t))),Rp=t=>Yd(jp(Sp(t))),Up={mode:"lchuv",toMode:{luv:Sp,rgb:Rp},fromMode:{rgb:Hp,luv:Ap},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ru,fixup:wu},c:ru,l:ru,alpha:{use:ru,fixup:au}},difference:{h:zu},average:{h:Pu}}}),im=kt(()=>{ch(),dh(),mh(),oe(),Vp=ee(ee({},su),{},{mode:"lrgb",toMode:{rgb:gu},fromMode:{rgb:pu},parse:["srgb-linear"],serialize:"srgb-linear"})}),nm=kt(()=>{tm(),em(),pp(),fp(),sh(),lh(),Fp={mode:"luv",toMode:{xyz50:jp,rgb:t=>Yd(jp(t))},fromMode:{xyz50:Np,rgb:t=>Np(Wd(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:ru,u:ru,v:ru,alpha:{use:ru,fixup:au}}}}),rm=kt(()=>{Gp=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*o),r=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*o),a=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*o),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*r-.0040720430116193*a,a:1.9779985324311684*n-2.42859224204858*r+.450593709617411*a,b:.0259040424655478*n+.7827717124575296*r-.8086757549230774*a};return void 0!==i&&(s.alpha=i),s}}),am=kt(()=>{dh(),rm(),Kp=t=>{let e=Gp(pu(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e}}),sm=kt(()=>{Yp=({l:t,a:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=Math.pow(t+.3963377773761749*e+.2158037573099136*o,3),r=Math.pow(t-.1055613458156586*e-.0638541728258133*o,3),a=Math.pow(t-.0894841775298119*e-1.2914855480194092*o,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*r+.2309699031821044*a,g:-1.2684379732850317*n+2.6097573492876887*r-.3413193760026573*a,b:-.0041960761386756*n-.7034186179359362*r+1.7076146940746117*a};return void 0!==i&&(s.alpha=i),s}}),lm=kt(()=>{mh(),sm(),qp=t=>gu(Yp(t))});function cm(t){const e=.206,o=1.206/1.03;return.5*(o*t-e+Math.sqrt((o*t-e)*(o*t-e)+.12*o*t))}function um(t){return(t*t+.206*t)/(1.206/1.03*(t+.03))}function hm(t,e){let o=function(t,e){let o,i,n,r,a,s,l,c;-1.88170328*t-.80936493*e>1?(o=1.19086277,i=1.76576728,n=.59662641,r=.75515197,a=.56771245,s=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(o=.73956515,i=-.45954404,n=.08285427,r=.1254107,a=.14503204,s=-1.2684380046,l=2.6097574011,c=-.3413193965):(o=1.35733652,i=-.00915799,n=-1.1513021,r=-.50559606,a=.00692167,s=-.0041960863,l=-.7034186147,c=1.707614701);let u=o+i*t+n*e+r*t*t+a*t*e,h=.3963377774*t+.2158037573*e,d=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let t=1+u*h,e=1+u*d,o=1+u*p,i=s*(t*t*t)+l*(e*e*e)+c*(o*o*o),n=s*(3*h*t*t)+l*(3*d*e*e)+c*(3*p*o*o);u-=i*n/(n*n-.5*i*(s*(6*h*h*t)+l*(6*d*d*e)+c*(6*p*p*o)))}return u}(t,e),i=Yp({l:1,a:o*t,b:o*e}),n=Math.cbrt(1/Math.max(i.r,i.g,i.b));return[n,n*o]}function dm(t,e,o=null){o||(o=hm(t,e));let i=o[0],n=o[1];return[n/i,n/(1-i)]}function pm(t,e,o){let i=hm(e,o),n=function(t,e,o,i,n,r=null){let a;if(r||(r=hm(t,e)),(o-n)*r[1]-(r[0]-n)*i<=0)a=r[1]*n/(i*r[0]+r[1]*(n-o));else{a=r[1]*(n-1)/(i*(r[0]-1)+r[1]*(n-o));{let r=o-n,s=.3963377774*t+.2158037573*e,l=-.1055613458*t-.0638541728*e,c=-.0894841775*t-1.291485548*e,u=r+i*s,h=r+i*l,d=r+i*c;{let t=n*(1-a)+a*o,e=a*i,r=t+e*s,p=t+e*l,m=t+e*c,f=r*r*r,g=p*p*p,_=m*m*m,v=3*u*r*r,b=3*h*p*p,y=3*d*m*m,w=6*u*u*r,k=6*h*h*p,C=6*d*d*m,$=4.0767416621*f-3.3077115913*g+.2309699292*_-1,E=4.0767416621*v-3.3077115913*b+.2309699292*y,x=E/(E*E-.5*$*(4.0767416621*w-3.3077115913*k+.2309699292*C)),A=-$*x,S=-1.2684380046*f+2.6097574011*g-.3413193965*_-1,T=-1.2684380046*v+2.6097574011*b-.3413193965*y,M=T/(T*T-.5*S*(-1.2684380046*w+2.6097574011*k-.3413193965*C)),I=-S*M,z=-.0041960863*f-.7034186147*g+1.707614701*_-1,P=-.0041960863*v-.7034186147*b+1.707614701*y,N=P/(P*P-.5*z*(-.0041960863*w-.7034186147*k+1.707614701*C)),O=-z*N;A=x>=0?A:1e6,I=M>=0?I:1e6,O=N>=0?O:1e6,a+=Math.min(A,Math.min(I,O))}}}return a}(e,o,t,1,t,i),r=dm(e,o,i),a=t*(.11516993+1/(7.4477897+4.1590124*o+e*(1.75198401*o-2.19557347+e*(-2.13704948-10.02301043*o+e*(5.38770819*o-4.24894561+4.69891013*e))))),s=(1-t)*(.11239642+1/(1.6132032-.68124379*o+e*(.40370612+.90148123*o+e*(.6122399*o-.27087943+e*(.00299215-.45399568*o-.14661872*e))))),l=.9*(n/Math.min(t*r[0],(1-t)*r[1]))*Math.sqrt(Math.sqrt(1/(1/(a*a*a*a)+1/(s*s*s*s))));return a=.4*t,s=.8*(1-t),[Math.sqrt(1/(1/(a*a)+1/(s*s))),l,n]}var mm=kt(()=>{sm()});function fm(t){const e=void 0!==t.l?t.l:0,o=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,n={mode:"okhsl",l:cm(e)};void 0!==t.alpha&&(n.alpha=t.alpha);let r=Math.sqrt(o*o+i*i);if(!r)return n.s=0,n;let a,[s,l,c]=pm(e,o/r,i/r);if(r{_h(),mm()});function _m(t){let e=void 0!==t.h?t.h:0,o=void 0!==t.s?t.s:0,i=void 0!==t.l?t.l:0;const n={mode:"oklab",l:um(i)};if(void 0!==t.alpha&&(n.alpha=t.alpha),!o||1===i)return n.a=n.b=0,n;let r,a,s,l,c=Math.cos(e/180*Math.PI),u=Math.sin(e/180*Math.PI),[h,d,p]=pm(n.l,c,u);o<.8?(r=1.25*o,a=0,s=.8*h,l=1-s/d):(r=5*(o-.8),a=d,s=.2*d*d*1.25*1.25/h,l=1-s/(p-d));let m=a+r*s/(1-l*r);return n.a=m*c,n.b=m*u,n}var vm,bm=kt(()=>{mm()}),ym=kt(()=>{am(),lm(),gm(),bm(),od(),oe(),vm=ee(ee({},td),{},{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:fm,rgb:t=>fm(Kp(t))},toMode:{oklab:_m,rgb:t=>qp(_m(t))}})});function wm(t){let e=void 0!==t.l?t.l:0,o=void 0!==t.a?t.a:0,i=void 0!==t.b?t.b:0,n=Math.sqrt(o*o+i*i),r=n?o/n:1,a=n?i/n:1,[s,l]=dm(r,a),c=1-.5/s,u=l/(n+e*l),h=u*e,d=u*n,p=um(h),m=d*p/h,f=Yp({l:p,a:r*m,b:a*m}),g=Math.cbrt(1/Math.max(f.r,f.g,f.b,0));e/=g,n=n/g*cm(e)/e,e=cm(e);const _={mode:"okhsv",s:n?(.5+l)*d/(.5*l+l*c*d):0,v:e?e/h:0};return _.s&&(_.h=bu(180*Math.atan2(i,o)/Math.PI)),void 0!==t.alpha&&(_.alpha=t.alpha),_}var km=kt(()=>{_h(),sm(),mm()});function Cm(t){const e={mode:"oklab"};void 0!==t.alpha&&(e.alpha=t.alpha);const o=void 0!==t.h?t.h:0,i=void 0!==t.s?t.s:0,n=void 0!==t.v?t.v:0,r=Math.cos(o/180*Math.PI),a=Math.sin(o/180*Math.PI),[s,l]=dm(r,a),c=.5,u=1-c/s,h=1-i*c/(c+l-l*u*i),d=i*l*c/(c+l-l*u*i),p=um(h),m=d*p/h,f=Yp({l:p,a:r*m,b:a*m}),g=Math.cbrt(1/Math.max(f.r,f.g,f.b,0)),_=um(n*h),v=d*_/h;return e.l=_*g,e.a=v*r*g,e.b=v*a*g,e}var $m,Em=kt(()=>{sm(),mm()}),xm=kt(()=>{am(),lm(),km(),Em(),ld(),oe(),$m=ee(ee({},ad),{},{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:wm,rgb:t=>wm(Kp(t))},toMode:{oklab:Cm,rgb:t=>qp(Cm(t))}})});function Am(t,e){if(!e||"oklab"!==e[0])return;const o={mode:"oklab"},[,i,n,r,a]=e;return i.type!==Ic.Hue&&n.type!==Ic.Hue&&r.type!==Ic.Hue?(i.type!==Ic.None&&(o.l=Math.min(Math.max(0,i.type===Ic.Number?i.value:i.value/100),1)),n.type!==Ic.None&&(o.a=n.type===Ic.Number?n.value:.4*n.value/100),r.type!==Ic.None&&(o.b=r.type===Ic.Number?r.value:.4*r.value/100),a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o):void 0}var Sm,Tm=kt(()=>{Qc()}),Mm=kt(()=>{sm(),rm(),am(),lm(),Tm(),kp(),oe(),Sm=ee(ee({},bp),{},{mode:"oklab",toMode:{lrgb:Yp,rgb:qp},fromMode:{lrgb:Gp,rgb:Kp},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Am],serialize:t=>`oklab(${void 0!==t.l?t.l:"none"} ${void 0!==t.a?t.a:"none"} ${void 0!==t.b?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`})});function Im(t,e){if(!e||"oklch"!==e[0])return;const o={mode:"oklch"},[,i,n,r,a]=e;if(i.type!==Ic.None){if(i.type===Ic.Hue)return;o.l=Math.min(Math.max(0,i.type===Ic.Number?i.value:i.value/100),1)}if(n.type!==Ic.None&&(o.c=Math.max(0,n.type===Ic.Number?n.value:.4*n.value/100)),r.type!==Ic.None){if(r.type===Ic.Percentage)return;o.h=r.value}return a.type!==Ic.None&&(o.alpha=Math.min(1,Math.max(0,a.type===Ic.Number?a.value:a.value/100))),o}var zm,Pm,Nm,Om,Bm,Lm,Dm,jm,Hm,Rm,Um,Vm,Fm,Gm,Km,Ym,qm,Wm,Xm,Zm,Jm,Qm,tf,ef,of,nf,rf,af,sf,lf,cf,uf,hf,df,pf,mf=kt(()=>{Qc()}),ff=kt(()=>{Xp(),Eh(),xh(),lm(),am(),mf(),oe(),zm=ee(ee({},Ep),{},{mode:"oklch",toMode:{oklab:t=>Bu(t,"oklab"),rgb:t=>qp(Bu(t,"oklab"))},fromMode:{rgb:t=>Ou(Kp(t),"oklch"),oklab:t=>Ou(t,"oklch")},parse:[Im],serialize:t=>`oklch(${void 0!==t.l?t.l:"none"} ${void 0!==t.c?t.c:"none"} ${void 0!==t.h?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}})}),gf=kt(()=>{dh(),Pm=t=>{let{r:e,g:o,b:i,alpha:n}=pu(t),r={mode:"xyz65",x:.486570948648216*e+.265667693169093*o+.1982172852343625*i,y:.2289745640697487*e+.6917385218365062*o+.079286914093745*i,z:0*e+.0451133818589026*o+1.043944368900976*i};return void 0!==n&&(r.alpha=n),r}}),_f=kt(()=>{mh(),Nm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n=gu({r:2.4934969119414263*t-.9313836179191242*e-.402710784450717*o,g:-.8294889695615749*t+1.7626640603183465*e+.0236246858419436*o,b:.0358458302437845*t-.0761723892680418*e+.9568845240076871*o},"p3");return void 0!==i&&(n.alpha=i),n}}),vf=kt(()=>{ch(),gf(),_f(),ph(),fh(),oe(),Om=ee(ee({},su),{},{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>Nm(mu(t)),xyz65:Nm},toMode:{rgb:t=>_u(Pm(t)),xyz65:Pm}})}),bf=kt(()=>{Bm=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},Lm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"prophoto",r:Bm(1.3457868816471585*t-.2555720873797946*e-.0511018649755453*o),g:Bm(-.5446307051249019*t+1.5082477428451466*e+.0205274474364214*o),b:Bm(0*t+0*e+1.2119675456389452*o)};return void 0!==i&&(n.alpha=i),n}}),yf=kt(()=>{Dm=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},jm=t=>{let e=Dm(t.r),o=Dm(t.g),i=Dm(t.b),n={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*o+.0313477341283922*i,y:.2880748288194013*e+.7118352342418731*o+899369387256e-16*i,z:0*e+0*o+.8251046025104602*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),wf=kt(()=>{ch(),bf(),yf(),pp(),fp(),oe(),Hm=ee(ee({},su),{},{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Lm,rgb:t=>Lm(Wd(t))},toMode:{xyz50:jm,rgb:t=>Yd(jm(t))}})}),kf=kt(()=>{Rm=1.09929682680944,Um=t=>{const e=Math.abs(t);return e>.018053968510807?(Math.sign(t)||1)*(Rm*Math.pow(e,.45)-(Rm-1)):4.5*t},Vm=({x:t,y:e,z:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);let n={mode:"rec2020",r:Um(1.7166511879712683*t-.3556707837763925*e-.2533662813736599*o),g:Um(-.6666843518324893*t+1.6164812366349395*e+.0157685458139111*o),b:Um(.0176398574453108*t-.0427706132578085*e+.9421031212354739*o)};return void 0!==i&&(n.alpha=i),n}}),Cf=kt(()=>{Fm=1.09929682680944,Gm=(t=0)=>{let e=Math.abs(t);return e<.08124285829863151?t/4.5:(Math.sign(t)||1)*Math.pow((e+Fm-1)/Fm,1/.45)},Km=t=>{let e=Gm(t.r),o=Gm(t.g),i=Gm(t.b),n={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*o+.1688809751641721*i,y:.262700212011267*e+.6779980715188708*o+.059301716469862*i,z:0*e+.0280726930490874*o+1.0609850577107909*i};return void 0!==t.alpha&&(n.alpha=t.alpha),n}}),$f=kt(()=>{ch(),kf(),Cf(),ph(),fh(),oe(),Ym=ee(ee({},su),{},{mode:"rec2020",fromMode:{xyz65:Vm,rgb:t=>Vm(mu(t))},toMode:{xyz65:Km,rgb:t=>_u(Km(t))},parse:["rec2020"],serialize:"rec2020"})}),Ef=kt(()=>{qm=.0037930732552754493,Wm=Math.cbrt(qm)}),xf=kt(()=>{dh(),Ef(),Xm=t=>Math.cbrt(t)-Wm,Zm=t=>{const{r:e,g:o,b:i,alpha:n}=pu(t),r=Xm(.3*e+.622*o+.078*i+qm),a=Xm(.23*e+.692*o+.078*i+qm),s={mode:"xyb",x:(r-a)/2,y:(r+a)/2,b:Xm(.2434226892454782*e+.2047674442449682*o+.5518098665095535*i+qm)-(r+a)/2};return void 0!==n&&(s.alpha=n),s}}),Af=kt(()=>{mh(),Ef(),Jm=t=>Math.pow(t+Wm,3),Qm=({x:t,y:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n=Jm(t+e)-qm,r=Jm(e-t)-qm,a=Jm(o+e)-qm,s=gu({r:11.031566904639861*n-9.866943908131562*r-.16462299650829934*a,g:-3.2541473810744237*n+4.418770377582723*r-.16462299650829934*a,b:-3.6588512867136815*n+2.7129230459360922*r+1.9459282407775895*a});return void 0!==i&&(s.alpha=i),s}}),Sf=kt(()=>{sh(),lh(),xf(),Af(),tf={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Qm},fromMode:{rgb:Zm},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ru,y:ru,b:ru,alpha:{use:ru,fixup:au}}}}),Tf=kt(()=>{pp(),gp(),fp(),dp(),sh(),lh(),ef={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Yd,lab:Zd},fromMode:{rgb:Wd,lab:Kd},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ru,y:ru,z:ru,alpha:{use:ru,fixup:au}}}}),Mf=kt(()=>{of=t=>{let{x:e,y:o,z:i,alpha:n}=t;void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0);let r={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*o-.0501922295431356*i,y:.0296278156881593*e+.990434484573249*o-.0170738250293851*i,z:-.0092430581525912*e+.0150551448965779*o+.7518742899580008*i};return void 0!==n&&(r.alpha=n),r}}),If=kt(()=>{nf=t=>{let{x:e,y:o,z:i,alpha:n}=t;void 0===e&&(e=0),void 0===o&&(o=0),void 0===i&&(i=0);let r={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*o+.0632593086610217*i,y:-.0283697069632081*e+1.0099954580058226*o+.021041398966943*i,z:.0123140016883199*e-.0205076964334779*o+1.3303659366080753*i};return void 0!==n&&(r.alpha=n),r}}),zf=kt(()=>{fh(),ph(),Mf(),If(),sh(),lh(),rf={mode:"xyz65",toMode:{rgb:_u,xyz50:of},fromMode:{rgb:mu,xyz50:nf},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:ru,y:ru,z:ru,alpha:{use:ru,fixup:au}}}}),Pf=kt(()=>{af=({r:t,g:e,b:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*o,i:.59597799*t-.2741761*e-.32180189*o,q:.21147017*t-.52261711*e+.31114694*o};return void 0!==i&&(n.alpha=i),n}}),Nf=kt(()=>{sf=({y:t,i:e,q:o,alpha:i})=>{void 0===t&&(t=0),void 0===e&&(e=0),void 0===o&&(o=0);const n={mode:"rgb",r:t+.95608445*e+.6208885*o,g:t-.27137664*e-.6486059*o,b:t-1.10561724*e+1.70250126*o};return void 0!==i&&(n.alpha=i),n}}),Of=kt(()=>{Pf(),Nf(),sh(),lh(),lf={mode:"yiq",toMode:{rgb:sf},fromMode:{rgb:af},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ru,i:ru,q:ru,alpha:{use:ru,fixup:au}}}}),Bf=kt(()=>{gh(),$h(),Bh(),Lh(),Vh(),od(),ld(),wd(),op(),sp(),up(),kp(),Cp(),Xp(),Zp(),om(),im(),nm(),ym(),xm(),Mm(),ff(),vf(),wf(),$f(),ch(),Sf(),Tf(),zf(),Of(),Gc(),Fc(),Vc(),Dc(),vh(),lh(),Ch(),sh(),ah(),rh(),kh(),oe(),Qc(),ed(),yd(),wp(),Wp(),jc(),nh(),Hc(),ih(),Jh(),Uc(),Tm(),mf(),uh(),wh(),Nh(),jh(),Gh(),nd(),ud(),tp(),lp(),ap(),np(),cp(),Oh(),Mh(),Th(),Eh(),mp(),dp(),xh(),Qp(),rm(),mh(),Jp(),em(),bm(),Em(),sm(),gm(),km(),lm(),gf(),yf(),Cf(),yh(),Uh(),Xh(),sd(),dd(),rp(),_p(),zh(),dh(),am(),xf(),fp(),ph(),Pf(),Af(),gp(),tm(),bf(),pp(),If(),hh(),ep(),ip(),Ih(),_f(),kf(),fh(),Mf(),Nf(),xc(vu),xc(Nu),xc(eh),xc(oh),xc(Rh),xc(td),cf=xc(ad),xc(md),xc(Td),xc(jd),xc(Ud),xc(bp),xc(yp),xc(Ep),xc(xp),xc(Up),xc(Vp),xc(Fp),xc(vm),xc($m),xc(Sm),xc(zm),xc(Om),xc(Hm),xc(Ym),uf=xc(su),xc(tf),xc(ef),xc(rf),xc(lf)});function Lf(t){if("primary"===t||"accent"===t)return`var(--rgb-${t}-color)`;if(hf.includes(t))return`var(--rgb-${t})`;if(t.startsWith("#"))try{const e=uf(t);if(e){const{r:t,g:o,b:i}=e;return`${Math.round(255*t)}, ${Math.round(255*o)}, ${Math.round(255*i)}`}return""}catch(e){return""}return t}var Df,jf,Hf,Rf=kt(()=>{Bf(),Vt(),hf=["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white","disabled"],df=l` + --default-red: 244, 67, 54; + --default-pink: 233, 30, 99; + --default-purple: 146, 107, 199; + --default-deep-purple: 110, 65, 171; + --default-indigo: 63, 81, 181; + --default-blue: 33, 150, 243; + --default-light-blue: 3, 169, 244; + --default-cyan: 0, 188, 212; + --default-teal: 0, 150, 136; + --default-green: 76, 175, 80; + --default-light-green: 139, 195, 74; + --default-lime: 205, 220, 57; + --default-yellow: 255, 235, 59; + --default-amber: 255, 193, 7; + --default-orange: 255, 152, 0; + --default-deep-orange: 255, 111, 34; + --default-brown: 121, 85, 72; + --default-light-grey: 189, 189, 189; + --default-grey: 158, 158, 158; + --default-dark-grey: 96, 96, 96; + --default-blue-grey: 96, 125, 139; + --default-black: 0, 0, 0; + --default-white: 255, 255, 255; + --default-disabled: 189, 189, 189; +`,pf=l` + --default-disabled: 111, 111, 111; +`}),Uf=kt(()=>{Vt(),Df=l` + --spacing: var(--mush-spacing, 10px); + + /* Title */ + --title-padding: var(--mush-title-padding, 24px 12px 8px); + --title-spacing: var(--mush-title-spacing, 8px); + --title-font-size: var(--mush-title-font-size, 24px); + --title-font-weight: var(--mush-title-font-weight, normal); + --title-line-height: var(--mush-title-line-height, 32px); + --title-color: var(--mush-title-color, var(--primary-text-color)); + --title-letter-spacing: var(--mush-title-letter-spacing, -0.288px); + --subtitle-font-size: var(--mush-subtitle-font-size, 16px); + --subtitle-font-weight: var(--mush-subtitle-font-weight, normal); + --subtitle-line-height: var(--mush-subtitle-line-height, 24px); + --subtitle-color: var(--mush-subtitle-color, var(--secondary-text-color)); + --subtitle-letter-spacing: var(--mush-subtitle-letter-spacing, 0px); + + /* Card */ + --card-primary-font-size: var(--mush-card-primary-font-size, 14px); + --card-secondary-font-size: var(--mush-card-secondary-font-size, 12px); + --card-primary-font-weight: var(--mush-card-primary-font-weight, 500); + --card-secondary-font-weight: var(--mush-card-secondary-font-weight, 400); + --card-primary-line-height: var(--mush-card-primary-line-height, 20px); + --card-secondary-line-height: var(--mush-card-secondary-line-height, 16px); + --card-primary-color: var( + --mush-card-primary-color, + var(--primary-text-color) + ); + --card-secondary-color: var( + --mush-card-secondary-color, + var(--primary-text-color) + ); + --card-primary-letter-spacing: var(--mush-card-primary-letter-spacing, 0.1px); + --card-secondary-letter-spacing: var( + --mush-card-secondary-letter-spacing, + 0.4px + ); + + /* Chips */ + --chip-spacing: var(--mush-chip-spacing, 8px); + --chip-padding: var(--mush-chip-padding, 0 0.25em); + --chip-height: var(--mush-chip-height, 36px); + --chip-border-radius: var(--mush-chip-border-radius, 19px); + --chip-border-width: var( + --mush-chip-border-width, + var(--ha-card-border-width, 1px) + ); + --chip-border-color: var( + --mush-chip-border-color, + var(--ha-card-border-color, var(--divider-color)) + ); + --chip-box-shadow: var( + --mush-chip-box-shadow, + var(--ha-card-box-shadow, "none") + ); + --chip-font-size: var(--mush-chip-font-size, 0.3em); + --chip-font-weight: var(--mush-chip-font-weight, bold); + --chip-icon-size: var(--mush-chip-icon-size, 0.5em); + --chip-avatar-padding: var(--mush-chip-avatar-padding, 0.1em); + --chip-avatar-border-radius: var(--mush-chip-avatar-border-radius, 50%); + --chip-background: var( + --mush-chip-background, + var(--ha-card-background, var(--card-background-color, white)) + ); + /* Controls */ + --control-border-radius: var(--mush-control-border-radius, 12px); + --control-height: var(--mush-control-height, 42px); + --control-button-ratio: var(--mush-control-button-ratio, 1); + --control-icon-size: var(--mush-control-icon-size, 0.5em); + --control-spacing: var(--mush-control-spacing, 12px); + + /* Slider */ + --slider-threshold: var(--mush-slider-threshold); + + /* Input Number */ + --input-number-debounce: var(--mush-input-number-debounce); + + /* Layout */ + --layout-align: var(--mush-layout-align, center); + + /* Badge */ + --badge-size: var(--mush-badge-size, 16px); + --badge-icon-size: var(--mush-badge-icon-size, 0.75em); + --badge-border-radius: var(--mush-badge-border-radius, 50%); + + /* Icon */ + --icon-border-radius: var(--mush-icon-border-radius, 50%); + --icon-size: var(--mush-icon-size, 36px); + --icon-symbol-size: var(--mush-icon-symbol-size, 0.667em); +`,jf=l` + /* RGB */ + /* Standard colors */ + --rgb-red: var(--mush-rgb-red, var(--default-red)); + --rgb-pink: var(--mush-rgb-pink, var(--default-pink)); + --rgb-purple: var(--mush-rgb-purple, var(--default-purple)); + --rgb-deep-purple: var(--mush-rgb-deep-purple, var(--default-deep-purple)); + --rgb-indigo: var(--mush-rgb-indigo, var(--default-indigo)); + --rgb-blue: var(--mush-rgb-blue, var(--default-blue)); + --rgb-light-blue: var(--mush-rgb-light-blue, var(--default-light-blue)); + --rgb-cyan: var(--mush-rgb-cyan, var(--default-cyan)); + --rgb-teal: var(--mush-rgb-teal, var(--default-teal)); + --rgb-green: var(--mush-rgb-green, var(--default-green)); + --rgb-light-green: var(--mush-rgb-light-green, var(--default-light-green)); + --rgb-lime: var(--mush-rgb-lime, var(--default-lime)); + --rgb-yellow: var(--mush-rgb-yellow, var(--default-yellow)); + --rgb-amber: var(--mush-rgb-amber, var(--default-amber)); + --rgb-orange: var(--mush-rgb-orange, var(--default-orange)); + --rgb-deep-orange: var(--mush-rgb-deep-orange, var(--default-deep-orange)); + --rgb-brown: var(--mush-rgb-brown, var(--default-brown)); + --rgb-light-grey: var(--mush-rgb-light-grey, var(--default-light-grey)); + --rgb-grey: var(--mush-rgb-grey, var(--default-grey)); + --rgb-dark-grey: var(--mush-rgb-dark-grey, var(--default-dark-grey)); + --rgb-blue-grey: var(--mush-rgb-blue-grey, var(--default-blue-grey)); + --rgb-black: var(--mush-rgb-black, var(--default-black)); + --rgb-white: var(--mush-rgb-white, var(--default-white)); + --rgb-disabled: var(--mush-rgb-disabled, var(--default-disabled)); + + /* Action colors */ + --rgb-info: var(--mush-rgb-info, var(--rgb-blue)); + --rgb-success: var(--mush-rgb-success, var(--rgb-green)); + --rgb-warning: var(--mush-rgb-warning, var(--rgb-orange)); + --rgb-danger: var(--mush-rgb-danger, var(--rgb-red)); + + /* State colors */ + --rgb-state-vacuum: var(--mush-rgb-state-vacuum, var(--rgb-teal)); + --rgb-state-fan: var(--mush-rgb-state-fan, var(--rgb-green)); + --rgb-state-light: var(--mush-rgb-state-light, var(--rgb-orange)); + --rgb-state-entity: var(--mush-rgb-state-entity, var(--rgb-blue)); + --rgb-state-media-player: var( + --mush-rgb-state-media-player, + var(--rgb-indigo) + ); + --rgb-state-lock: var(--mush-rgb-state-lock, var(--rgb-blue)); + --rgb-state-number: var(--mush-rgb-state-number, var(--rgb-blue)); + --rgb-state-humidifier: var(--mush-rgb-state-humidifier, var(--rgb-purple)); + + /* State alarm colors */ + --rgb-state-alarm-disarmed: var( + --mush-rgb-state-alarm-disarmed, + var(--rgb-info) + ); + --rgb-state-alarm-armed: var( + --mush-rgb-state-alarm-armed, + var(--rgb-success) + ); + --rgb-state-alarm-triggered: var( + --mush-rgb-state-alarm-triggered, + var(--rgb-danger) + ); + + /* State person colors */ + --rgb-state-person-home: var( + --mush-rgb-state-person-home, + var(--rgb-success) + ); + --rgb-state-person-not-home: var( + --mush-rgb-state-person-not-home, + var(--rgb-danger) + ); + --rgb-state-person-zone: var(--mush-rgb-state-person-zone, var(--rgb-info)); + --rgb-state-person-unknown: var( + --mush-rgb-state-person-unknown, + var(--rgb-grey) + ); + + /* State update colors */ + --rgb-state-update-on: var(--mush-rgb-state-update-on, var(--rgb-orange)); + --rgb-state-update-off: var(--mush-rgb-update-off, var(--rgb-green)); + --rgb-state-update-installing: var( + --mush-rgb-update-installing, + var(--rgb-blue) + ); + + /* State lock colors */ + --rgb-state-lock-locked: var(--mush-rgb-state-lock-locked, var(--rgb-green)); + --rgb-state-lock-unlocked: var( + --mush-rgb-state-lock-unlocked, + var(--rgb-red) + ); + --rgb-state-lock-pending: var( + --mush-rgb-state-lock-pending, + var(--rgb-orange) + ); + + /* State cover colors */ + --rgb-state-cover-open: var(--mush-rgb-state-cover-open, var(--rgb-blue)); + --rgb-state-cover-closed: var( + --mush-rgb-state-cover-closed, + var(--rgb-disabled) + ); + + /* State climate colors */ + --rgb-state-climate-auto: var( + --mush-rgb-state-climate-auto, + var(--rgb-green) + ); + --rgb-state-climate-cool: var(--mush-rgb-state-climate-cool, var(--rgb-blue)); + --rgb-state-climate-dry: var(--mush-rgb-state-climate-dry, var(--rgb-orange)); + --rgb-state-climate-fan-only: var( + --mush-rgb-state-climate-fan-only, + var(--rgb-teal) + ); + --rgb-state-climate-heat: var( + --mush-rgb-state-climate-heat, + var(--rgb-deep-orange) + ); + --rgb-state-climate-heat-cool: var( + --mush-rgb-state-climate-heat-cool, + var(--rgb-green) + ); + --rgb-state-climate-idle: var( + --mush-rgb-state-climate-idle, + var(--rgb-disabled) + ); + --rgb-state-climate-off: var( + --mush-rgb-state-climate-off, + var(--rgb-disabled) + ); +`});function Vf(t){return!!t&&t.themes.darkMode}var Ff,Gf,Kf,Yf=kt(()=>{Vt(),Be(),Bc(),On(),Nn(),Rf(),Uf(),vn(),Hf=class extends Ot{updated(t){if(super.updated(t),t.has("hass")&&this.hass){const e=Vf(t.get("hass")),o=Vf(this.hass);e!==o&&this.toggleAttribute("dark-mode",o)}}static get styles(){return[En,l` + :host { + ${df} + } + :host([dark-mode]) { + ${pf} + } + :host { + ${jf} + ${Df} + } + `]}},gn([Gt({attribute:!1})],Hf.prototype,"hass",void 0)});function qf(t,e,o,i,n){switch(t){case"name":return e;case"state":const t=i.entity_id.split(".")[0];return"timestamp"!==i.attributes.device_class&&!Ff.includes(t)||!qo(i)||function(t){return t.state===Fo}(i)?o:J` + + `;case"last-changed":return J` + + `;case"last-updated":return J` + + `;case"none":return}}function Wf(t,e){return"entity-picture"===e?Xo(t):void 0}var Xf=kt(()=>{Vt(),Ff=["button","input_button","scene"],Gf=["name","state","last-changed","last-updated","none"],Kf=["icon","entity-picture","none"]});Vt(),Be(),je(),pn(),Oc(),bn(),Pn(),Bc(),On(),Bn(),Ln(),Yf(),Xf(),vn(),oe();var Zf=class extends Hf{get _stateObj(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity;return this.hass.states[t]}get hasControls(){return!1}setConfig(t){this._config=ee({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}getCardSize(){var t;let e=1;if(!this._config)return e;const o=Dn(this._config);return"vertical"===o.layout&&(e+=1),"horizontal"===(null==o?void 0:o.layout)||!this.hasControls||"collapsible_controls"in this._config&&(null===(t=this._config)||void 0===t?void 0:t.collapsible_controls)||(e+=1),e}getLayoutOptions(){if(!this._config)return{grid_columns:2,grid_rows:1};const t={grid_columns:2,grid_rows:0},e=Dn(this._config),o="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),i="none"!==e.primary_info||"none"!==e.secondary_info,n="none"!==e.icon_type,r=this._stateObj&&Yo(this._stateObj),a=this.hasControls&&(!o||r);return"vertical"===e.layout&&(n&&(t.grid_rows+=1),i&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),"horizontal"===e.layout&&(t.grid_rows=1,t.grid_columns=4),"default"===e.layout&&((i||n)&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),a||i||(t.grid_columns=1,t.grid_rows=1),t.grid_rows=Math.max(t.grid_rows,1),t}getGridOptions(){if(!this._config)return{columns:6,rows:1};const t={min_rows:1,min_columns:4,columns:6,rows:0},e=Dn(this._config),o="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),i="none"!==e.primary_info||"none"!==e.secondary_info,n="none"!==e.icon_type,r=this._stateObj&&Yo(this._stateObj),a=this.hasControls&&(!o||r);return"vertical"===e.layout&&(n&&(t.rows+=1),i&&(t.rows+=1),a&&(t.rows+=1),t.min_columns=2),"horizontal"===e.layout&&(t.rows=1,t.columns=12),"default"===e.layout&&((i||n)&&(t.rows+=1),a&&(t.rows+=1)),a||i||(t.columns=3,t.rows=1,t.min_columns=2),t.rows=Math.max(t.rows,1),t.min_rows=t.rows,t}renderPicture(t){return J` + + `}renderNotFound(t){const e=Dn(t),o=zo(this.hass),i=ic(this.hass);return J` + + + + + + + + + + + + `}renderIcon(t,e){return J` + + + `}renderBadge(t){return qo(t)?et:J` + + `}renderStateInfo(t,e,o,i){const n=this.hass.formatEntityState(t),r=null!=i?i:n;return J` + + `}};gn([ie()],Zf.prototype,"_config",void 0),gn([Gt({reflect:!0,type:String})],Zf.prototype,"layout",void 0),Vt();var Jf=l` + ha-card { + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: var(--layout-align); + height: auto; + display: flex; + flex-direction: column; + } + ha-card.fill-container { + height: 100%; + } + :host([layout="grid"]) ha-card { + height: 100%; + } + .actions { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-start; + overflow-x: auto; + overflow-y: hidden; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* IE 10+ */ + padding: var(--control-spacing); + padding-top: 0; + box-sizing: border-box; + gap: var(--control-spacing); + } + .actions::-webkit-scrollbar { + background: transparent; /* Chrome/Safari/Webkit */ + height: 0px; + } + .unavailable { + --main-color: rgb(var(--rgb-warning)); + } + .not-found { + --main-color: rgb(var(--rgb-danger)); + } + mushroom-state-item[disabled] { + cursor: initial; + } +`;function Qf(t,e,o){return ge(t.config.version,2026,4)?t.formatEntityName(e,o):"string"==typeof o?o:e.attributes.friendly_name||""}function tg(t){const o=window;o.customCards=o.customCards||[];const i=t.type.replace("-card","").replace("mushroom-","");o.customCards.push(ee(ee({},t),{},{preview:!0,documentationURL:`${e.url}/blob/main/docs/cards/${i}.md`}))}pn();var eg,og,ig,ng,rg,ag,sg,lg,cg=kt(()=>{oe()}),ug=kt(()=>{eg="mushroom"}),hg=kt(()=>{ug(),ig=`${og=`${eg}-alarm-control-panel-card`}-editor`,ng=["alarm_control_panel"],rg={disarmed:"var(--rgb-state-alarm-disarmed)",armed:"var(--rgb-state-alarm-armed)",triggered:"var(--rgb-state-alarm-triggered)",unavailable:"var(--rgb-warning)"},ag="var(--rgb-grey)"});function dg(t){var e;return null!==(e=rg[t.split("_")[0]])&&void 0!==e?e:ag}function pg(t){return["arming","triggered","pending",Vo].indexOf(t)>=0}cg(),pn(),hg();var mg,fg,gg,_g=kt(()=>{To(),pn(),sg=Co({tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),lg=t=>[{name:"tap_action",selector:{ui_action:{actions:t}}},{name:"hold_action",selector:{ui_action:{actions:t}}},{name:"double_tap_action",selector:{ui_action:{actions:t}}}]}),vg=kt(()=>{To(),mg=["default","horizontal","vertical"],fg=Ao([wo("horizontal"),wo("vertical"),wo("default")])});function bg(t){return t.charAt(0).toUpperCase()+t.slice(1)}function yg(t){return Gf.map(e=>({value:e,label:t(`editor.form.info_picker.values.${e}`)||bg(e)}))}function wg(t){return Kf.map(e=>({value:e,label:t(`editor.form.icon_type_picker.values.${e}`)||bg(e)}))}function kg(t){return["start","center","end","justify"].map(e=>({value:e,label:t(`editor.form.alignment_picker.values.${e}`)}))}function Cg(t){return mg.map(e=>({value:e,label:t(`editor.form.layout_picker.values.${e}`)}))}function $g(t){return[{type:"grid",name:"",schema:[{name:"layout",selector:{select:{options:Cg(t),mode:"dropdown"}}},{name:"fill_container",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{name:"secondary_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{name:"icon_type",selector:{select:{options:wg(t),mode:"dropdown"}}}]}]}var Eg,xg,Ag,Sg,Tg,Mg,Ig,zg,Pg,Ng,Og,Bg,Lg,Dg,jg=kt(()=>{To(),Xf(),vg(),gg=Co({layout:$o(fg),fill_container:$o(bo()),primary_info:$o(yo(Gf)),secondary_info:$o(yo(Gf)),icon_type:$o(yo(Kf))})}),Hg=kt(()=>{Eg=["color","icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation","picture"],xg=["picture"]}),Rg=kt(()=>{pn(),Ag=t=>ge(t,2026,4)?{name:"name",selector:{entity_name:{}},context:{entity:"entity"}}:{name:"name",selector:{text:{}}}}),Ug=kt(()=>{Sg=()=>{var t,e,o;customElements.get("ha-form")&&customElements.get("hui-card-features-editor")||(null===(t=customElements.get("hui-tile-card"))||void 0===t||t.getConfigElement());customElements.get("ha-entity-picker")||(null===(e=customElements.get("hui-entities-card"))||void 0===e||e.getConfigElement());customElements.get("ha-card-conditions-editor")||(null===(o=customElements.get("hui-conditional-card"))||void 0===o||o.getConfigElement())},Tg=async t=>{let e=customElements.get(t);return e||(await customElements.whenDefined(t),customElements.get(t))}}),Vg=kt(()=>{To(),Mg=Ao([Co({type:yo(["entity","device","area","floor"])}),Co({type:wo("text"),text:Eo()})]),Ig=Ao([Eo(),Mg,vo(Mg)]),zg=Co({entity:$o(Eo()),name:$o(Ig),icon:$o(Eo())})}),Fg=kt(()=>{To(),Pg=Co({index:$o(ko()),view_index:$o(ko()),view_layout:_o(),type:Eo(),layout_options:_o(),grid_options:_o(),visibility:_o()})}),Gg=kt(()=>{To(),_g(),jg(),Vg(),Fg(),Ng=mo(Pg,mo(zg,gg,sg),Co({states:$o(vo())}))}),Kg=/* @__PURE__ */$t({SwitchCardEditor:()=>Dg}),Yg=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),Gg(),hg(),vn(),Og=["more-info","navigate","url","perform-action","assist","none"],Bg=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],Lg=vi((t,e,o)=>[{name:"entity",selector:{entity:{domain:ng}}},Ag(o),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(e),{type:"multi_select",name:"states",options:Bg.map(e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)])},...lg(Og)]),Dg=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):"states"===t.name?this.hass.localize("ui.panel.lovelace.editor.card.alarm-panel.available_states"):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,Ng),this._config=t}render(){if(!this.hass||!this._config)return et;const t=ic(this.hass),e=Lg(this.hass.localize,t,this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],Dg.prototype,"_config",void 0),Dg=gn([Lt(ig)],Dg)});Vt(),Be(),je(),pn(),bn(),Pn(),On(),Bn(),Ln(),Xf(),hg(),vn(),tg({type:og,name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});var qg=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(Yg(),Kg)),document.createElement(ig)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>ng.includes(t.split(".")[0]));return{type:`custom:${og}`,entity:e[0],states:["armed_home","armed_away"]}}get hasControls(){var t;return Boolean(null===(t=this._config)||void 0===t||null===(t=t.states)||void 0===t?void 0:t.length)}_onTap(t,e){t.stopPropagation(),(async(t,e,o,i)=>{const{service:n}=fn[i];let r;if("disarmed"!==i&&o.attributes.code_arm_required||"disarmed"===i&&o.attributes.code_format){var a;const n=await((t,e)=>t.callWS({type:"config/entity_registry/get",entity_id:e}))(e,o.entity_id).catch(()=>{});if(!(null==n||null===(a=n.options)||void 0===a||null===(a=a.alarm_control_panel)||void 0===a?void 0:a.default_code)){const n="disarmed"===i,a=await(await window.loadCardHelpers()).showEnterCodeDialog(t,{codeFormat:o.attributes.code_format,title:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm")),submitText:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm"))});if(null==a)throw new Error("Code dialog closed");r=a}}await e.callService("alarm_control_panel",n,{entity_id:o.entity_id,code:r})})(this,this.hass,this._stateObj,e)}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(t)?this._config.states.map(t=>({mode:t})):[{mode:"disarmed"}]:[],a=function(t){return Vo!==t.state}(t),s=zo(this.hass);return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e)}; + + ${r.length>0?J` +
+ + ${r.map(t=>J` + this._onTap(e,t.mode)} + .disabled=${!a} + > + + + + `)} + +
+ `:et} +
+
+ `}renderIcon(t,e){const o=dg(t.state),i=pg(t.state);return J` + + + + `}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon.pulse { + --shape-animation: 1s ease 0s infinite normal none running pulse; + } + `]}};qg=gn([Lt(og)],qg),Vt(),Be(),Nn(),vn();var Wg,Xg=class extends Ot{constructor(...t){super(...t),this.icon="",this.label="",this.avatar="",this.avatarOnly=!1}render(){return J` + + ${this.avatar?J` `:et} + ${this.avatarOnly?et:J` +
+ +
+ `} +
+ `}static get styles(){return[En,l` + :host { + --icon-color: var(--primary-text-color); + --text-color: var(--primary-text-color); + } + ha-card { + box-sizing: border-box; + height: var(--chip-height); + min-width: var(--chip-height); + font-size: var(--chip-height); + width: auto; + border-radius: var(--chip-border-radius); + display: flex; + flex-direction: row; + align-items: center; + background: var(--chip-background); + border-width: var(--chip-border-width); + border-color: var(--chip-border-color); + box-shadow: var(--chip-box-shadow); + box-sizing: content-box; + } + .avatar { + --avatar-size: calc( + var(--chip-height) - 2 * var(--chip-avatar-padding) + ); + border-radius: var(--chip-avatar-border-radius); + height: var(--avatar-size); + width: var(--avatar-size); + margin-left: var(--chip-avatar-padding); + box-sizing: border-box; + object-fit: cover; + } + :host([rtl]) .avatar { + margin-left: initial; + margin-right: var(--chip-avatar-padding); + } + .content { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + height: 100%; + padding: var(--chip-padding); + line-height: 0; + } + ::slotted(ha-icon), + ::slotted(ha-state-icon) { + display: flex; + line-height: 0; + --mdc-icon-size: var(--chip-icon-size); + color: var(--icon-color); + } + ::slotted(svg) { + width: var(--chip-icon-size); + height: var(--chip-icon-size); + display: flex; + } + ::slotted(span) { + font-weight: var(--chip-font-weight); + font-size: var(--chip-font-size); + line-height: 1; + color: var(--text-color); + } + ::slotted(*:not(:last-child)) { + margin-right: 0.15em; + } + :host([rtl]) ::slotted(*:not(:last-child)) { + margin-right: initial; + margin-left: 0.15em; + } + `]}};function Zg(t){return`${eg}-${t}-chip`}function Jg(t){return`${eg}-${t}-chip-editor`}gn([Gt()],Xg.prototype,"icon",void 0),gn([Gt()],Xg.prototype,"label",void 0),gn([Gt()],Xg.prototype,"avatar",void 0),gn([Gt()],Xg.prototype,"avatarOnly",void 0),Xg=gn([Lt("mushroom-chip")],Xg);var Qg,t_,e_=kt(()=>{ug(),Wg=t=>{try{const e=Zg(t.type);if(customElements.get(e)){const o=document.createElement(e,t);return o.setConfig(t),o}const o=document.createElement(e);return customElements.whenDefined(e).then(()=>{try{customElements.upgrade(o),o.setConfig(t)}catch(e){}}),o}catch(e){return void console.error(e)}}}),o_=/* @__PURE__ */$t({EntityChipEditor:()=>t_}),i_=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),jg(),Hg(),Rg(),e_(),vn(),Qg=vi((t,e)=>[{name:"entity",selector:{entity:{}}},Ag(e),{name:"content_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},{name:"use_entity_picture",selector:{boolean:{}}},...lg()]),t_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=Qg(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],t_.prototype,"hass",void 0),gn([ie()],t_.prototype,"_config",void 0),t_=gn([Lt(Jg("entity"))],t_)});Vt(),Be(),je(),Re(),pn(),Rf(),Xf(),e_(),vn();var n_,r_,a_,s_,l_,c_,u_,h_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(i_(),o_)),document.createElement(Jg("entity"))}static async getStubConfig(t){return{type:"entity",entity:Object.keys(t.states)[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return et;const e=this._config.entity,o=this.hass.states[e];if(!o)return et;const i=Qf(this.hass,o,this._config.name),n=this._config.icon,r=this._config.icon_color,a=this._config.use_entity_picture?Xo(o):void 0,s=this.hass.formatEntityState(o),l=Yo(o),c=qf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,s,o,this.hass);return J` + + ${a?et:this.renderIcon(o,n,r,l)} + ${c?J`${c}`:et} + + `}renderIcon(t,e,o,i){const n={};return o&&(n["--color"]=`rgb(${Lf(o)})`),J` + + `}static get styles(){return l` + mushroom-chip { + cursor: pointer; + } + ha-state-icon.active { + color: var(--color); + } + `}};gn([Gt({attribute:!1})],h_.prototype,"hass",void 0),gn([ie()],h_.prototype,"_config",void 0),h_=gn([Lt(Zg("entity"))],h_);var d_,p_,m_,f_,g_,__=kt(()=>{Vt(),n_=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),r_=new Set(["hail","rainy","pouring"]),a_=new Set(["windy","windy-variant"]),s_=new Set(["snowy","snowy-rainy"]),l_=new Set(["lightning","lightning-rainy"]),c_=l` + .rain { + fill: var(--weather-icon-rain-color, #30b3ff); + } + .sun { + fill: var(--weather-icon-sun-color, #fdd93c); + } + .moon { + fill: var(--weather-icon-moon-color, #fcf497); + } + .cloud-back { + fill: var(--weather-icon-cloud-back-color, #d4d4d4); + } + .cloud-front { + fill: var(--weather-icon-cloud-front-color, #f9f9f9); + } +`,u_=(t,e)=>Q` + + ${"sunny"===t?Q` + + `:""} + ${"clear-night"===t?Q` + + `:""} + ${"partlycloudy"===t&&e?Q` + + `:"partlycloudy"===t?Q` + + `:""} + ${n_.has(t)?Q` + + + `:""} + ${r_.has(t)?Q` + + + + + `:""} + ${"pouring"===t?Q` + + + `:""} + ${a_.has(t)?Q` + + + `:""} + ${s_.has(t)?Q` + + + + `:""} + ${l_.has(t)?Q` + + `:""} + `}),v_=/* @__PURE__ */$t({WeatherChipEditor:()=>g_}),b_=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),Hg(),e_(),vn(),d_=["weather"],p_=["show_conditions","show_temperature"],m_=["more-info","navigate","url","perform-action","assist","none"],f_=vi(()=>[{name:"entity",selector:{entity:{domain:d_}}},{type:"grid",name:"",schema:[{name:"show_conditions",selector:{boolean:{}}},{name:"show_temperature",selector:{boolean:{}}}]},...lg(m_)]),g_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):p_.includes(t.name)?e(`editor.card.weather.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=f_();return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],g_.prototype,"hass",void 0),gn([ie()],g_.prototype,"_config",void 0),g_=gn([Lt(Jg("weather"))],g_)});Vt(),Be(),pn(),e_(),__(),vn();var y_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(b_(),v_)),document.createElement(Jg("weather"))}static async getStubConfig(t){return{type:"weather",entity:Object.keys(t.states).filter(t=>"weather"===t.split(".")[0])[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._config.entity,e=this.hass.states[t];if(!e)return et;const o=u_(e.state,!0),i=[];if(this._config.show_conditions){const t=this.hass.formatEntityState(e);i.push(t)}if(this._config.show_temperature){const t=this.hass.formatEntityAttributeValue(e,"temperature");i.push(t)}return J` + + ${o} + ${i.length>0?J`${i.join(" ⸱ ")}`:et} + + `}static get styles(){return[c_,l` + mushroom-chip { + cursor: pointer; + } + `]}};gn([Gt({attribute:!1})],y_.prototype,"hass",void 0),gn([ie()],y_.prototype,"_config",void 0),y_=gn([Lt(Zg("weather"))],y_);var w_,k_,C_,$_,E_,x_,A_,S_,T_,M_,I_,z_,P_,N_,O_,B_,L_,D_,j_,H_,R_,U_,V_,F_,G_,K_,Y_,q_,W_,X_,Z_,J_=/* @__PURE__ */$t({BackChipEditor:()=>k_}),Q_=kt(()=>{Vt(),Be(),pn(),e_(),tv(),vn(),w_=[{name:"icon",selector:{icon:{placeholder:C_}}}],k_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],k_.prototype,"hass",void 0),gn([ie()],k_.prototype,"_config",void 0),k_=gn([Lt(Jg("back"))],k_)}),tv=kt(()=>{Vt(),Be(),pn(),e_(),vn(),C_="mdi:arrow-left",$_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Q_(),J_)),document.createElement(Jg("back"))}static async getStubConfig(t){return{type:"back"}}setConfig(t){this._config=t}_handleAction(){window.history.back()}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:arrow-left";return J` + + + + `}static get styles(){return l` + mushroom-chip { + cursor: pointer; + } + `}},gn([Gt({attribute:!1})],$_.prototype,"hass",void 0),gn([ie()],$_.prototype,"_config",void 0),$_=gn([Lt(Zg("back"))],$_)}),ev=/* @__PURE__ */$t({EntityChipEditor:()=>A_}),ov=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),Hg(),e_(),iv(),vn(),E_=["navigate","url","perform-action","assist","none"],x_=vi(()=>[{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:S_}}},{name:"icon_color",selector:{ui_color:{}}}]},...lg(E_)]),A_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=x_();return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],A_.prototype,"hass",void 0),gn([ie()],A_.prototype,"_config",void 0),A_=gn([Lt(Jg("action"))],A_)}),iv=kt(()=>{Vt(),Be(),Re(),pn(),Rf(),e_(),vn(),S_="mdi:flash",T_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(ov(),ev)),document.createElement(Jg("action"))}static async getStubConfig(t){return{type:"action"}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:flash",e=this._config.icon_color,o={};return e&&(o["--color"]=`rgb(${Lf(e)})`),J` + + + + `}static get styles(){return l` + mushroom-chip { + cursor: pointer; + } + ha-state-icon { + color: var(--color); + } + `}},gn([Gt({attribute:!1})],T_.prototype,"hass",void 0),gn([ie()],T_.prototype,"_config",void 0),T_=gn([Lt(Zg("action"))],T_)}),nv=/* @__PURE__ */$t({MenuChipEditor:()=>I_}),rv=kt(()=>{Vt(),Be(),pn(),e_(),av(),vn(),M_=[{name:"icon",selector:{icon:{placeholder:z_}}}],I_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],I_.prototype,"hass",void 0),gn([ie()],I_.prototype,"_config",void 0),I_=gn([Lt(Jg("menu"))],I_)}),av=kt(()=>{Vt(),Be(),pn(),e_(),vn(),z_="mdi:menu",P_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(rv(),nv)),document.createElement(Jg("menu"))}static async getStubConfig(t){return{type:"menu"}}setConfig(t){this._config=t}_handleAction(){ve(this,"hass-toggle-menu")}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:menu";return J` + + + + `}static get styles(){return l` + mushroom-chip { + cursor: pointer; + } + `}},gn([Gt({attribute:!1})],P_.prototype,"hass",void 0),gn([ie()],P_.prototype,"_config",void 0),P_=gn([Lt(Zg("menu"))],P_)}),sv=kt(()=>{N_=/* @__PURE__ */function(t){return t.Command="command",t.Device="device",t.Entity="entity",t}({}),O_=["action","alarm-control-panel","back","conditional","entity","light","menu","quickbar","spacer","template","weather"]}),lv=/* @__PURE__ */$t({QuickBarChipEditor:()=>L_}),cv=kt(()=>{Vt(),Be(),pn(),e_(),sv(),uv(),vn(),B_=[{name:"icon",selector:{icon:{placeholder:D_}}},{name:"mode",selector:{select:{options:[{value:N_.Entity,label:"Entity"},{value:N_.Device,label:"Device"},{value:N_.Command,label:"Command"}]}}}],L_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],L_.prototype,"hass",void 0),gn([ie()],L_.prototype,"_config",void 0),L_=gn([Lt(Jg("quickbar"))],L_)}),uv=kt(()=>{Vt(),Be(),pn(),e_(),sv(),vn(),D_="mdi:magnify",j_=N_.Entity,H_=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(cv(),lv)),document.createElement(Jg("quickbar"))}static async getStubConfig(t){return{type:"quickbar"}}setConfig(t){this._config=t}_handleAction(){if(!this.hass||!this._config)return;let t;switch(this._config.mode||j_){case N_.Command:t="c";break;case N_.Device:t="d";break;case N_.Entity:t="e"}const e=new KeyboardEvent("keydown",{bubbles:!0,composed:!0,key:t});this.dispatchEvent(e)}render(){if(!this.hass||!this._config)return et;const t=this._config.icon||"mdi:magnify";return J` + + + + `}static get styles(){return l` + mushroom-chip { + cursor: pointer; + } + `}},gn([Gt({attribute:!1})],H_.prototype,"hass",void 0),gn([ie()],H_.prototype,"_config",void 0),H_=gn([Lt(Zg("quickbar"))],H_)}),hv=/* @__PURE__ */Ct((t,e)=>{!function(o){var i;"object"==typeof t?e.exports=o():"function"==typeof define&&define.amd?define(o):("undefined"!=typeof window?i=window:"undefined"!=typeof global?i=global:"undefined"!=typeof self&&(i=self),i.objectHash=o())}(function(){return function t(e,o,i){function n(a,s){if(!o[a]){if(!e[a]){var l="function"==typeof xt&&xt;if(!s&&l)return l(a,!0);if(r)return r(a,!0);throw new Error("Cannot find module '"+a+"'")}s=o[a]={exports:{}},e[a][0].call(s.exports,function(t){return n(e[a][1][t]||t)},s,s.exports,t,e,o,i)}return o[a].exports}for(var r="function"==typeof xt&&xt,a=0;a>16),l((65280&i)>>8),l(255&i);return 2==n?l(255&(i=c(t.charAt(o))<<2|c(t.charAt(o+1))>>4)):1==n&&(l((i=c(t.charAt(o))<<10|c(t.charAt(o+1))<<4|c(t.charAt(o+2))>>2)>>8&255),l(255&i)),r},t.fromByteArray=function(t){var e,o,i,n,r=t.length%3,a="";function s(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,i=t.length-r;e>18&63)+s(n>>12&63)+s(n>>6&63)+s(63&n);switch(r){case 1:a=(a+=s((o=t[t.length-1])>>2))+s(o<<4&63)+"==";break;case 2:a=(a=(a+=s((o=(t[t.length-2]<<8)+t[t.length-1])>>10))+s(o>>4&63))+s(o<<2&63)+"="}return a}}(void 0===o?this.base64js={}:o)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,o){(function(e,i,n,r,a,s,l,c,u){var h=t("base64-js"),d=t("ieee754");function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);var i,r,a,s,l=typeof t;if("base64"===e&&"string"==l)for(t=(s=t).trim?s.trim():s.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==l)i=A(t);else if("string"==l)i=n.byteLength(t,e);else{if("object"!=l)throw new Error("First argument needs to be a number, array or string.");i=A(t.length)}if(n._useTypedArrays?r=n._augment(new Uint8Array(i)):((r=this).length=i,r._isBuffer=!0),n._useTypedArrays&&"number"==typeof t.byteLength)r._set(t);else if(S(s=t)||n.isBuffer(s)||s&&"object"==typeof s&&"number"==typeof s.length)for(a=0;a>>0)):(e+1>>0),n}function f(t,e,o,i){if(i||(L("boolean"==typeof o,"missing or invalid endian"),L(null!=e,"missing offset"),L(e+1>>8*(i?r:1-r)}function y(t,e,o,i,n){if(n||(L(null!=e,"missing value"),L("boolean"==typeof i,"missing or invalid endian"),L(null!=o,"missing offset"),L(o+3>>8*(i?r:3-r)&255}function w(t,e,o,i,n){n||(L(null!=e,"missing value"),L("boolean"==typeof i,"missing or invalid endian"),L(null!=o,"missing offset"),L(o+1>8,o%=256,i.push(o),i.push(e);return i}(e),t,o,i)}(this,t,e,o);break;default:throw new Error("Unknown encoding")}return r},n.prototype.toString=function(t,e,o){var i,n,r,a,s=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(o=void 0!==o?Number(o):s.length)===e)return"";switch(t){case"hex":i=function(t,e,o){var i=t.length;(!e||e<0)&&(e=0),(!o||o<0||ithis.length&&(i=this.length);var r=(i=t.length-e=this.length))return this[t]},n.prototype.readUInt16LE=function(t,e){return p(this,t,!0,e)},n.prototype.readUInt16BE=function(t,e){return p(this,t,!1,e)},n.prototype.readUInt32LE=function(t,e){return m(this,t,!0,e)},n.prototype.readUInt32BE=function(t,e){return m(this,t,!1,e)},n.prototype.readInt8=function(t,e){if(e||(L(null!=t,"missing offset"),L(t=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,e){return f(this,t,!0,e)},n.prototype.readInt16BE=function(t,e){return f(this,t,!1,e)},n.prototype.readInt32LE=function(t,e){return g(this,t,!0,e)},n.prototype.readInt32BE=function(t,e){return g(this,t,!1,e)},n.prototype.readFloatLE=function(t,e){return _(this,t,!0,e)},n.prototype.readFloatBE=function(t,e){return _(this,t,!1,e)},n.prototype.readDoubleLE=function(t,e){return v(this,t,!0,e)},n.prototype.readDoubleBE=function(t,e){return v(this,t,!1,e)},n.prototype.writeUInt8=function(t,e,o){o||(L(null!=t,"missing value"),L(null!=e,"missing offset"),L(e=this.length||(this[e]=t)},n.prototype.writeUInt16LE=function(t,e,o){b(this,t,e,!0,o)},n.prototype.writeUInt16BE=function(t,e,o){b(this,t,e,!1,o)},n.prototype.writeUInt32LE=function(t,e,o){y(this,t,e,!0,o)},n.prototype.writeUInt32BE=function(t,e,o){y(this,t,e,!1,o)},n.prototype.writeInt8=function(t,e,o){o||(L(null!=t,"missing value"),L(null!=e,"missing offset"),L(e=this.length||(0<=t?this.writeUInt8(t,e,o):this.writeUInt8(255+t+1,e,o))},n.prototype.writeInt16LE=function(t,e,o){w(this,t,e,!0,o)},n.prototype.writeInt16BE=function(t,e,o){w(this,t,e,!1,o)},n.prototype.writeInt32LE=function(t,e,o){k(this,t,e,!0,o)},n.prototype.writeInt32BE=function(t,e,o){k(this,t,e,!1,o)},n.prototype.writeFloatLE=function(t,e,o){C(this,t,e,!0,o)},n.prototype.writeFloatBE=function(t,e,o){C(this,t,e,!1,o)},n.prototype.writeDoubleLE=function(t,e,o){$(this,t,e,!0,o)},n.prototype.writeDoubleBE=function(t,e,o){$(this,t,e,!1,o)},n.prototype.fill=function(t,e,o){if(e=e||0,o=o||this.length,L("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),L(e<=o,"end < start"),o!==e&&0!==this.length){L(0<=e&&e"},n.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(n._useTypedArrays)return new n(this).buffer;for(var t=new Uint8Array(this.length),e=0,o=t.length;e=e.length||n>=t.length);n++)e[n+o]=t[n];return n}function P(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function N(t,e){L("number"==typeof t,"cannot write a non-number as a number"),L(0<=t,"specified a negative value for writing an unsigned value"),L(t<=e,"value is larger than maximum value for type"),L(Math.floor(t)===t,"value has a fractional component")}function O(t,e,o){L("number"==typeof t,"cannot write a non-number as a number"),L(t<=e,"value larger than maximum allowed value"),L(o<=t,"value smaller than minimum allowed value"),L(Math.floor(t)===t,"value has a fractional component")}function B(t,e,o){L("number"==typeof t,"cannot write a non-number as a number"),L(t<=e,"value larger than maximum allowed value"),L(o<=t,"value smaller than minimum allowed value")}function L(t,e){if(!t)throw new Error(e||"Failed assertion")}n._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=E.get,t.set=E.set,t.write=E.write,t.toString=E.toString,t.toLocaleString=E.toString,t.toJSON=E.toJSON,t.copy=E.copy,t.slice=E.slice,t.readUInt8=E.readUInt8,t.readUInt16LE=E.readUInt16LE,t.readUInt16BE=E.readUInt16BE,t.readUInt32LE=E.readUInt32LE,t.readUInt32BE=E.readUInt32BE,t.readInt8=E.readInt8,t.readInt16LE=E.readInt16LE,t.readInt16BE=E.readInt16BE,t.readInt32LE=E.readInt32LE,t.readInt32BE=E.readInt32BE,t.readFloatLE=E.readFloatLE,t.readFloatBE=E.readFloatBE,t.readDoubleLE=E.readDoubleLE,t.readDoubleBE=E.readDoubleBE,t.writeUInt8=E.writeUInt8,t.writeUInt16LE=E.writeUInt16LE,t.writeUInt16BE=E.writeUInt16BE,t.writeUInt32LE=E.writeUInt32LE,t.writeUInt32BE=E.writeUInt32BE,t.writeInt8=E.writeInt8,t.writeInt16LE=E.writeInt16LE,t.writeInt16BE=E.writeInt16BE,t.writeInt32LE=E.writeInt32LE,t.writeInt32BE=E.writeInt32BE,t.writeFloatLE=E.writeFloatLE,t.writeFloatBE=E.writeFloatBE,t.writeDoubleLE=E.writeDoubleLE,t.writeDoubleBE=E.writeDoubleBE,t.fill=E.fill,t.inspect=E.inspect,t.toArrayBuffer=E.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){n=t("buffer").Buffer;var h=new n(4);h.fill(0),e.exports={hash:function(t,e,o,i){for(var r=e(function(t,e){t.length%4!=0&&(o=t.length+(4-t.length%4),t=n.concat([t,h],o));for(var o,i=[],r=e?t.readInt32BE:t.readInt32LE,a=0;af?e=t(e):e.length>5]|=128<>>9<<4)]=e;for(var o=1732584193,i=-271733879,n=-1732584194,r=271733878,a=0;a>>32-n,o)}function m(t,e,o,i,n,r,a){return p(e&o|~e&i,t,e,n,r,a)}function f(t,e,o,i,n,r,a){return p(e&i|o&~i,t,e,n,r,a)}function g(t,e,o,i,n,r,a){return p(e^o^i,t,e,n,r,a)}function _(t,e,o,i,n,r,a){return p(o^(e|~i),t,e,n,r,a)}function v(t,e){var o=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(o>>16)<<16|65535&o}e.exports=function(t){return h.hash(t,d,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(t,e,o){(function(t,o,i,n,r,a,s,l,c){e.exports=function(t){for(var e,o=new Array(t),i=0;i>>((3&i)<<3)&255;return o}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){var h=t("./helpers");function d(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var o,i,n,r=Array(80),a=1732584193,s=-271733879,l=-1732584194,c=271733878,u=-1009589776,h=0;h>16)+(e>>16)+(o>>16)<<16|65535&o}function m(t,e){return t<>>32-e}e.exports=function(t){return h.hash(t,d,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(t,e,o){(function(o,i,n,r,a,s,l,c,u){function h(t,e){var o=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(o>>16)<<16|65535&o}function d(t,e){var o,i=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),n=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),r=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var a,s,l=0;l>>e|t<<32-e},f=function(t,e){return t>>>e};e.exports=function(t){return p.hash(t,d,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(t,e,o){(function(t,e,i,n,r,a,s,l,c){o.read=function(t,e,o,i,n){var r,a,s=8*n-i-1,l=(1<>1,u=-7,h=o?n-1:0,d=o?-1:1;n=t[e+h];for(h+=d,r=n&(1<<-u)-1,n>>=-u,u+=s;0>=-u,u+=i;0>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:r-1,p=i?1:-1;r=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(i=Math.pow(2,-a))<1&&(a--,i*=2),2<=(e+=1<=a+u?h/i:h*Math.pow(2,1-u))*i&&(a++,i/=2),c<=a+u?(s=0,a=c):1<=a+u?(s=(e*i-1)*Math.pow(2,n),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,n),a=0));8<=n;t[o+d]=255&s,d+=p,s/=256,n-=8);for(a=a<{R_=class{constructor(t){this._cache=/* @__PURE__ */new Map,this._expiration=t}get(t){return this._cache.get(t)}set(t,e){this._cache.set(t,e),this._expiration&&window.setTimeout(()=>this._cache.delete(t),this._expiration)}has(t){return this._cache.has(t)}}}),pv=kt(()=>{__(),U_=new Set(["clear-night","cloudy","fog","lightning","lightning-rainy","partlycloudy","pouring","rainy","hail","snowy","snowy-rainy","sunny","windy","windy-variant"]),V_=t=>{if(!t||!t.startsWith("weather-"))return;const e=t.replace("weather-","");return U_.has(e)?u_(e,!0):void 0}}),mv=kt(()=>{ug(),G_=`${F_=`${eg}-legacy-template-card`}-editor`}),fv=kt(()=>{To(),_g(),jg(),Fg(),K_=mo(Pg,mo(gg,sg),Co({entity:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),primary:$o(Eo()),secondary:$o(Eo()),badge_icon:$o(Eo()),badge_color:$o(Eo()),picture:$o(Eo()),multiline_secondary:$o(bo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}))}),gv=/* @__PURE__ */$t({TEMPLATE_LABELS:()=>Y_,TemplateCardEditor:()=>W_}),_v=kt(()=>{Vt(),Be(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Ug(),mv(),fv(),vn(),Y_=["badge_icon","badge_color","content","primary","secondary","multiline_secondary","picture"],q_=t=>[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"primary",selector:{template:{}}},{name:"secondary",selector:{template:{}}},{name:"badge_icon",selector:{template:{}}},{name:"badge_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{type:"grid",name:"",schema:[{name:"layout",selector:{select:{options:Cg(t),mode:"dropdown"}}},{name:"fill_container",selector:{boolean:{}}},{name:"multiline_secondary",selector:{boolean:{}}}]},...lg()],W_=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")}`:Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):Y_.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{const e=ic(this.hass);if("entity"===t.name)return e("editor.card.template.entity_helper_legacy")}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,K_),this._config=t}render(){if(!this.hass||!this._config)return et;const t=q_(ic(this.hass));return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],W_.prototype,"_config",void 0),W_=gn([Lt(G_)],W_)}),vv=/* @__PURE__ */$t({EntityChipEditor:()=>Z_}),bv=kt(()=>{Vt(),Be(),pn(),Oc(),_g(),Hg(),e_(),_v(),vn(),X_=[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{name:"content",selector:{template:{}}},...lg()],Z_=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_helper")})`:Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):Y_.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){return this.hass&&this._config?J` + + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],Z_.prototype,"hass",void 0),gn([ie()],Z_.prototype,"_config",void 0),Z_=gn([Lt(Jg("template"))],Z_)});Vt(),Be(),Re();var yv=/* @__PURE__ */Et(hv());pn(),dv(),Rf(),pv(),e_(),__(),vn(),oe();var wv,kv,Cv,$v,Ev,xv,Av,Sv,Tv,Mv,Iv,zv,Pv,Nv,Ov,Bv,Lv,Dv,jv,Hv,Rv,Uv,Vv,Fv,Gv,Kv,Yv,qv,Wv,Xv,Zv,Jv,Qv,tb,eb,ob,ib,nb,rb,ab,sb,lb,cb,ub,hb,db,pb,mb,fb,gb,_b,vb,bb,yb,wb,kb,Cb,$b,Eb,xb,Ab,Sb,Tb,Mb,Ib,zb,Pb,Nb,Ob,Bb,Lb,Db,jb,Hb,Rb,Ub,Vb,Fb,Gb,Kb,Yb,qb,Wb,Xb,Zb,Jb,Qb,ty,ey,oy,iy=new R_(1e3),ny=["content","icon","icon_color","picture"],ry=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(bv(),vv)),document.createElement(Jg("template"))}static async getStubConfig(t){return{type:"template"}}setConfig(t){ny.forEach(e=>{var o,i;(null===(o=this._config)||void 0===o?void 0:o[e])===t[e]&&(null===(i=this._config)||void 0===i?void 0:i.entity)==t.entity||this._tryDisconnectKey(e)}),this._config=ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();iy.set(t,this._templateResults)}}_computeCacheKey(){return(0,yv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();iy.has(t)?this._templateResults=iy.get(t):this._templateResults={}}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}render(){if(!this.hass||!this._config)return et;const t=this.getValue("icon"),e=this.getValue("icon_color"),o=this.getValue("content"),i=this.getValue("picture"),n=zo(this.hass),r=V_(t);return J` + + ${i?et:r||(t?this.renderIcon(t,e):et)} + ${o?this.renderContent(o):et} + + `}renderIcon(t,e){const o={};return e&&(o["--color"]=`rgb(${Lf(e)})`),J``}renderContent(t){return J`${t}`}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;ny.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;ny.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}static get styles(){return l` + mushroom-chip { + cursor: pointer; + } + ha-state-icon { + color: var(--color); + } + ${c_} + `}};function ay(t){return null==t}function sy(t){return"object"==typeof t&&null!==t}function ly(t){return Array.isArray(t)?t:ay(t)?[]:[t]}function cy(t,e){var o,i,n,r;if(e)for(o=0,i=(r=Object.keys(e)).length;os&&(e=i-s+(r=" ... ").length),o-i>s&&(o=i+s-(a=" ...").length),{str:r+t.slice(e,o).replace(/\t/g,"→")+a,pos:i-e+r.length}}function fy(t,e){return wv.repeat(" ",e-t.length)+t}function gy(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var o,i=/\r?\n|\r|\0/g,n=[0],r=[],a=-1;o=i.exec(t.buffer);)r.push(o.index),n.push(o.index+o[0].length),t.position<=o.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,r.length).toString().length,h=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=my(t.buffer,n[a-s],r[a-s],t.position-(n[a]-n[a-s]),h),c=wv.repeat(" ",e.indent)+fy((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=my(t.buffer,n[a],r[a],t.position,h),c+=wv.repeat(" ",e.indent)+fy((t.line+1).toString(),u)+" | "+l.str+"\n",c+=wv.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=r.length);s++)l=my(t.buffer,n[a+s],r[a+s],t.position-(n[a]-n[a+s]),h),c+=wv.repeat(" ",e.indent)+fy((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}function _y(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===$v.indexOf(e))throw new kv('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach(function(o){t[o].forEach(function(t){e[String(t)]=o})}),e}(e.styleAliases||null),-1===Ev.indexOf(this.kind))throw new kv('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function vy(t,e){var o=[];return t[e].forEach(function(t){var e=o.length;o.forEach(function(o,i){o.tag===t.tag&&o.kind===t.kind&&o.multi===t.multi&&(e=i)}),o[e]=t}),o}function by(t){return this.extend(t)}function yy(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function wy(){return null}function ky(t){return null===t}function Cy(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function $y(t){return"true"===t||"True"===t||"TRUE"===t}function Ey(t){return"[object Boolean]"===Object.prototype.toString.call(t)}function xy(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Ay(t){return 48<=t&&t<=55}function Sy(t){return 48<=t&&t<=57}function Ty(t){if(null===t)return!1;var e,o=t.length,i=0,n=!1;if(!o)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===o)return!0;if("b"===(e=t[++i])){for(i++;i=0&&(e=e.slice(1)),".inf"===e?1===o?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:o*parseFloat(e,10)}function Ny(t,e){var o;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(wv.isNegativeZero(t))return"-0.0";return o=t.toString(10),Bv.test(o)?o.replace("e",".e"):o}function Oy(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||wv.isNegativeZero(t))}function By(t){return null!==t&&(null!==Hv.exec(t)||null!==Rv.exec(t))}function Ly(t){var e,o,i,n,r,a,s,l,c=0,u=null;if(null===(e=Hv.exec(t))&&(e=Rv.exec(t)),null===e)throw new Error("Date resolve error");if(o=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(o,i,n));if(r=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),l=new Date(Date.UTC(o,i,n,r,a,s,c)),u&&l.setTime(l.getTime()-u),l}function Dy(t){return t.toISOString()}function jy(t){return"<<"===t||null===t}function Hy(t){if(null===t)return!1;var e,o,i=0,n=t.length,r=Fv;for(o=0;o64)){if(e<0)return!1;i+=6}return i%8==0}function Ry(t){var e,o,i=t.replace(/[\r\n=]/g,""),n=i.length,r=Fv,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|r.indexOf(i.charAt(e));return 0===(o=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===o?(s.push(a>>10&255),s.push(a>>2&255)):12===o&&s.push(a>>4&255),new Uint8Array(s)}function Uy(t){var e,o,i="",n=0,r=t.length,a=Fv;for(e=0;e>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]),n=(n<<8)+t[e];return 0===(o=r%3)?(i+=a[n>>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]):2===o?(i+=a[n>>10&63],i+=a[n>>4&63],i+=a[n<<2&63],i+=a[64]):1===o&&(i+=a[n>>2&63],i+=a[n<<4&63],i+=a[64],i+=a[64]),i}function Vy(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function Fy(t){if(null===t)return!0;var e,o,i,n,r,a=[],s=t;for(e=0,o=s.length;e>10),56320+(t-65536&1023))}function aw(t,e,o){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[e]=o}function sw(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Qv,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function lw(t,e){var o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=Cv(o),new kv(e,o)}function cw(t,e){throw lw(t,e)}function uw(t,e){t.onWarning&&t.onWarning.call(null,lw(t,e))}function hw(t,e,o,i){var n,r,a,s;if(e1&&(t.result+=wv.repeat("\n",e-1))}function vw(t,e){var o,i,n=t.tag,r=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,cw(t,"tab characters must not be used in indentation")),45===i)&&Qy(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,fw(t,!0,-1)&&t.lineIndent<=e)a.push(null),i=t.input.charCodeAt(t.position);else if(o=t.line,ww(t,e,ib,!1,!0),a.push(t.result),fw(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===o||t.lineIndent>e)&&0!==i)cw(t,"bad indentation of a sequence entry");else if(t.lineIndente?m=1:t.lineIndent===e?m=0:t.lineIndente?m=1:t.lineIndent===e?m=0:t.lineIndente)&&(_&&(a=t.line,s=t.lineStart,l=t.position),ww(t,e,nb,!0,n)&&(_?f=t.result:g=t.result),_||(pw(t,d,p,m,f,g,a,s,l),m=f=g=null),fw(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===r||t.lineIndent>e)&&0!==c)cw(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===n?cw(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?cw(t,"repeat of an indentation width identifier"):(l=e+n-1,s=!0)}if(Jy(h)){do{h=t.input.charCodeAt(++t.position)}while(Jy(h));if(35===h)do{h=t.input.charCodeAt(++t.position)}while(!Zy(h)&&0!==h)}for(;0!==h;){for(mw(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!s||t.lineIndentl&&(l=t.lineIndent),Zy(h))c++;else{if(t.lineIndent0){for(n=a,r=0;n>0;n--)(a=ew(s=t.input.charCodeAt(++t.position)))>=0?r=(r<<4)+a:cw(t,"expected hexadecimal character");t.result+=rw(r),t.position++}else cw(t,"unknown escape sequence");o=i=t.position}else Zy(s)?(hw(t,o,i,!0),_w(t,fw(t,!1,e)),o=i=t.position):t.position===t.lineStart&&gw(t)?cw(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}cw(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?g=!0:!function(t){var e,o,i=t.input.charCodeAt(t.position);if(42!==i)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Qy(i)&&!tw(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&cw(t,"name of an alias node must contain at least one character"),o=t.input.slice(e,t.position),tb.call(t.anchorMap,o)||cw(t,'unidentified alias "'+o+'"'),t.result=t.anchorMap[o],fw(t,!0,-1),!0}(t)?function(t,e,o){var i,n,r,a,s,l,c,u=t.kind,h=t.result,d=t.input.charCodeAt(t.position);if(Qy(d)||tw(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(Qy(i=t.input.charCodeAt(t.position+1))||o&&tw(i)))return!1;for(t.kind="scalar",t.result="",n=r=t.position,a=!1;0!==d;){if(58===d){if(Qy(i=t.input.charCodeAt(t.position+1))||o&&tw(i))break}else if(35===d){if(Qy(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&gw(t)||o&&tw(d))break;if(Zy(d)){if(s=t.line,l=t.lineStart,c=t.lineIndent,fw(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}t.position=r,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(hw(t,n,r,!1),_w(t,t.line-s),n=r=t.position,a=!1),Jy(d)||(r=t.position+1),d=t.input.charCodeAt(++t.position)}return hw(t,n,r,!1),!!t.result||(t.kind=u,t.result=h,!1)}(t,d,eb===o)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||cw(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===m&&(g=s&&vw(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&cw(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&h.kind!==t.kind&&cw(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result,t.tag)?(t.result=h.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):cw(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function kw(t){var e,o,i,n,r=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(fw(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Qy(n);)n=t.input.charCodeAt(++t.position);for(i=[],(o=t.input.slice(e,t.position)).length<1&&cw(t,"directive name must not be less than one character in length");0!==n;){for(;Jy(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!Zy(n));break}if(Zy(n))break;for(e=t.position;0!==n&&!Qy(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&mw(t),tb.call(gb,o)?gb[o](t,o,i):uw(t,'unknown document directive "'+o+'"')}fw(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,fw(t,!0,-1)):a&&cw(t,"directives end mark is expected"),ww(t,t.lineIndent-1,nb,!1,!0),fw(t,!0,-1),t.checkLineBreaks&&cb.test(t.input.slice(r,t.position))&&uw(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&gw(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,fw(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&o<=57343?1024*(i-55296)+o-56320+65536:i}function Ow(t){return/^\n* /.test(t)}function Bw(t,e,o,i,n,r,a,s){var l,c=0,u=null,h=!1,d=!1,p=-1!==i,m=-1,f=function(t){return Iw(t)&&t!==yb&&!Mw(t)&&t!==Pb&&t!==Lb&&t!==Nb&&t!==zb&&t!==jb&&t!==Hb&&t!==Ub&&t!==Fb&&t!==Ab&&t!==Tb&&t!==Ib&&t!==Eb&&t!==Vb&&t!==Ob&&t!==Bb&&t!==Mb&&t!==xb&&t!==Sb&&t!==Db&&t!==Rb}(Nw(t,0))&&function(t){return!Mw(t)&&t!==Nb}(Nw(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!Iw(c=Nw(t,l)))return ty;f=f&&Pw(c,u,s),u=c}else{for(l=0;l=65536?l+=2:l++){if((c=Nw(t,l))===kb)h=!0,p&&(d=d||l-m-1>i&&" "!==t[m+1],m=l);else if(!Iw(c))return ty;f=f&&Pw(c,u,s),u=c}d=d||p&&l-m-1>i&&" "!==t[m+1]}return h||d?o>9&&Ow(t)?ty:a?r===Wb?ty:Zb:d?Qb:Jb:!f||a||n(t)?r===Wb?ty:Zb:Xb}function Lw(t,e,o,i,n){t.dump=function(){if(0===e.length)return t.quotingType===Wb?'""':"''";if(!t.noCompatMode&&(-1!==Kb.indexOf(e)||Yb.test(e)))return t.quotingType===Wb?'"'+e+'"':"'"+e+"'";var r=t.indent*Math.max(1,o),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-r),s=i||t.flowLevel>-1&&o>=t.flowLevel;switch(Bw(e,s,t.indent,a,function(e){return function(t,e){var o,i;for(o=0,i=t.implicitTypes.length;o"+Dw(e,t.indent)+jw(Sw(function(t,e){var o,i,n=/(\n+)([^\n]*)/g,r=(s=t.indexOf("\n"),s=-1!==s?s:t.length,n.lastIndex=s,Hw(t.slice(0,s),e)),a="\n"===t[0]||" "===t[0];var s;for(;i=n.exec(t);){var l=i[1],c=i[2];o=" "===c[0],r+=l+(a||o||""===c?"":"\n")+Hw(c,e),a=o}return r}(e,a),r));case ty:return'"'+function(t){for(var e,o="",i=0,n=0;n=65536?n+=2:n++)i=Nw(t,n),!(e=Gb[i])&&Iw(i)?(o+=t[n],i>=65536&&(o+=t[n+1])):o+=e||xw(i);return o}(e)+'"';default:throw new kv("impossible error: invalid scalar style")}}()}function Dw(t,e){var o=Ow(t)?String(e):"",i="\n"===t[t.length-1];return o+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function jw(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Hw(t,e){if(""===t||" "===t[0])return t;for(var o,i,n=/ [^ ]/g,r=0,a=0,s=0,l="";o=n.exec(t);)(s=o.index)-r>e&&(i=a>r?a:s,l+="\n"+t.slice(r,i),r=i+1),a=s;return l+="\n",t.length-r>e&&a>r?l+=t.slice(r,a)+"\n"+t.slice(a+1):l+=t.slice(r),l.slice(1)}function Rw(t,e,o,i){var n,r,a,s="",l=t.tag;for(n=0,r=o.length;n tag resolver accepts not "'+s+'" style');i=a.represent[s](e,s)}t.dump=i}return!0}return!1}function Vw(t,e,o,i,n,r,a){t.tag=null,t.dump=o,Uw(t,o,!1)||Uw(t,o,!0);var s,l=vb.call(t.dump),c=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var u,h,d="[object Object]"===l||"[object Array]"===l;if(d&&(h=-1!==(u=t.duplicates.indexOf(o))),(null!==t.tag&&"?"!==t.tag||h||2!==t.indent&&e>0)&&(n=!1),h&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(d&&h&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(!function(t,e,o,i){var n,r,a,s,l,c,u="",h=t.tag,d=Object.keys(o);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new kv("sortKeys must be a boolean or a function");for(n=0,r=d.length;n1024)&&(t.dump&&kb===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Tw(t,e)),Vw(t,e+1,s,!0,l)&&(t.dump&&kb===t.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=t.dump));t.tag=h,t.dump=u||"{}"}(t,e,t.dump,n),h&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,o){var i,n,r,a,s,l="",c=t.tag,u=Object.keys(o);for(i=0,n=u.length;i1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Vw(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}(t,e,t.dump),h&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?Rw(t,e-1,t.dump,n):Rw(t,e,t.dump,n),h&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,o){var i,n,r,a="",s=t.tag;for(i=0,n=o.length;i",t.dump=s+" "+t.dump)}return!0}function Fw(t,e){var o,i,n=[],r=[];for(Gw(t,n,r),o=0,i=r.length;o{for(wv={isNothing:ay,isObject:sy,toArray:ly,repeat:uy,isNegativeZero:hy,extend:cy},py.prototype=Object.create(Error.prototype),py.prototype.constructor=py,py.prototype.toString=function(t){return this.name+": "+dy(this,t)},kv=py,Cv=gy,$v=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ev=["scalar","sequence","mapping"],xv=_y,by.prototype.extend=function(t){var e=[],o=[];if(t instanceof xv)o.push(t);else if(Array.isArray(t))o=o.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new kv("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof xv))throw new kv("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new kv("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new kv("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(t){if(!(t instanceof xv))throw new kv("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(by.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(o),i.compiledImplicit=vy(i,"implicit"),i.compiledExplicit=vy(i,"explicit"),i.compiledTypeMap=function(){var t,e,o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(o.multi[t.kind].push(t),o.multi.fallback.push(t)):o[t.kind][t.tag]=o.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ov=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Bv=/^[-+]?[0-9]+e/,Lv=new xv("tag:yaml.org,2002:float",{kind:"scalar",resolve:zy,construct:Py,predicate:Oy,represent:Ny,defaultStyle:"lowercase"}),Dv=Iv.extend({implicit:[zv,Pv,Nv,Lv]}),jv=Dv,Hv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Rv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),Uv=new xv("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:By,construct:Ly,instanceOf:Date,represent:Dy}),Vv=new xv("tag:yaml.org,2002:merge",{kind:"scalar",resolve:jy}),Fv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",Gv=new xv("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Hy,construct:Ry,predicate:Vy,represent:Uy}),Kv=Object.prototype.hasOwnProperty,Yv=Object.prototype.toString,qv=new xv("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Fy,construct:Gy}),Wv=Object.prototype.toString,Xv=new xv("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ky,construct:Yy}),Zv=Object.prototype.hasOwnProperty,Jv=new xv("tag:yaml.org,2002:set",{kind:"mapping",resolve:qy,construct:Wy}),Qv=jv.extend({implicit:[Uv,Vv],explicit:[Gv,qv,Xv,Jv]}),tb=Object.prototype.hasOwnProperty,eb=1,ob=2,ib=3,nb=4,rb=1,ab=2,sb=3,lb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,cb=/[\x85\u2028\u2029]/,ub=/[,\[\]\{\}]/,hb=/^(?:!|!!|![a-z\-]+!)$/i,db=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,pb=new Array(256),mb=new Array(256),fb=0;fb<256;fb++)pb[fb]=nw(fb)?1:0,mb[fb]=nw(fb);gb={YAML:function(t,e,o){var i,n,r;null!==t.version&&cw(t,"duplication of %YAML directive"),1!==o.length&&cw(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]))&&cw(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),r=parseInt(i[2],10),1!==n&&cw(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=r<2,1!==r&&2!==r&&uw(t,"unsupported YAML version of the document")},TAG:function(t,e,o){var i,n;2!==o.length&&cw(t,"TAG directive accepts exactly two arguments"),i=o[0],n=o[1],hb.test(i)||cw(t,"ill-formed tag handle (first argument) of the TAG directive"),tb.call(t.tagMap,i)&&cw(t,'there is a previously declared suffix for "'+i+'" tag handle'),db.test(n)||cw(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(r){cw(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n}},_b={loadAll:$w,load:Ew},vb=Object.prototype.toString,bb=Object.prototype.hasOwnProperty,yb=65279,wb=9,kb=10,Cb=13,$b=32,Eb=33,xb=34,Ab=35,Sb=37,Tb=38,Mb=39,Ib=42,zb=44,Pb=45,Nb=58,Ob=61,Bb=62,Lb=63,Db=64,jb=91,Hb=93,Rb=96,Ub=123,Vb=124,Fb=125,(Gb={})[0]="\\0",Gb[7]="\\a",Gb[8]="\\b",Gb[9]="\\t",Gb[10]="\\n",Gb[11]="\\v",Gb[12]="\\f",Gb[13]="\\r",Gb[27]="\\e",Gb[34]='\\"',Gb[92]="\\\\",Gb[133]="\\N",Gb[160]="\\_",Gb[8232]="\\L",Gb[8233]="\\P",Kb=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Yb=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,qb=1,Wb=2,Xb=1,Zb=2,Jb=3,Qb=4,ty=5,ey=_b.load,oy={dump:Kw}.dump,Yw("safeLoad","load"),Yw("safeLoadAll","loadAll"),Yw("safeDump","dump")}),ok=kt(()=>{qw=class extends Error{constructor(t,e,o){super(t),this.name="GUISupportError",this.warnings=e,this.errors=o}}}),ik=kt(()=>{ek(),Vt(),Be(),pn(),ok(),vn(),Ww=class extends Ot{constructor(...t){super(...t),this._guiMode=!0,this._loading=!1}get yaml(){return this._yaml||(this._yaml=oy(this._config)),this._yaml||""}set yaml(t){this._yaml=t;try{this._config=ey(this.yaml),this._errors=void 0}catch(e){this._errors=[e.message]}this._setConfig()}get value(){return this._config}set value(t){this._config&&No(t,this._config)||(this._config=t,this._yaml=void 0,this._errors=void 0,this._setConfig())}_setConfig(){var t;if(!this._errors)try{this._updateConfigElement()}catch(e){this._errors=[e.message]}ve(this,"config-changed",{config:this.value,error:null===(t=this._errors)||void 0===t?void 0:t.join(", "),guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}get hasWarning(){return void 0!==this._warnings&&this._warnings.length>0}get hasError(){return void 0!==this._errors&&this._errors.length>0}get GUImode(){return this._guiMode}set GUImode(t){this._guiMode=t,ve(this,"GUImode-changed",{guiMode:t,guiModeAvailable:!(this.hasWarning||this.hasError||!1===this._guiSupported)})}toggleMode(){this.GUImode=!this.GUImode}focusYamlEditor(){var t,e;(null===(t=this._configElement)||void 0===t?void 0:t.focusYamlEditor)&&this._configElement.focusYamlEditor(),(null===(e=this._yamlEditor)||void 0===e?void 0:e.codemirror)&&this._yamlEditor.codemirror.focus()}async getConfigElement(){}get configElementType(){return this.value?this.value.type:void 0}render(){return J` +
+ ${this.GUImode?J` +
+ ${this._loading?J` + + `:this._configElement} +
+ `:J` +
+ +
+ `} + ${!1===this._guiSupported&&this.configElementType?J` +
+ ${this.hass.localize("ui.errors.config.editor_not_available","type",this.configElementType)} +
+ `:""} + ${this.hasError?J` +
+ ${this.hass.localize("ui.errors.config.error_detected")}: +
+
    + ${this._errors.map(t=>J`
  • ${t}
  • `)} +
+
+ `:""} + ${this.hasWarning?J` + + ${this._warnings.length>0&&void 0!==this._warnings[0]?J` +
    + ${this._warnings.map(t=>J`
  • ${t}
  • `)} +
+ `:void 0} + ${this.hass.localize("ui.errors.config.edit_in_yaml_supported")} +
+ `:""} +
+ `}updated(t){super.updated(t),this._configElement&&t.has("hass")&&(this._configElement.hass=this.hass),this._configElement&&"lovelace"in this._configElement&&t.has("lovelace")&&(this._configElement.lovelace=this.lovelace)}_handleUIConfigChanged(t){t.stopPropagation();const e=t.detail.config;this.value=e}_handleYAMLChanged(t){t.stopPropagation();const e=t.detail.value;e!==this.yaml&&(this.yaml=e)}async _updateConfigElement(){var t=this;if(!t.value)return;let e;try{if(t._errors=void 0,t._warnings=void 0,t._configElementType!==t.configElementType){if(t._guiSupported=void 0,t._configElement=void 0,!t.configElementType)throw new Error(t.hass.localize("ui.errors.config.no_type_provided"));t._configElementType=t.configElementType,t._loading=!0,e=await t.getConfigElement(),e&&(e.hass=t.hass,"lovelace"in e&&(e.lovelace=t.lovelace),e.addEventListener("config-changed",e=>t._handleUIConfigChanged(e)),t._configElement=e,t._guiSupported=!0)}if(t._configElement)try{t._configElement.setConfig(t.value)}catch(i){const e=So(t.hass,i);throw new qw("Config is not supported",e.warnings,e.errors)}else t.GUImode=!1}catch(i){var o;if(i instanceof qw)t._warnings=null!==(o=i.warnings)&&void 0!==o?o:[i.message],t._errors=i.errors||void 0;else t._errors=[i.message];t.GUImode=!1}finally{t._loading=!1}}_ignoreKeydown(t){t.stopPropagation()}static get styles(){return l` + :host { + display: flex; + } + .wrapper { + width: 100%; + } + .gui-editor, + .yaml-editor { + padding: 8px 0px; + } + ha-code-editor { + --code-mirror-max-height: calc(100vh - 245px); + } + .error, + .warning, + .info { + word-break: break-word; + margin-top: 8px; + } + .error { + color: var(--error-color); + } + .warning { + color: var(--warning-color); + } + .warning ul, + .error ul { + margin: 4px 0; + } + .warning li, + .error li { + white-space: pre-wrap; + } + ha-circular-progress { + display: block; + margin: auto; + } + `}},gn([Gt({attribute:!1})],Ww.prototype,"hass",void 0),gn([Gt({attribute:!1})],Ww.prototype,"lovelace",void 0),gn([ie()],Ww.prototype,"_yaml",void 0),gn([ie()],Ww.prototype,"_config",void 0),gn([ie()],Ww.prototype,"_configElement",void 0),gn([ie()],Ww.prototype,"_configElementType",void 0),gn([ie()],Ww.prototype,"_guiMode",void 0),gn([ie()],Ww.prototype,"_errors",void 0),gn([ie()],Ww.prototype,"_warnings",void 0),gn([ie()],Ww.prototype,"_guiSupported",void 0),gn([ie()],Ww.prototype,"_loading",void 0),gn([le("ha-code-editor")],Ww.prototype,"_yamlEditor",void 0)}),nk=kt(()=>{Be(),e_(),ik(),vn(),Xw=class extends Ww{get configElementType(){var t;return null===(t=this.value)||void 0===t?void 0:t.type}async getConfigElement(){const t=await Zw(this.configElementType);if(t&&t.getConfigElement)return t.getConfigElement()}},Xw=gn([Lt("mushroom-chip-element-editor")],Xw),Zw=t=>customElements.get(Zg(t))}),rk=/* @__PURE__ */$t({ConditionalChipEditor:()=>Jw}),ak=kt(()=>{Vt(),Be(),pn(),Oc(),Ug(),nk(),e_(),sv(),vn(),oe(),Jw=class extends Ot{constructor(...t){super(...t),this._GUImode=!0,this._guiModeAvailable=!0,this._cardTab=!1}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){this._config=t}focusYamlEditor(){var t;null===(t=this._cardEditorEl)||void 0===t||t.focusYamlEditor()}render(){var t;if(!this.hass||!this._config)return et;const e=ic(this.hass);return J` + + + ${this.hass.localize("ui.panel.lovelace.editor.card.conditional.conditions")} + + + ${e("editor.chip.conditional.chip")} + + + ${this._cardTab?J` +
+ ${void 0!==(null===(t=this._config.chip)||void 0===t?void 0:t.type)?J` +
+ + ${this.hass.localize(!this._cardEditorEl||this._GUImode?"ui.panel.lovelace.editor.edit_card.show_code_editor":"ui.panel.lovelace.editor.edit_card.show_visual_editor")} + + ${this.hass.localize("ui.panel.lovelace.editor.card.conditional.change_type")} +
+ + `:J`({value:t,label:e(`editor.chip.chip-picker.types.${t}`)})),mode:"dropdown"}}} + @value-changed=${this._handleChipPicked} + >`} +
+ `:J` + + `} + `}_selectTab(t){this._cardTab="chip"===t.detail.name}_toggleMode(){var t;null===(t=this._cardEditorEl)||void 0===t||t.toggleMode()}_setMode(t){this._GUImode=t,this._cardEditorEl&&(this._cardEditorEl.GUImode=t)}_handleGUIModeChanged(t){t.stopPropagation(),this._GUImode=t.detail.guiMode,this._guiModeAvailable=t.detail.guiModeAvailable}async _handleChipPicked(t){var e,o=this;const i=null!==(e=t.detail.value)&&void 0!==e?e:"";if(""===i)return;let n;const r=Zw(i);n=r&&r.getStubConfig?await r.getStubConfig(o.hass):{type:i},t.target.value="",t.stopPropagation(),o._config&&(o._setMode(!0),o._guiModeAvailable=!0,o._config=ee(ee({},o._config),{},{chip:n}),ve(o,"config-changed",{config:o._config}))}_handleChipChanged(t){t.stopPropagation(),this._config&&(this._config=ee(ee({},this._config),{},{chip:t.detail.config}),this._guiModeAvailable=t.detail.guiModeAvailable,ve(this,"config-changed",{config:this._config}))}_handleReplaceChip(){this._config&&(this._config=ee(ee({},this._config),{},{chip:void 0}),ve(this,"config-changed",{config:this._config}))}_conditionChanged(t){if(t.stopPropagation(),!this._config)return;const e=t.detail.value;this._config=ee(ee({},this._config),{},{conditions:e}),ve(this,"config-changed",{config:this._config})}static get styles(){return l` + ha-tab-group-tab { + flex: 1; + } + ha-tab-group-tab::part(base) { + width: 100%; + justify-content: center; + } + .card { + margin-top: 8px; + border: 1px solid var(--divider-color); + padding: 12px; + } + .card ha-select { + width: 100%; + margin-top: 0px; + } + @media (max-width: 450px) { + .card { + margin: 8px -12px 0; + } + } + .card .card-options { + display: flex; + justify-content: flex-end; + width: 100%; + } + .gui-mode-button { + margin-right: auto; + } + `}},gn([Gt({attribute:!1})],Jw.prototype,"hass",void 0),gn([Gt({attribute:!1})],Jw.prototype,"lovelace",void 0),gn([ie()],Jw.prototype,"_config",void 0),gn([ie()],Jw.prototype,"_GUImode",void 0),gn([ie()],Jw.prototype,"_guiModeAvailable",void 0),gn([ie()],Jw.prototype,"_cardTab",void 0),gn([le("mushroom-chip-element-editor")],Jw.prototype,"_cardEditorEl",void 0),Jw=gn([Lt(Jg("conditional"))],Jw)}),sk=kt(()=>{Ug(),e_(),Qw=Zg("conditional"),tk=async()=>{if(customElements.get(Qw))return;customElements.get("hui-conditional-base")||(await window.loadCardHelpers()).createCardElement({type:"conditional",card:{type:"button"},conditions:[]});const t=await Tg("hui-conditional-base");customElements.get(Qw)||customElements.define(Qw,class extends t{static async getConfigElement(){return await Promise.resolve().then(()=>(ak(),rk)),document.createElement(Jg("conditional"))}static async getStubConfig(){return{type:"conditional",conditions:[]}}setConfig(t){if(this.validateConfig(t),!t.chip)throw new Error("No chip configured");this._element=Wg(t.chip)}})}});sk();var lk={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const KM in lk)Object.freeze(lk[KM]);Object.freeze(lk);Bf();var ck,uk,hk,dk=t=>{const e=Math.round(Math.min(Math.max(t,0),255)).toString(16);return 1===e.length?`0${e}`:e},pk=t=>`#${dk(t[0])}${dk(t[1])}${dk(t[2])}`;function mk(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function fk(t){const e=(t=>{const[e,o,i]=t,n=Math.max(e,o,i),r=n-Math.min(e,o,i),a=r&&(n===e?(o-i)/r:n===o?2+(i-e)/r:4+(e-o)/r);return[60*(a<0?a+6:a),n&&r/n,n]})([t[0],t[1],t[2]]);return e[1]<.4&&(e[1]<.1?e[2]=225:e[1]=.4),(t=>{const[e,o,i]=t,n=t=>{const n=(t+e/60)%6;return i-i*o*Math.max(Math.min(n,4-n,1),0)};return[n(5),n(3),n(1)]})(e)}pn();var gk,_k,vk,bk,yk,wk,kk=kt(()=>{ug(),uk=`${ck=`${eg}-light-card`}-editor`,hk=["light"]}),Ck=kt(()=>{To(),_g(),jg(),Vg(),Fg(),gk=mo(Pg,mo(zg,gg,sg),Co({icon_color:$o(Eo()),show_brightness_control:$o(bo()),show_color_temp_control:$o(bo()),show_color_control:$o(bo()),collapsible_controls:$o(bo()),use_light_color:$o(bo())}))}),$k=/* @__PURE__ */$t({LIGHT_LABELS:()=>_k,LightCardEditor:()=>bk}),Ek=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),kk(),Ck(),vn(),_k=["show_brightness_control","use_light_color","show_color_temp_control","show_color_control"],vk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:hk}}},Ag(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...$g(t),{type:"grid",name:"",schema:[{name:"use_light_color",selector:{boolean:{}}},{name:"show_brightness_control",selector:{boolean:{}}},{name:"show_color_temp_control",selector:{boolean:{}}},{name:"show_color_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg()]),bk=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):_k.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,gk),this._config=t}render(){if(!this.hass||!this._config)return et;const t=vk(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],bk.prototype,"_config",void 0),bk=gn([Lt(uk)],bk)}),xk=/* @__PURE__ */$t({LightChipEditor:()=>wk}),Ak=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),jg(),Hg(),Rg(),e_(),kk(),Ek(),vn(),yk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:hk}}},Ag(e),{name:"content_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"use_light_color",selector:{boolean:{}}}]},...lg()]),wk=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):_k.includes(t.name)?e(`editor.card.light.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=yk(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],wk.prototype,"hass",void 0),gn([ie()],wk.prototype,"_config",void 0),wk=gn([Lt(Jg("light"))],wk)});Vt(),Be(),je(),Re(),pn(),Xf(),e_(),vn(),oe();var Sk=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Ak(),xk)),document.createElement(Jg("light"))}static async getStubConfig(t){return{type:"light",entity:Object.keys(t.states).filter(t=>"light"===t.split(".")[0])[0]}}setConfig(t){this._config=ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this.hass||!this._config||!this._config.entity)return et;const o=this._config.entity,i=this.hass.states[o];if(!i)return et;const n=Qf(this.hass,i,this._config.name),r=this._config.icon,a=this.hass.formatEntityState(i),s=Yo(i),l=mk(i),c={};l&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)&&(c["--color"]=`rgb(${fk(l).join(",")})`);const u=qf(null!==(e=this._config.content_info)&&void 0!==e?e:"state",n,a,i,this.hass);return J` + + + ${u?J`${u}`:et} + + `}static get styles(){return l` + :host { + --color: rgb(var(--rgb-state-light)); + } + mushroom-chip { + cursor: pointer; + } + ha-state-icon.active { + color: var(--color); + } + `}};gn([Gt({attribute:!1})],Sk.prototype,"hass",void 0),gn([ie()],Sk.prototype,"_config",void 0),Sk=gn([Lt(Zg("light"))],Sk);var Tk,Mk,Ik,zk=/* @__PURE__ */$t({AlarmControlPanelChipEditor:()=>Ik}),Pk=kt(()=>{Vt(),Be(),Oi(),pn(),Oc(),_g(),jg(),Hg(),Rg(),e_(),hg(),vn(),Tk=["more-info","navigate","url","perform-action","assist","none"],Mk=vi((t,e)=>[{name:"entity",selector:{entity:{domain:ng}}},Ag(e),{name:"content_info",selector:{select:{options:yg(t),mode:"dropdown"}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...lg(Tk)]),Ik=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return et;const t=Mk(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],Ik.prototype,"hass",void 0),gn([ie()],Ik.prototype,"_config",void 0),Ik=gn([Lt(Jg("alarm-control-panel"))],Ik)});Vt(),Be(),je(),Re(),pn(),Rf(),Nn(),Xf(),e_(),hg(),vn();var Nk=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(Pk(),zk)),document.createElement(Jg("alarm-control-panel"))}static async getStubConfig(t){return{type:"alarm-control-panel",entity:Object.keys(t.states).filter(t=>ng.includes(t.split(".")[0]))[0]}}setConfig(t){this._config=t}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return et;const e=this._config.entity,o=this.hass.states[e];if(!o)return et;const i=Qf(this.hass,o,this._config.name),n=this._config.icon,r=dg(o.state),a=pg(o.state),s=this.hass.formatEntityState(o),l={};r&&(l["--color"]=`rgb(${Lf(r)})`);const c=qf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,s,o,this.hass);return J` + + + ${c?J`${c}`:et} + + `}static get styles(){return l` + mushroom-chip { + cursor: pointer; + } + ha-state-icon { + color: var(--color); + } + ha-state-icon.pulse { + animation: 1s ease 0s infinite normal none running pulse; + } + ${$n.pulse} + `}};gn([Gt({attribute:!1})],Nk.prototype,"hass",void 0),gn([ie()],Nk.prototype,"_config",void 0),Nk=gn([Lt(Zg("alarm-control-panel"))],Nk),Vt(),Be(),e_(),vn();var Ok,Bk,Lk=class extends Ot{setConfig(){}static get styles(){return l` + :host { + flex-grow: 1; + } + `}};Lk=gn([Lt(Zg("spacer"))],Lk),tv(),iv(),av(),uv();var Dk,jk,Hk,Rk,Uk,Vk,Fk,Gk,Kk,Yk,qk,Wk,Xk,Zk,Jk,Qk,tC,eC,oC,iC,nC,rC,aC,sC,lC,cC,uC,hC,dC,pC,mC,fC,gC,_C,vC,bC,yC,wC,kC,CC,$C,EC,xC,AC,SC,TC,MC,IC,zC,PC,NC,OC,BC,LC,DC,jC,HC,RC,UC,VC,FC,GC,KC,YC,qC,WC,XC,ZC,JC,QC,t$,e$,o$,i$,n$,r$,a$,s$,l$,c$,u$,h$,d$,p$,m$,f$,g$,_$,v$,b$,y$,w$=kt(()=>{ug(),Bk=`${Ok=`${eg}-chips-card`}-editor`}),k$=kt(()=>{Vt(),Be(),pn(),Oc(),nk(),vn(),Dk=class extends Ot{constructor(...t){super(...t),this._guiModeAvailable=!0,this._guiMode=!0}render(){const t=ic(this.hass);return J` +
+
+ + + + ${t("editor.chip.sub_element_editor.title")} +
+ + ${this.hass.localize(this._guiMode?"ui.panel.lovelace.editor.edit_card.show_code_editor":"ui.panel.lovelace.editor.edit_card.show_visual_editor")} + +
+ ${"chip"===this.config.type?J` + + `:""} + `}_goBack(){ve(this,"go-back")}_toggleMode(){var t;null===(t=this._editorElement)||void 0===t||t.toggleMode()}_handleGUIModeChanged(t){t.stopPropagation(),this._guiMode=t.detail.guiMode,this._guiModeAvailable=t.detail.guiModeAvailable}_handleConfigChanged(t){this._guiModeAvailable=t.detail.guiModeAvailable}static get styles(){return l` + .header { + display: flex; + justify-content: space-between; + align-items: center; + } + .back-title { + display: flex; + align-items: center; + font-size: 18px; + } + ha-icon { + display: flex; + align-items: center; + justify-content: center; + } + `}},gn([Gt({attribute:!1})],Dk.prototype,"config",void 0),gn([ie()],Dk.prototype,"_guiModeAvailable",void 0),gn([ie()],Dk.prototype,"_guiMode",void 0),gn([le(".editor")],Dk.prototype,"_editorElement",void 0),Dk=gn([Lt("mushroom-sub-element-editor")],Dk)}),C$=kt(()=>{Ht(),Le(),jk={},Hk=ue(class extends he{constructor(){super(...arguments),this.ot=jk}render(t,e){return e()}update(t,[e,o]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((t,e)=>t===this.ot[e]))return tt}else if(this.ot===e)return tt;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,o)}})}),$$=kt(()=>{C$()}),E$=kt(()=>{Ht(),({I:Rk}=pt),Uk=()=>document.createComment(""),Vk={},Fk=(t,e=Vk)=>t._$AH=e}),x$=kt(()=>{Ht(),Le(),E$(),Gk=ue(class extends he{constructor(){super(...arguments),this.key=et}render(t,e){return this.key=t,e}update(t,[e,o]){return e!==this.key&&(Fk(t),this.key=e),o}})}),A$=kt(()=>{x$()}),S$=/* @__PURE__ */$t({AutoScroll:()=>bE,MultiDrag:()=>EE,OnSpill:()=>c$,Sortable:()=>hE,Swap:()=>$E,default:()=>hE});function T$(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=Array(e);o"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(K){return!1}return!1}}function H$(t){return t.host&&t!==document&&t.host.nodeType&&t.host!==t?t.host:t.parentNode}function R$(t,e,o,i){if(t){o=o||document;do{if(null!=e&&(">"===e[0]?t.parentNode===o&&j$(t,e):j$(t,e))||i&&t===o)return t;if(t===o)break}while(t=H$(t))}return null}function U$(t,e,o){t&&e&&(t.classList?t.classList[o?"add":"remove"](e):t.className=((" "+t.className+" ").replace(Qk," ").replace(" "+e+" "," ")+(o?" "+e:"")).replace(Qk," "))}function V$(t,e,o){var i=t&&t.style;if(i){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=o+("string"==typeof o?"":"px")}}function F$(t,e){var o="";if("string"==typeof t)o=t;else do{var i=V$(t,"transform");i&&"none"!==i&&(o=i+" "+o)}while(!e&&(t=t.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(o)}function G$(t,e,o){if(t){var i=t.getElementsByTagName(e),n=0,r=i.length;if(o)for(;n=r:n<=r))return i;if(i===K$())break;i=Q$(i,!1)}return!1}function W$(t,e,o,i){for(var n=0,r=0,a=t.children;rli":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return GC(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==hE.supportPointer&&"PointerEvent"in window&&(!Wk||Xk),emptyInsertThreshold:5};for(var i in nC.initializePlugins(this,t,o),o)!(i in e)&&(e[i]=o[i]);for(var n in qC(e),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!e.forceFallback&&VC,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?L$(t,"pointerdown",this._onTapStart):(L$(t,"mousedown",this._onTapStart),L$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(L$(t,"dragover",this),L$(t,"dragenter",this)),CC.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),I$(this,lE())}function dE(t,e,o,i,n,r,a,s){var l,c,u=t[eC],h=u.options.onMove;return!window.CustomEvent||Kk||Yk?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=o,l.draggedRect=i,l.related=n||e,l.relatedRect=r||Y$(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(c=h.call(u,l,a)),c}function pE(t){t.draggable=!1}function mE(){DC=!1}function fE(t,e,o,i,n,r,a,s){var l=i?t.clientY:t.clientX,c=i?o.height:o.width,u=i?o.top:o.left,h=i?o.bottom:o.right,d=!1;if(!a)if(s&&OCu+c*r/2:lh-OC)return-zC}else if(l>u+c*(1-n)/2&&lh-c*r/2)?l>u+c/2?1:-1:0}function gE(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,i=0;o--;)i+=e.charCodeAt(o);return i.toString(36)}function _E(t){return setTimeout(t,0)}function vE(t){return clearTimeout(t)}function bE(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?L$(document,"dragover",this._handleAutoScroll):this.options.supportPointer?L$(document,"pointermove",this._handleFallbackAutoScroll):e.touches?L$(document,"touchmove",this._handleFallbackAutoScroll):L$(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?D$(document,"dragover",this._handleAutoScroll):(D$(document,"pointermove",this._handleFallbackAutoScroll),D$(document,"touchmove",this._handleFallbackAutoScroll),D$(document,"mousemove",this._handleFallbackAutoScroll)),wE(),yE(),clearTimeout(tC),tC=void 0},nulling:function(){r$=e$=t$=o$=a$=i$=n$=null,QC.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var o=this,i=(t.touches?t.touches[0]:t).clientX,n=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(i,n);if(r$=t,e||this.options.forceAutoScrollFallback||Yk||Kk||Wk){s$(t,this.options,r,e);var a=Q$(r,!0);!o$||a$&&i===i$&&n===n$||(a$&&wE(),a$=setInterval(function(){var r=Q$(document.elementFromPoint(i,n),!0);r!==a&&(a=r,yE()),s$(t,o.options,r,e)},10),i$=i,n$=n)}else{if(!this.options.bubbleScroll||Q$(r,!0)===K$())return void yE();s$(t,this.options,Q$(r,!1),!1)}}},I$(t,{pluginName:"scroll",initializeByDefault:!0})}function yE(){QC.forEach(function(t){clearInterval(t.pid)}),QC=[]}function wE(){clearInterval(a$)}function kE(){}function CE(){}function $E(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){u$=t.dragEl},dragOverValid:function(t){var e=t.completed,o=t.target,i=t.onMove,n=t.activeSortable,r=t.changed,a=t.cancel;if(n.options.swap){var s=this.sortable.el,l=this.options;if(o&&o!==s){var c=u$;!1!==i(o)?(U$(o,l.swapClass,!0),u$=o):u$=null,c&&c!==u$&&U$(c,l.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,o=t.putSortable,i=t.dragEl,n=o||this.sortable,r=this.options;u$&&U$(u$,r.swapClass,!1),u$&&(r.swap||o&&o.options.swap)&&i!==u$&&(n.captureAnimationState(),n!==e&&e.captureAnimationState(),function(t,e){var o,i,n=t.parentNode,r=e.parentNode;if(!n||!r||n.isEqualNode(e)||r.isEqualNode(t))return;o=Z$(t),i=Z$(e),n.isEqualNode(r)&&o1&&(h$.forEach(function(t){i.addAnimationState({target:t,rect:g$?Y$(t):n}),aE(t),t.fromRect=n,e.removeAnimationState(t)}),g$=!1,function(t,e){h$.forEach(function(o,i){var n=e.children[o.sortableIndex+(t?Number(i):0)];n?e.insertBefore(o,n):e.appendChild(o)})}(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(t){var e=t.sortable,o=t.isOwner,i=t.insertion,n=t.activeSortable,r=t.parentEl,a=t.putSortable,s=this.options;if(i){if(o&&n._hideClone(),f$=!1,s.animation&&h$.length>1&&(g$||!o&&!n.options.sort&&!a)){var l=Y$(v$,!1,!0,!0);h$.forEach(function(t){t!==v$&&(rE(t,l),r.appendChild(t))}),g$=!0}if(!o)if(g$||AE(),h$.length>1){var c=y$;n._showClone(e),n.options.animation&&!y$&&c&&d$.forEach(function(t){n.addAnimationState({target:t,rect:b$}),t.fromRect=b$,t.thisAnimationDuration=null})}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,o=t.isOwner,i=t.activeSortable;if(h$.forEach(function(t){t.thisAnimationDuration=null}),i.options.animation&&!o&&i.multiDrag.isMultiDrag){b$=I$({},e);var n=F$(v$,!0);b$.top-=n.f,b$.left-=n.e}},dragOverAnimationComplete:function(){g$&&(g$=!1,AE())},drop:function(t){var e=t.originalEvent,o=t.rootEl,i=t.parentEl,n=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var c=this.options,u=i.children;if(!_$)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),U$(v$,c.selectedClass,!~h$.indexOf(v$)),~h$.indexOf(v$))h$.splice(h$.indexOf(v$),1),p$=null,cE({sortable:n,rootEl:o,name:"deselect",targetEl:v$,originalEvent:e});else{if(h$.push(v$),cE({sortable:n,rootEl:o,name:"select",targetEl:v$,originalEvent:e}),e.shiftKey&&p$&&n.el.contains(p$)){var h=Z$(p$),d=Z$(v$);~h&&~d&&h!==d&&function(){var t,r;d>h?(r=h,t=d):(r=d,t=h+1);for(var a=c.filter;r1){var p=Y$(v$),m=Z$(v$,":not(."+this.options.selectedClass+")");if(!f$&&c.animation&&(v$.thisAnimationDuration=null),l.captureAnimationState(),!f$&&(c.animation&&(v$.fromRect=p,h$.forEach(function(t){if(t.thisAnimationDuration=null,t!==v$){var e=g$?Y$(t):p;t.fromRect=e,l.addAnimationState({target:t,rect:e})}})),AE(),h$.forEach(function(t){u[m]?i.insertBefore(t,u[m]):i.appendChild(t),m++}),a===Z$(v$))){var f=!1;h$.forEach(function(t){t.sortableIndex===Z$(t)||(f=!0)}),f&&(r("update"),r("sort"))}h$.forEach(function(t){aE(t)}),l.animateAll()}m$=l}(o===i||s&&"clone"!==s.lastPutMode)&&d$.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)})}},nullingGlobal:function(){this.isMultiDrag=_$=!1,d$.length=0},destroyGlobal:function(){this._deselectMultiDrag(),D$(document,"pointerup",this._deselectMultiDrag),D$(document,"mouseup",this._deselectMultiDrag),D$(document,"touchend",this._deselectMultiDrag),D$(document,"keydown",this._checkKeyDown),D$(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==_$&&_$||m$!==this.sortable||t&&R$(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;h$.length;){var e=h$[0];U$(e,this.options.selectedClass,!1),h$.shift(),cE({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},I$(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[eC];e&&e.options.multiDrag&&!~h$.indexOf(t)&&(m$&&m$!==e&&(m$.multiDrag._deselectMultiDrag(),m$=e),U$(t,e.options.selectedClass,!0),h$.push(t))},deselect:function(t){var e=t.parentNode[eC],o=h$.indexOf(t);e&&e.options.multiDrag&&~o&&(U$(t,e.options.selectedClass,!1),h$.splice(o,1))}},eventProperties:function(){var t=this,e=[],o=[];return h$.forEach(function(i){var n;e.push({multiDragElement:i,index:i.sortableIndex}),n=g$&&i!==v$?-1:g$?Z$(i,":not(."+t.options.selectedClass+")"):Z$(i),o.push({multiDragElement:i,index:n})}),{items:N$(h$),clones:[].concat(d$),oldIndicies:e,newIndicies:o}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function xE(t,e){d$.forEach(function(o,i){var n=e.children[o.sortableIndex+(t?Number(i):0)];n?e.insertBefore(o,n):e.appendChild(o)})}function AE(){h$.forEach(function(t){t!==v$&&t.parentNode&&t.parentNode.removeChild(t)})}var SE,TE,ME,IE,zE,PE,NE,OE,BE,LE,DE,jE,HE,RE,UE,VE=kt(()=>{Kk=B$(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Yk=B$(/Edge/i),qk=B$(/firefox/i),Wk=B$(/safari/i)&&!B$(/chrome/i)&&!B$(/android/i),Xk=B$(/iP(ad|od|hone)/i),Zk=B$(/chrome/i)&&B$(/android/i),Jk={capture:!1,passive:!1},Qk=/\s+/g,eC="Sortable"+/* @__PURE__ */(new Date).getTime(),oC=[],iC={initializeByDefault:!0},nC={mount:function(t){for(var e in iC)iC.hasOwnProperty(e)&&!(e in t)&&(t[e]=iC[e]);oC.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),oC.push(t)},pluginEvent:function(t,e,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var n=t+"Global";oC.forEach(function(i){e[i.pluginName]&&(e[i.pluginName][n]&&e[i.pluginName][n](P$({sortable:e},o)),e.options[i.pluginName]&&e[i.pluginName][t]&&e[i.pluginName][t](P$({sortable:e},o)))})},initializePlugins:function(t,e,o,i){for(var n in oC.forEach(function(i){var n=i.pluginName;if(t.options[n]||i.initializeByDefault){var r=new i(t,e,t.options);r.sortable=t,r.options=t.options,t[n]=r,I$(o,r.defaults)}}),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var o={};return oC.forEach(function(i){"function"==typeof i.eventProperties&&I$(o,i.eventProperties.call(e[i.pluginName],t))}),o},modifyOption:function(t,e,o){var i;return oC.forEach(function(n){t[n.pluginName]&&n.optionListeners&&"function"==typeof n.optionListeners[e]&&(i=n.optionListeners[e].call(t[n.pluginName],o))}),i}},rC=["evt"],aC=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.evt,n=function(t,e){if(null==t)return{};var o,i,n=function(t,e){if(null==t)return{};var o={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;o[i]=t[i]}return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=i&&"none"===o[UC]||r&&"none"===o[UC]&&l+c>i)?"vertical":"horizontal"},KC=function(t,e,o){var i=o?t.left:t.top,n=o?t.right:t.bottom,r=o?t.width:t.height,a=o?e.left:e.top,s=o?e.right:e.bottom,l=o?e.width:e.height;return i===a||n===s||i+r/2===a+l/2},YC=function(t,e){var o;return CC.some(function(i){var n=i[eC].options.emptyInsertThreshold;if(n&&!X$(i)){var r=Y$(i),a=t>=r.left-n&&t<=r.right+n,s=e>=r.top-n&&e<=r.bottom+n;return a&&s?o=i:void 0}}),o},qC=function(t){function e(t,o){return function(i,n,r,a){var s=i.options.group.name&&n.options.group.name&&i.options.group.name===n.options.group.name;if(null==t&&(o||s))return!0;if(null==t||!1===t)return!1;if(o&&"clone"===t)return t;if("function"==typeof t)return e(t(i,n,r,a),o)(i,n,r,a);var l=(o?i:n).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var o={},i=t.group;i&&"object"==O$(i)||(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},WC=function(){!FC&&cC&&V$(cC,"display","none")},XC=function(){!FC&&cC&&V$(cC,"display","")},HC&&!Zk&&document.addEventListener("click",function(t){if(kC)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),kC=!1,!1},!0),ZC=function(t){if(sC){t=t.touches?t.touches[0]:t;var e=YC(t.clientX,t.clientY);if(e){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[eC]._onDragOver(o)}}},JC=function(t){sC&&sC.parentNode[eC]._isOutsideThisEl(t.target)},hE.prototype={constructor:hE,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(IC=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,sC):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,i=this.options,n=i.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(function(t){jC.length=0;for(var e=t.getElementsByTagName("input"),o=e.length;o--;){var i=e[o];i.checked&&jC.push(i)}}(o),!sC&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Wk||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=R$(s,i.draggable,o,!1))&&s.animated||dC===s)){if(fC=Z$(s),_C=Z$(s,i.draggable),"function"==typeof c){if(c.call(this,t,s,this))return uE({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:o,fromEl:o}),aC("filter",e,{evt:t}),void(n&&t.preventDefault())}else if(c&&(c=c.split(",").some(function(i){if(i=R$(l,i.trim(),o,!1))return uE({sortable:e,rootEl:i,name:"filter",targetEl:s,fromEl:o,toEl:o}),aC("filter",e,{evt:t}),!0})))return void(n&&t.preventDefault());i.handle&&!R$(l,i.handle,o,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,o){var i,n=this,r=n.el,a=n.options,s=r.ownerDocument;if(o&&!sC&&o.parentNode===r){var l=Y$(o);if(uC=r,lC=(sC=o).parentNode,hC=sC.nextSibling,dC=o,bC=a.group,hE.dragged=sC,$C={target:sC,clientX:(e||t).clientX,clientY:(e||t).clientY},SC=$C.clientX-l.left,TC=$C.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,sC.style["will-change"]="all",i=function(){aC("delayEnded",n,{evt:t}),hE.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!qk&&n.nativeDraggable&&(sC.draggable=!0),n._triggerDragStart(t,e),uE({sortable:n,name:"choose",originalEvent:t}),U$(sC,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){G$(sC,t.trim(),pE)}),L$(s,"dragover",ZC),L$(s,"mousemove",ZC),L$(s,"touchmove",ZC),a.supportPointer?(L$(s,"pointerup",n._onDrop),!this.nativeDraggable&&L$(s,"pointercancel",n._onDrop)):(L$(s,"mouseup",n._onDrop),L$(s,"touchend",n._onDrop),L$(s,"touchcancel",n._onDrop)),qk&&this.nativeDraggable&&(this.options.touchStartThreshold=4,sC.draggable=!0),aC("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Yk||Kk))i();else{if(hE.eventCanceled)return void this._onDrop();a.supportPointer?(L$(s,"pointerup",n._disableDelayedDrag),L$(s,"pointercancel",n._disableDelayedDrag)):(L$(s,"mouseup",n._disableDelayedDrag),L$(s,"touchend",n._disableDelayedDrag),L$(s,"touchcancel",n._disableDelayedDrag)),L$(s,"mousemove",n._delayedDragTouchMoveHandler),L$(s,"touchmove",n._delayedDragTouchMoveHandler),a.supportPointer&&L$(s,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){sC&&pE(sC),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;D$(t,"mouseup",this._disableDelayedDrag),D$(t,"touchend",this._disableDelayedDrag),D$(t,"touchcancel",this._disableDelayedDrag),D$(t,"pointerup",this._disableDelayedDrag),D$(t,"pointercancel",this._disableDelayedDrag),D$(t,"mousemove",this._delayedDragTouchMoveHandler),D$(t,"touchmove",this._delayedDragTouchMoveHandler),D$(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?L$(document,"pointermove",this._onTouchMove):L$(document,e?"touchmove":"mousemove",this._onTouchMove):(L$(sC,"dragend",this),L$(uC,"dragstart",this._onDragStart));try{document.selection?_E(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(t,e){if(wC=!1,uC&&sC){aC("dragStarted",this,{evt:e}),this.nativeDraggable&&L$(document,"dragover",JC);var o=this.options;!t&&U$(sC,o.dragClass,!1),U$(sC,o.ghostClass,!0),hE.active=this,t&&this._appendGhost(),uE({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(EC){this._lastX=EC.clientX,this._lastY=EC.clientY,WC();for(var t=document.elementFromPoint(EC.clientX,EC.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(EC.clientX,EC.clientY))!==e;)e=t;if(sC.parentNode[eC]._isOutsideThisEl(t),e)do{if(e[eC]){if(e[eC]._onDragOver({clientX:EC.clientX,clientY:EC.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=H$(e));XC()}},_onTouchMove:function(t){if($C){var e=this.options,o=e.fallbackTolerance,i=e.fallbackOffset,n=t.touches?t.touches[0]:t,r=cC&&F$(cC,!0),a=cC&&r&&r.a,s=cC&&r&&r.d,l=RC&&BC&&J$(BC),c=(n.clientX-$C.clientX+i.x)/(a||1)+(l?l[0]-LC[0]:0)/(a||1),u=(n.clientY-$C.clientY+i.y)/(s||1)+(l?l[1]-LC[1]:0)/(s||1);if(!hE.active&&!wC){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))n.right+10||t.clientY>i.bottom&&t.clientX>i.left:t.clientY>n.bottom+10||t.clientX>i.right&&t.clientY>i.top}(t,n,this)&&!f.animated){if(f===sC)return I(!1);if(f&&r===t.target&&(a=f),a&&(o=Y$(a)),!1!==dE(uC,r,sC,e,a,o,t,!!a))return M(),f&&f.nextSibling?r.insertBefore(sC,f.nextSibling):r.appendChild(sC),lC=r,z(),I(!0)}else if(f&&function(t,e,o){var i=Y$(W$(o.el,0,o.options,!0)),n=sE(o.el,o.options,cC);return e?t.clientX=0&&(uE({rootEl:lC,name:"add",toEl:lC,fromEl:uC,originalEvent:t}),uE({sortable:this,name:"remove",toEl:lC,originalEvent:t}),uE({rootEl:lC,name:"sort",toEl:lC,fromEl:uC,originalEvent:t}),uE({sortable:this,name:"sort",toEl:lC,originalEvent:t})),yC&&yC.save()):gC!==fC&&gC>=0&&(uE({sortable:this,name:"update",toEl:lC,originalEvent:t}),uE({sortable:this,name:"sort",toEl:lC,originalEvent:t})),hE.active&&(null!=gC&&-1!==gC||(gC=fC,vC=_C),uE({sortable:this,name:"end",toEl:lC,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){aC("nulling",this),uC=sC=lC=cC=hC=pC=dC=mC=$C=EC=MC=gC=vC=fC=_C=IC=zC=yC=bC=hE.dragged=hE.ghost=hE.clone=hE.active=null;var t=this.el;jC.forEach(function(e){t.contains(e)&&(e.checked=!0)}),jC.length=xC=AC=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":sC&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],o=this.el.children,i=0,n=o.length,r=this.options;i{Vt(),Be(),$$(),A$(),pn(),Oc(),Yf(),nk(),sv(),sk(),vn(),TE=new Set(["spacer"]),ME=class extends Hf{constructor(...t){super(...t),this._attached=!1,this._renderEmptySortable=!1,this._selectorKey=0}connectedCallback(){super.connectedCallback(),this._attached=!0}disconnectedCallback(){super.disconnectedCallback(),this._attached=!1}render(){if(!this.chips||!this.hass)return et;const t=ic(this.hass);return J` +

+ ${this.label||`${t("editor.chip.chip-picker.chips")} (${this.hass.localize("ui.panel.lovelace.editor.card.config.required")})`} +

+
+ ${Hk([this.chips,this._renderEmptySortable],()=>this._renderEmptySortable?"":this.chips.map((e,o)=>J` +
+
+ +
+ ${J` +
+
+ ${this._renderChipLabel(e)} + + ${this._renderChipSecondary(e)} + +
+
+ `} + ${TE.has(e.type)?et:J` + + + + `} + + + +
+ `))} +
+ ${Gk(this._selectorKey,J`({value:e,label:t(`editor.chip.chip-picker.types.${e}`)})),mode:"dropdown"}}} + @value-changed=${this._addChips} + >`)} + `}updated(t){super.updated(t);const e=t.has("_attached"),o=t.has("chips");if(o||e){var i;if(e&&!this._attached)return null===(i=this._sortable)||void 0===i||i.destroy(),void(this._sortable=void 0);this._sortable||!this.chips?o&&this._handleChipsChanged():this._createSortable()}}async _handleChipsChanged(){var t=this;t._renderEmptySortable=!0,await t.updateComplete;const e=t.shadowRoot.querySelector(".chips");for(;e.lastElementChild;)e.removeChild(e.lastElementChild);t._renderEmptySortable=!1}async _createSortable(){var t=this;if(!SE){const t=await Promise.resolve().then(()=>(VE(),S$));(SE=t.Sortable).mount(t.OnSpill),SE.mount(t.AutoScroll())}t._sortable=new SE(t.shadowRoot.querySelector(".chips"),{animation:150,fallbackClass:"sortable-fallback",handle:".handle",onEnd:async e=>t._chipMoved(e)})}async _addChips(t){var e,o=this;const i=null!==(e=t.detail.value)&&void 0!==e?e:"";if(""===i)return;let n;"conditional"===i&&await tk();const r=Zw(i);n=r&&r.getStubConfig?await r.getStubConfig(o.hass):{type:i};const a=o.chips.concat(n);o._selectorKey++,ve(o,"chips-changed",{chips:a})}_chipMoved(t){if(t.oldIndex===t.newIndex)return;const e=this.chips.concat();e.splice(t.newIndex,0,e.splice(t.oldIndex,1)[0]),ve(this,"chips-changed",{chips:e})}_removeChip(t){const e=t.currentTarget.index,o=this.chips.concat();o.splice(e,1),ve(this,"chips-changed",{chips:o})}_editChip(t){const e=t.currentTarget.index;ve(this,"edit-detail-element",{subElementConfig:{index:e,type:"chip",elementConfig:this.chips[e]}})}_renderChipLabel(t){return ic(this.hass)(`editor.chip.chip-picker.types.${t.type}`)}_renderChipSecondary(t){const e=ic(this.hass);var o,i;if("entity"in t&&t.entity)return`${null!==(o=null!==(i=this.getEntityName(t.entity))&&void 0!==i?i:t.entity)&&void 0!==o?o:""}`;if("chip"in t&&t.chip){const o=e(`editor.chip.chip-picker.types.${t.chip.type}`);return this._renderChipSecondary(t.chip)?`${this._renderChipSecondary(t.chip)} (via ${o})`:o}return""}getEntityName(t){if(!this.hass)return;const e=this.hass.states[t];return e?e.attributes.friendly_name:void 0}static get styles(){return[super.styles,nn,l` + .chip { + display: flex; + align-items: center; + } + + ha-icon { + display: flex; + } + + ha-select { + width: 100%; + } + + .chip .handle { + padding-right: 8px; + cursor: move; + } + + .chip .handle > * { + pointer-events: none; + } + + .special-row { + height: 60px; + font-size: 16px; + display: flex; + align-items: center; + justify-content: space-between; + flex-grow: 1; + } + + .special-row div { + display: flex; + flex-direction: column; + } + + .remove-icon, + .edit-icon { + --mdc-icon-button-size: 36px; + color: var(--secondary-text-color); + } + + .secondary { + font-size: 12px; + color: var(--secondary-text-color); + } + `]}},gn([Gt({attribute:!1})],ME.prototype,"chips",void 0),gn([Gt()],ME.prototype,"label",void 0),gn([ie()],ME.prototype,"_attached",void 0),gn([ie()],ME.prototype,"_renderEmptySortable",void 0),gn([ie()],ME.prototype,"_selectorKey",void 0),ME=gn([Lt("mushroom-chips-card-chips-editor")],ME)}),GE=/* @__PURE__ */$t({ChipsCardEditor:()=>UE}),KE=kt(()=>{Vt(),Be(),To(),pn(),Oc(),Vg(),Fg(),jg(),Yf(),Ug(),k$(),FE(),w$(),vn(),oe(),IE=Co({type:wo("action"),icon:$o(Eo()),icon_color:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),zE=Co({type:wo("back"),icon:$o(Eo()),icon_color:$o(Eo())}),PE=Co({type:wo("entity"),entity:$o(Eo()),name:$o(Ig),content_info:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),use_entity_picture:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),NE=Co({type:wo("menu"),icon:$o(Eo()),icon_color:$o(Eo())}),OE=Co({type:wo("quickbar"),icon:$o(Eo()),mode:$o(yo(["command","device","entity"]))}),BE=Co({type:wo("weather"),entity:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),show_temperature:$o(bo()),show_conditions:$o(bo())}),LE=Co({type:wo("conditional"),chip:$o(_o()),conditions:$o(vo(_o()))}),DE=Co({type:wo("light"),entity:$o(Eo()),name:$o(Ig),content_info:$o(Eo()),icon:$o(Eo()),use_light_color:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on)}),jE=Co({type:wo("template"),entity:$o(Eo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),content:$o(Eo()),icon:$o(Eo()),icon_color:$o(Eo()),picture:$o(Eo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}),HE=Co({type:wo("spacer")}),RE=mo(Pg,Co({chips:vo(go(t=>{if(t&&"object"==typeof t&&"type"in t)switch(t.type){case"action":return IE;case"back":return zE;case"entity":return PE;case"menu":return NE;case"quickbar":return OE;case"weather":return BE;case"conditional":return LE;case"light":return DE;case"template":return jE;case"spacer":return HE}return Co()})),alignment:$o(Eo())})),UE=class extends Hf{connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,RE),this._config=t}get _title(){return this._config.title||""}get _theme(){return this._config.theme||""}render(){var t;if(!this.hass||!this._config)return et;if(this._subElementEditorConfig)return J` + + + `;const e=ic(this.hass);return J` +
+ +
+ + `}_alignmentChanged(t){if(t.stopPropagation(),!this._config)return;const e=t.detail.value,o=ee({},this._config);e?o.alignment=e:delete o.alignment,ve(this,"config-changed",{config:o})}_valueChanged(t){var e,o,i;if(!this._config||!this.hass)return;const n=t.target,r=n.configValue||(null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type),a=null!==(o=null!==(i=n.checked)&&void 0!==i?i:t.detail.value)&&void 0!==o?o:n.value;if("chip"===r||t.detail&&t.detail.chips){const e=t.detail.chips||this._config.chips.concat();"chip"===r&&(a?e[this._subElementEditorConfig.index]=a:(e.splice(this._subElementEditorConfig.index,1),this._goBack()),this._subElementEditorConfig.elementConfig=a),this._config=ee(ee({},this._config),{},{chips:e})}else r&&(a?this._config=ee(ee({},this._config),{},{[r]:a}):(this._config=ee({},this._config),delete this._config[r]));ve(this,"config-changed",{config:this._config})}_handleSubElementChanged(t){var e;if(t.stopPropagation(),!this._config||!this.hass)return;const o=null===(e=this._subElementEditorConfig)||void 0===e?void 0:e.type,i=t.detail.config;if("chip"===o){const t=this._config.chips.concat();i?t[this._subElementEditorConfig.index]=i:(t.splice(this._subElementEditorConfig.index,1),this._goBack()),this._config=ee(ee({},this._config),{},{chips:t})}else o&&(""===i?(this._config=ee({},this._config),delete this._config[o]):this._config=ee(ee({},this._config),{},{[o]:i}));this._subElementEditorConfig=ee(ee({},this._subElementEditorConfig),{},{elementConfig:i}),ve(this,"config-changed",{config:this._config})}_editDetailElement(t){this._subElementEditorConfig=t.detail.subElementConfig}_goBack(){this._subElementEditorConfig=void 0}},gn([ie()],UE.prototype,"_config",void 0),gn([ie()],UE.prototype,"_subElementEditorConfig",void 0),UE=gn([Lt(Bk)],UE)});Vt(),Be(),pn(),Yf(),cg(),e_(),sk(),w$(),vn(),tg({type:Ok,name:"Mushroom Chips Card",description:"Card with chips to display informations"});var YE,qE,WE,XE=class extends Ot{static async getConfigElement(){return await Promise.resolve().then(()=>(KE(),GE)),document.createElement(Bk)}static async getStubConfig(t){const e=await Promise.all([h_.getStubConfig(t)]);return{type:`custom:${Ok}`,chips:e}}set hass(t){var e;const o=Vf(this._hass),i=Vf(t);o!==i&&this.toggleAttribute("dark-mode",i),this._hass=t,null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("div > *").forEach(e=>{e.hass=t})}getCardSize(){return 1}setConfig(t){this._config=t}render(){if(!this._config||!this._hass)return et;let t="";this._config.alignment&&(t=`align-${this._config.alignment}`);const e=zo(this._hass);return J` + +
+ ${this._config.chips.map(t=>this.renderChip(t))} +
+
+ `}renderChip(t){"conditional"===t.type&&tk();const e=Wg(t);return e?(this._hass&&(e.hass=this._hass),e.editMode=this.editMode||this.preview,e.preview=this.preview||this.editMode,J`${e}`):et}static get styles(){return[Hf.styles,l` + ha-card { + background: none; + box-shadow: none; + border-radius: 0; + border: none; + } + .chip-container { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: flex-start; + flex-wrap: wrap; + gap: var(--chip-spacing); + } + .chip-container.align-end { + justify-content: flex-end; + } + .chip-container.align-center { + justify-content: center; + } + .chip-container.align-justify { + justify-content: space-between; + } + `]}};gn([Gt()],XE.prototype,"preview",void 0),gn([Gt()],XE.prototype,"editMode",void 0),gn([ie()],XE.prototype,"_config",void 0),XE=gn([Lt(Ok)],XE);var ZE=kt(()=>{ug(),qE=`${YE=`${eg}-climate-card`}-editor`,WE=["climate"]});ZE();var JE={auto:"var(--rgb-state-climate-auto)",cool:"var(--rgb-state-climate-cool)",dry:"var(--rgb-state-climate-dry)",fan_only:"var(--rgb-state-climate-fan-only)",heat:"var(--rgb-state-climate-heat)",heat_cool:"var(--rgb-state-climate-heat-cool)",off:"var(--rgb-state-climate-off)"},QE={cooling:"var(--rgb-state-climate-cool)",drying:"var(--rgb-state-climate-dry)",heating:"var(--rgb-state-climate-heat)",idle:"var(--rgb-state-climate-idle)",off:"var(--rgb-state-climate-off)"},tx={auto:"mdi:thermostat-auto",cool:"mdi:snowflake",dry:"mdi:water-percent",fan_only:"mdi:fan",heat:"mdi:fire",heat_cool:"mdi:sun-snowflake-variant",off:"mdi:power"},ex={cooling:"mdi:snowflake",drying:"mdi:water-percent",heating:"mdi:fire",idle:"mdi:clock-outline",off:"mdi:power"};function ox(t){var e;return null!==(e=JE[t])&&void 0!==e?e:JE.off}Vt(),Be(),Re(),pn(),vn();var ix=class extends Ot{constructor(...t){super(...t),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.mode;this.hass.callService("climate","set_hvac_mode",{entity_id:this.entity.entity_id,hvac_mode:e})}render(){const t=zo(this.hass),e=this.entity.attributes.hvac_modes.filter(t=>{var e;return(null!==(e=this.modes)&&void 0!==e?e:[]).includes(t)}).sort(Bo);return J` + + ${e.map(t=>this.renderModeButton(t))} + + `}renderModeButton(t){const e={},o="off"===t?"var(--rgb-grey)":ox(t);return t===this.entity.state&&(e["--icon-color"]=`rgb(${o})`,e["--bg-color"]=`rgba(${o}, 0.2)`),J` + + + + `;var i,n}};gn([Gt({attribute:!1})],ix.prototype,"hass",void 0),gn([Gt({attribute:!1})],ix.prototype,"entity",void 0),gn([Gt({attribute:!1})],ix.prototype,"modes",void 0),gn([Gt()],ix.prototype,"fill",void 0),ix=gn([Lt("mushroom-climate-hvac-modes-control")],ix),Vt(),Be(),je(),pn(),vn();var nx=class extends Ot{constructor(...t){super(...t),this.disabled=!1,this.formatOptions={},this.pending=!1,this.dispatchValue=t=>{this.pending=!1,this.dispatchEvent(new CustomEvent("change",{detail:{value:t}}))},this.debounceDispatchValue=this.dispatchValue}get _precision(){return Math.ceil(Math.log10(1/this._step))}get _step(){var t;return null!==(t=this.step)&&void 0!==t?t:1}_incrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=xe(this.value+this._step,this._precision);this._processNewValue(e)}_decrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=xe(this.value-this._step,this._precision);this._processNewValue(e)}firstUpdated(t){super.firstUpdated(t);const e=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--input-number-debounce"),o=parseFloat(e);return isNaN(o)?2e3:o})(this.container);e&&(this.debounceDispatchValue=Po(this.dispatchValue,e))}_processNewValue(t){const e=$e(t,this.min,this.max);this.value!==e&&(this.value=e,this.pending=!0),this.debounceDispatchValue(e)}render(){const t=null!=this.value?Se(this.value,this.locale,this.formatOptions):"-";return J` +
+ + + ${t} + + +
+ `}static get styles(){return l` + :host { + --text-color: var(--primary-text-color); + --text-color-disabled: rgb(var(--rgb-disabled)); + --icon-color: var(--primary-text-color); + --icon-color-disabled: rgb(var(--rgb-disabled)); + --bg-color: rgba(var(--rgb-primary-text-color), 0.05); + --bg-color-disabled: rgba(var(--rgb-disabled), 0.2); + height: var(--control-height); + width: calc(var(--control-height) * var(--control-button-ratio) * 3); + flex: none; + } + .container { + box-sizing: border-box; + width: 100%; + height: 100%; + padding: 6px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + border-radius: var(--control-border-radius); + border: none; + background-color: var(--bg-color); + transition: background-color 280ms ease-in-out; + height: var(--control-height); + overflow: hidden; + } + .button { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 4px; + border: none; + background: none; + cursor: pointer; + border-radius: var(--control-border-radius); + line-height: 0; + height: 100%; + } + .minus { + padding-right: 0; + } + .plus { + padding-left: 0; + } + .button:disabled { + cursor: not-allowed; + } + .button ha-icon { + font-size: var(--control-height); + --mdc-icon-size: var(--control-icon-size); + color: var(--icon-color); + pointer-events: none; + } + .button:disabled ha-icon { + color: var(--icon-color-disabled); + } + .value { + text-align: center; + flex-grow: 1; + flex-shrink: 0; + flex-basis: 20px; + font-weight: bold; + color: var(--text-color); + } + .value.disabled { + color: var(--text-color-disabled); + } + .value.pending { + opacity: 0.5; + } + `}};gn([Gt({attribute:!1})],nx.prototype,"locale",void 0),gn([Gt({type:Boolean})],nx.prototype,"disabled",void 0),gn([Gt({attribute:!1,type:Number,reflect:!0})],nx.prototype,"value",void 0),gn([Gt({type:Number})],nx.prototype,"step",void 0),gn([Gt({type:Number})],nx.prototype,"min",void 0),gn([Gt({type:Number})],nx.prototype,"max",void 0),gn([Gt({attribute:!1})],nx.prototype,"formatOptions",void 0),gn([ie()],nx.prototype,"pending",void 0),gn([le("#container")],nx.prototype,"container",void 0),nx=gn([Lt("mushroom-input-number")],nx),Vt(),Be(),Re(),pn(),vn();var rx,ax,sx=class extends Ot{constructor(...t){super(...t),this.fill=!1}get _stepSize(){return this.entity.attributes.target_temp_step?this.entity.attributes.target_temp_step:"°F"===this.hass.config.unit_system.temperature?1:.5}_supportsTarget(){return"climate"===ye(this.entity)&&we(this.entity,Lo.TARGET_TEMPERATURE)}_supportsTargetRange(){return"climate"===ye(this.entity)&&we(this.entity,Lo.TARGET_TEMPERATURE_RANGE)}onValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,temperature:e})}onLowValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:e,target_temp_high:this.entity.attributes.target_temp_high})}onHighValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:this.entity.attributes.target_temp_low,target_temp_high:e})}render(){const t=zo(this.hass),e=qo(this.entity),o=1===this._stepSize?{maximumFractionDigits:0}:{minimumFractionDigits:1,maximumFractionDigits:1},i=t=>({"--bg-color":`rgba(var(--rgb-state-climate-${t}), 0.05)`,"--icon-color":`rgb(var(--rgb-state-climate-${t}))`,"--text-color":`rgb(var(--rgb-state-climate-${t}))`}),n=this._supportsTarget(),r=this._supportsTargetRange(),a=null!=this.entity.attributes.temperature,s=null!=this.entity.attributes.target_temp_low&&null!=this.entity.attributes.target_temp_high,l=n&&a,c=!l&&r&&s;return J` + + ${l?J` + + `:et} + ${c?J` + + `:et} + + `}};gn([Gt({attribute:!1})],sx.prototype,"hass",void 0),gn([Gt({attribute:!1})],sx.prototype,"entity",void 0),gn([Gt()],sx.prototype,"fill",void 0),sx=gn([Lt("mushroom-climate-temperature-control")],sx);var lx,cx,ux,hx=kt(()=>{To(),_g(),jg(),Vg(),Fg(),rx=["auto","heat_cool","heat","cool","dry","fan_only","off"],ax=mo(Pg,mo(zg,gg,sg),Co({show_temperature_control:$o(bo()),hvac_modes:$o(vo(Eo())),collapsible_controls:$o(bo())}))}),dx=/* @__PURE__ */$t({ClimateCardEditor:()=>ux}),px=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),hx(),vn(),lx=["hvac_modes","show_temperature_control"],cx=vi((t,e,o)=>[{name:"entity",selector:{entity:{domain:WE}}},Ag(o),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(e),{type:"grid",name:"",schema:[{name:"hvac_modes",selector:{select:{options:rx.map(e=>({value:e,label:t(`component.climate.entity_component._.state.${e}`)})),mode:"dropdown",multiple:!0}}},{name:"show_temperature_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg()]),ux=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):lx.includes(t.name)?e(`editor.card.climate.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,ax),this._config=t}render(){if(!this.hass||!this._config)return et;const t=ic(this.hass),e=cx(this.hass.localize,t,this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],ux.prototype,"_config",void 0),ux=gn([Lt(qE)],ux)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),cg(),Xf(),ZE(),vn(),oe();var mx={temperature_control:"mdi:thermometer",hvac_mode_control:"mdi:thermostat"};tg({type:YE,name:"Mushroom Climate Card",description:"Card for climate entity"});var fx,gx,_x,vx=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(px(),dx)),document.createElement(qE)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>WE.includes(t.split(".")[0]));return{type:`custom:${YE}`,entity:e[0]}}get _controls(){if(!this._config||!this._stateObj)return[];const t=this._stateObj,e=[];var o;return(null!=(o=t).attributes.temperature||null!=o.attributes.target_temp_low&&null!=o.attributes.target_temp_high)&&this._config.show_temperature_control&&e.push("temperature_control"),((t,e)=>(t.attributes.hvac_modes||[]).some(t=>(null!=e?e:[]).includes(t)))(t,this._config.hvac_modes)&&e.push("hvac_mode_control"),e}get hasControls(){return this._controls.length>0}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}setConfig(t){super.setConfig(ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updateActiveControl()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updateActiveControl()}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type);let r=this.hass.formatEntityState(t);if(null!==t.attributes.current_temperature){r+=` ⸱ ${this.hass.formatEntityAttributeValue(t,"current_temperature")}`}const a=zo(this.hass),s=(!this._config.collapsible_controls||Yo(t))&&this._controls.length;return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e,r)}; + + ${s?J` +
+ ${this.renderActiveControl(t)} + ${this.renderOtherControls()} +
+ `:et} +
+
+ `}renderIcon(t,e){const o=qo(t),i=ox(t.state),n={};return n["--icon-color"]=`rgb(${i})`,n["--shape-color"]=`rgba(${i}, 0.2)`,J` + + + + `}renderBadge(t){return qo(t)?this.renderActionBadge(t):super.renderBadge(t)}renderActionBadge(t){const e=t.attributes.hvac_action;if(!e||"off"==e)return et;const o=null!==(i=QE[e])&&void 0!==i?i:QE.off;var i;const n=function(t){var e;return null!==(e=ex[t])&&void 0!==e?e:""}(e);return n?J` + + `:et}renderOtherControls(){return J` + ${this._controls.filter(t=>t!=this._activeControl).map(t=>J` + this._onControlTap(t,e)}> + + + `)} + `}renderActiveControl(t){var e;const o=null!==(e=this._config.hvac_modes)&&void 0!==e?e:[],i=Dn(this._config);switch(this._activeControl){case"temperature_control":return J` + + `;case"hvac_mode_control":return J` + + `;default:return et}}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-climate-temperature-control, + mushroom-climate-hvac-modes-control { + flex: 1; + } + `]}};gn([ie()],vx.prototype,"_activeControl",void 0),vx=gn([Lt(YE)],vx);var bx=kt(()=>{ug(),gx=`${fx=`${eg}-cover-card`}-editor`,_x=["cover"]});bx();Vt(),Be(),pn(),vn();var yx=class extends Ot{constructor(...t){super(...t),this.fill=!1}_onOpenTap(t){t.stopPropagation(),this.hass.callService("cover","open_cover",{entity_id:this.entity.entity_id})}_onCloseTap(t){t.stopPropagation(),this.hass.callService("cover","close_cover",{entity_id:this.entity.entity_id})}_onStopTap(t){t.stopPropagation(),this.hass.callService("cover","stop_cover",{entity_id:this.entity.entity_id})}get openDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?100===e.attributes.current_position:"open"===e.state)||function(t){return"opening"===t.state}(this.entity))&&!t;var e}get closedDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?0===e.attributes.current_position:"closed"===e.state)||function(t){return"closing"===t.state}(this.entity))&&!t;var e}render(){const t=zo(this.hass);return J` + + ${we(this.entity,1)?J` + + {switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-expand-horizontal";default:return"mdi:arrow-up"}})(this.entity)}> + + `:void 0} + ${we(this.entity,8)?J` + + + + `:void 0} + ${we(this.entity,2)?J` + + {switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-collapse-horizontal";default:return"mdi:arrow-down"}})(this.entity)}> + + `:void 0} + + `}};gn([Gt({attribute:!1})],yx.prototype,"hass",void 0),gn([Gt({attribute:!1})],yx.prototype,"entity",void 0),gn([Gt()],yx.prototype,"fill",void 0),yx=gn([Lt("mushroom-cover-buttons-control")],yx);var wx=/* @__PURE__ */Ct((t,e)=>{!function(t,o,i,n){var r,a=["","webkit","Moz","MS","ms","o"],s=o.createElement("div"),l=Math.round,c=Math.abs,u=Date.now;function h(t,e,o){return setTimeout(v(t,o),e)}function d(t,e,o){return!!Array.isArray(t)&&(p(t,o[e],o),!0)}function p(t,e,o){var i;if(t)if(t.forEach)t.forEach(e,o);else if(t.length!==n)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,n,i),e.apply(this,arguments)}}r="function"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),o=1;o-1}function E(t){return t.trim().split(/\s+/g)}function x(t,e,o){if(t.indexOf&&!o)return t.indexOf(e);for(var i=0;io[e]}):i.sort()),i}function T(t,e){for(var o,i,r=e[0].toUpperCase()+e.slice(1),s=0;s1&&!o.firstMultiple?o.firstMultiple=U(e):1===r&&(o.firstMultiple=!1);var a=o.firstInput,s=o.firstMultiple,l=s?s.center:a.center,h=e.center=V(i);e.timeStamp=u(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=Y(l,h),e.distance=K(l,h),function(t,e){var o=e.center,i=t.offsetDelta||{},n=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(n=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:o.x,y:o.y});e.deltaX=n.x+(o.x-i.x),e.deltaY=n.y+(o.y-i.y)}(o,e),e.offsetDirection=G(e.deltaX,e.deltaY);var d=F(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=c(d.x)>c(d.y)?d.x:d.y,e.scale=s?(p=s.pointers,m=i,K(m[0],m[1],j)/K(p[0],p[1],j)):1,e.rotation=s?function(t,e){return Y(e[1],e[0],j)+Y(t[1],t[0],j)}(s.pointers,i):0,e.maxPointers=o.prevInput?e.pointers.length>o.prevInput.maxPointers?e.pointers.length:o.prevInput.maxPointers:e.pointers.length,function(t,e){var o,i,r,a,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(l>25||s.velocity===n)){var u=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,d=F(l,u,h);i=d.x,r=d.y,o=c(d.x)>c(d.y)?d.x:d.y,a=G(u,h),t.lastInterval=e}else o=s.velocity,i=s.velocityX,r=s.velocityY,a=s.direction;e.velocity=o,e.velocityX=i,e.velocityY=r,e.direction=a}(o,e);var p,m;var f=t.element;C(e.srcEvent.target,f)&&(f=e.srcEvent.target);e.target=f}(t,o),t.emit("hammer.input",o),t.recognize(o),t.session.prevInput=o}function U(t){for(var e=[],o=0;o=c(e)?t<0?2:4:e<0?8:16}function K(t,e,o){o||(o=D);var i=e[o[0]]-t[o[0]],n=e[o[1]]-t[o[1]];return Math.sqrt(i*i+n*n)}function Y(t,e,o){o||(o=D);var i=e[o[0]]-t[o[0]],n=e[o[1]]-t[o[1]];return 180*Math.atan2(n,i)/Math.PI}H.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(I(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(I(this.element),this.evWin,this.domHandler)}};var q={mousedown:1,mousemove:2,mouseup:4},W="mousedown",X="mousemove mouseup";function Z(){this.evEl=W,this.evWin=X,this.pressed=!1,H.apply(this,arguments)}_(Z,H,{handler:function(t){var e=q[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:B,srcEvent:t}))}});var J={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:O,3:"pen",4:B,5:"kinect"},tt="pointerdown",et="pointermove pointerup pointercancel";function ot(){this.evEl=tt,this.evWin=et,H.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(tt="MSPointerDown",et="MSPointerMove MSPointerUp MSPointerCancel"),_(ot,H,{handler:function(t){var e=this.store,o=!1,i=J[t.type.toLowerCase().replace("ms","")],n=Q[t.pointerType]||t.pointerType,r=n==O,a=x(e,t.pointerId,"pointerId");1&i&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):12&i&&(o=!0),a<0||(e[a]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:n,srcEvent:t}),o&&e.splice(a,1))}});var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,H.apply(this,arguments)}function rt(t,e){var o=A(t.touches),i=A(t.changedTouches);return 12&e&&(o=S(o.concat(i),"identifier",!0)),[o,i]}_(nt,H,{handler:function(t){var e=it[t.type];if(1===e&&(this.started=!0),this.started){var o=rt.call(this,t,e);12&e&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:o[0],changedPointers:o[1],pointerType:O,srcEvent:t})}}});var at={touchstart:1,touchmove:2,touchend:4,touchcancel:8},st="touchstart touchmove touchend touchcancel";function lt(){this.evTarget=st,this.targetIds={},H.apply(this,arguments)}function ct(t,e){var o=A(t.touches),i=this.targetIds;if(3&e&&1===o.length)return i[o[0].identifier]=!0,[o,o];var n,r,a=A(t.changedTouches),s=[],l=this.target;if(r=o.filter(function(t){return C(t.target,l)}),1===e)for(n=0;n-1&&i.splice(t,1)},2500)}}function pt(t){for(var e=t.srcEvent.clientX,o=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,o=this.state;function i(o){e.manager.emit(o,t)}o<8&&i(e.options.event+xt(o)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),o>=8&&i(e.options.event+xt(o))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=$t},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return Tt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=At(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(It,Tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[bt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),_(zt,Et,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[_t]},process:function(t){var e=this.options,o=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!o||12&t.eventType&&!n)this.reset();else if(1&t.eventType)this.reset(),this._timer=h(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8;return $t},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),_(Pt,Tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[bt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Nt,Tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Mt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,o=this.options.direction;return 30&o?e=t.overallVelocity:6&o?e=t.overallVelocityX:o&L&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&o&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=At(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(Ot,Et,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[vt]},process:function(t){var e=this.options,o=t.pointers.length===e.pointers,i=t.distance{const e=t.center.x,o=t.target.getBoundingClientRect().left,i=t.target.clientWidth;return Math.max(Math.min(1,(e-o)/i),0)},Cx=class extends Ot{constructor(...t){super(...t),this.disabled=!1,this.inactive=!1,this.step=1,this.min=0,this.max=100,this.controlled=!1}valueToPercentage(t){return(t-this.min)/(this.max-this.min)}percentageToValue(t){return(this.max-this.min)*t+this.min}firstUpdated(t){super.firstUpdated(t),this.setupListeners()}connectedCallback(){super.connectedCallback(),this.setupListeners()}disconnectedCallback(){super.disconnectedCallback(),this.destroyListeners()}setupListeners(){if(this.slider&&!this._mc){const t=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--slider-threshold"),o=parseFloat(e);return isNaN(o)?10:o})(this.slider);let e;this._mc=new Hammer.Manager(this.slider,{touchAction:"pan-y"}),this._mc.add(new Hammer.Pan({threshold:t,direction:Hammer.DIRECTION_ALL,enable:!0})),this._mc.add(new Hammer.Tap({event:"singletap"})),this._mc.on("panstart",()=>{this.disabled||(this.controlled=!0,e=this.value)}),this._mc.on("pancancel",()=>{this.disabled||(this.controlled=!1,this.value=e)}),this._mc.on("panmove",t=>{if(this.disabled)return;const e=kx(t);this.value=this.percentageToValue(e),this.dispatchEvent(new CustomEvent("current-change",{detail:{value:Math.round(this.value/this.step)*this.step}}))}),this._mc.on("panend",t=>{if(this.disabled)return;this.controlled=!1;const e=kx(t);this.value=Math.round(this.percentageToValue(e)/this.step)*this.step,this.dispatchEvent(new CustomEvent("current-change",{detail:{value:void 0}})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value}}))}),this._mc.on("singletap",t=>{if(this.disabled)return;const e=kx(t);this.value=Math.round(this.percentageToValue(e)/this.step)*this.step,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value}}))})}}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}render(){var t;return J` +
+
+
+ ${this.showActive?J`
`:et} + ${this.showIndicator?J`
`:et} +
+
+ `}static get styles(){return l` + :host { + --main-color: rgba(var(--rgb-secondary-text-color), 1); + --bg-gradient: none; + --bg-color: rgba(var(--rgb-secondary-text-color), 0.2); + --main-color-inactive: rgb(var(--rgb-disabled)); + --bg-color-inactive: rgba(var(--rgb-disabled), 0.2); + } + .container { + display: flex; + flex-direction: row; + height: var(--control-height); + } + .slider { + position: relative; + height: 100%; + width: 100%; + border-radius: var(--control-border-radius); + transform: translateZ(0); + overflow: hidden; + cursor: pointer; + } + .slider * { + pointer-events: none; + } + .slider .slider-track-background { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background-color: var(--bg-color); + background-image: var(--gradient); + } + .slider .slider-track-active { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + transform: scale3d(var(--value, 0), 1, 1); + transform-origin: left; + background-color: var(--main-color); + transition: transform 180ms ease-in-out; + } + .slider .slider-track-indicator { + position: absolute; + top: 0; + bottom: 0; + left: calc(var(--value, 0) * (100% - 10px)); + width: 10px; + border-radius: 3px; + background-color: white; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); + transition: left 180ms ease-in-out; + } + .slider .slider-track-indicator:after { + display: block; + content: ""; + background-color: var(--main-color); + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + margin: auto; + height: 20px; + width: 2px; + border-radius: 1px; + } + .inactive .slider .slider-track-background { + background-color: var(--bg-color-inactive); + background-image: none; + } + .inactive .slider .slider-track-indicator:after { + background-color: var(--main-color-inactive); + } + .inactive .slider .slider-track-active { + background-color: var(--main-color-inactive); + } + .controlled .slider .slider-track-active { + transition: none; + } + .controlled .slider .slider-track-indicator { + transition: none; + } + `}};function $x(t){return null!=t.attributes.current_position?Math.round(t.attributes.current_position):void 0}function Ex(t){const e=t.state;return"open"===e||"opening"===e?"var(--rgb-state-cover-open)":"closed"===e||"closing"===e?"var(--rgb-state-cover-closed)":"var(--rgb-disabled)"}gn([Gt({type:Boolean})],Cx.prototype,"disabled",void 0),gn([Gt({type:Boolean})],Cx.prototype,"inactive",void 0),gn([Gt({type:Boolean,attribute:"show-active"})],Cx.prototype,"showActive",void 0),gn([Gt({type:Boolean,attribute:"show-indicator"})],Cx.prototype,"showIndicator",void 0),gn([Gt({attribute:!1,type:Number,reflect:!0})],Cx.prototype,"value",void 0),gn([Gt({type:Number})],Cx.prototype,"step",void 0),gn([Gt({type:Number})],Cx.prototype,"min",void 0),gn([Gt({type:Number})],Cx.prototype,"max",void 0),gn([ie()],Cx.prototype,"controlled",void 0),gn([le("#slider")],Cx.prototype,"slider",void 0),Cx=gn([Lt("mushroom-slider")],Cx),Vt(),Be(),pn(),vn();var xx=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("cover","set_cover_position",{entity_id:this.entity.entity_id,position:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){return J` + + `}static get styles(){return l` + mushroom-slider { + --main-color: var(--slider-color); + --bg-color: var(--slider-bg-color); + } + `}};gn([Gt({attribute:!1})],xx.prototype,"hass",void 0),gn([Gt({attribute:!1})],xx.prototype,"entity",void 0),xx=gn([Lt("mushroom-cover-position-control")],xx),Vt(),Be(),pn(),vn();var Ax,Sx=function(t=24,e=.2){const o=[];for(let i=0;i + `;var t}static get styles(){return l` + mushroom-slider { + --main-color: var(--slider-color); + --bg-color: var(--slider-bg-color); + --gradient: -webkit-linear-gradient(right, ${s(Sx.map(([t,e])=>`${e} ${100*t}%`).join(", "))}); + } + `}};gn([Gt({attribute:!1})],Tx.prototype,"hass",void 0),gn([Gt({attribute:!1})],Tx.prototype,"entity",void 0),Tx=gn([Lt("mushroom-cover-tilt-position-control")],Tx);var Mx,Ix,zx,Px=kt(()=>{To(),_g(),jg(),Vg(),Fg(),Ax=mo(Pg,mo(zg,gg,sg),Co({show_buttons_control:$o(bo()),show_position_control:$o(bo()),show_tilt_position_control:$o(bo())}))}),Nx=/* @__PURE__ */$t({CoverCardEditor:()=>zx}),Ox=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),Px(),vn(),Mx=["show_buttons_control","show_position_control","show_tilt_position_control"],Ix=vi((t,e)=>[{name:"entity",selector:{entity:{domain:_x}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),{type:"grid",name:"",schema:[{name:"show_position_control",selector:{boolean:{}}},{name:"show_tilt_position_control",selector:{boolean:{}}},{name:"show_buttons_control",selector:{boolean:{}}}]},...lg()]),zx=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):Mx.includes(t.name)?e(`editor.card.cover.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,Ax),this._config=t}render(){if(!this.hass||!this._config)return et;const t=Ix(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],zx.prototype,"_config",void 0),zx=gn([Lt(gx)],zx)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),cg(),Xf(),bx(),vn(),oe();var Bx={buttons_control:"mdi:gesture-tap-button",position_control:"mdi:gesture-swipe-horizontal",tilt_position_control:"mdi:rotate-right"};tg({type:fx,name:"Mushroom Cover Card",description:"Card for cover entity"});var Lx,Dx,jx=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(Ox(),Nx)),document.createElement(gx)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>_x.includes(t.split(".")[0]));return{type:`custom:${fx}`,entity:e[0]}}get hasControls(){return this._controls.length>0}get _nextControl(){var t;if(this._activeControl)return null!==(t=this._controls[this._controls.indexOf(this._activeControl)+1])&&void 0!==t?t:this._controls[0]}_onNextControlTap(t){t.stopPropagation(),this._activeControl=this._nextControl}getCardSize(){return 1}setConfig(t){super.setConfig(ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updateActiveControl(),this.updatePosition()}get _controls(){if(!this._config||!this._stateObj)return[];const t=[];return this._config.show_buttons_control&&t.push("buttons_control"),this._config.show_position_control&&t.push("position_control"),this._config.show_tilt_position_control&&t.push("tilt_position_control"),t}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updatePosition(),this.updateActiveControl())}updatePosition(){this.position=void 0;const t=this._stateObj;t&&(this.position=$x(t))}onCurrentPositionChange(t){null!=t.detail.value&&(this.position=t.detail.value)}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type);let r=this.hass.formatEntityState(t);if(this.position){r+=` ⸱ ${this.hass.formatEntityAttributeValue(t,"current_position",this.position)}`}const a=zo(this.hass);return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e,r)}; + + ${this._controls.length>0?J` +
+ ${this.renderActiveControl(t,i.layout)} + ${this.renderNextControlButton()} +
+ `:et} +
+
+ `}renderIcon(t,e){const o={},i=qo(t),n=Ex(t);return o["--icon-color"]=`rgb(${n})`,o["--shape-color"]=`rgba(${n}, 0.2)`,J` + + + `}renderNextControlButton(){return this._nextControl&&this._nextControl!=this._activeControl?J` + + + + `:et}renderActiveControl(t,e){switch(this._activeControl){case"buttons_control":return J` + + `;case"position_control":{const e=Ex(t),o={};return o["--slider-color"]=`rgb(${e})`,o["--slider-bg-color"]=`rgba(${e}, 0.2)`,J` + + `}case"tilt_position_control":{const e=Ex(t),o={};return o["--slider-color"]=`rgb(${e})`,o["--slider-bg-color"]=`rgba(${e}, 0.2)`,J` + + `}default:return et}}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-cover)); + --shape-color: rgba(var(--rgb-state-cover), 0.2); + } + mushroom-cover-buttons-control, + mushroom-cover-position-control { + flex: 1; + } + mushroom-cover-tilt-position-control { + flex: 1; + } + `]}};gn([ie()],jx.prototype,"_activeControl",void 0),gn([ie()],jx.prototype,"position",void 0),jx=gn([Lt(fx)],jx);var Hx,Rx=kt(()=>{ug(),Dx=`${Lx=`${eg}-empty-card`}-editor`}),Ux=/* @__PURE__ */$t({EntityCardEditor:()=>Hx}),Vx=kt(()=>{Vt(),Be(),Oc(),Yf(),Rx(),vn(),Hx=class extends Hf{setConfig(){}render(){return J` +

${ic(this.hass)("editor.card.empty.no_config_options")}

+ `}},gn([ie()],Hx.prototype,"_config",void 0),Hx=gn([Lt(Dx)],Hx)});Vt(),Be(),Yf(),cg(),Rx(),vn(),tg({type:Lx,name:"Mushroom Empty Card",description:"The empty card allows you to add a placeholder between your cards."});var Fx,Gx,Kx=class extends Hf{constructor(...t){super(...t),this.preview=!1}static async getConfigElement(){return await Promise.resolve().then(()=>(Vx(),Ux)),document.createElement(Dx)}getCardSize(){return 1}getGridOptions(){return{rows:1,columns:6}}setConfig(){}render(){return this.preview?J` + + + + `:et}static get styles(){return[super.styles,l` + :host { + display: block; + height: 100%; + } + + ha-card { + background: none; + height: 100%; + min-height: 56px; + display: flex; + justify-content: center; + align-items: center; + --mdc-icon-size: 40px; + --icon-primary-color: var(--divider-color, rgba(0, 0, 0, 0.12)); + } + `]}};gn([Gt({type:Boolean})],Kx.prototype,"preview",void 0),Kx=gn([Lt(Lx)],Kx);var Yx,qx,Wx,Xx=kt(()=>{ug(),Gx=`${Fx=`${eg}-entity-card`}-editor`}),Zx=kt(()=>{To(),_g(),jg(),Vg(),Fg(),Yx=mo(Pg,mo(zg,gg,sg),Co({icon_color:$o(Eo())}))}),Jx=/* @__PURE__ */$t({EntityCardEditor:()=>Wx}),Qx=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),Xx(),Zx(),vn(),qx=vi((t,e)=>[{name:"entity",selector:{entity:{}}},Ag(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...$g(t),...lg()]),Wx=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,Yx),this._config=t}render(){if(!this.hass||!this._config)return et;const t=qx(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],Wx.prototype,"_config",void 0),Wx=gn([Lt(Gx)],Wx)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),Rf(),cg(),Xf(),Xx(),vn(),tg({type:Fx,name:"Mushroom Entity Card",description:"Card for all entities"});var tA,eA,oA,iA=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(Qx(),Jx)),document.createElement(Gx)}static async getStubConfig(t){const e=Object.keys(t.states);return{type:`custom:${Fx}`,entity:e[0]}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=zo(this.hass);return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e)}; + + + + `}renderIcon(t,e){var o;const i=Yo(t),n={},r=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(r){const t=Lf(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return J` + + + + `}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-entity)); + --shape-color: rgba(var(--rgb-state-entity), 0.2); + } + `]}};iA=gn([Lt(Fx)],iA);var nA=kt(()=>{ug(),eA=`${tA=`${eg}-fan-card`}-editor`,oA=["fan"]});function rA(t){return null!=t.attributes.percentage?Math.round(t.attributes.percentage):void 0}function aA(t){return null!=t.attributes.oscillating&&Boolean(t.attributes.oscillating)}nA(),Vt(),Be(),je(),pn(),vn();var sA=class extends Ot{_onTap(t){t.stopPropagation();const e=aA(this.entity);this.hass.callService("fan","oscillate",{entity_id:this.entity.entity_id,oscillating:!e})}render(){const t=aA(this.entity),e=Yo(this.entity);return J` + + + + `}static get styles(){return l` + :host { + display: flex; + } + mushroom-button.active { + --icon-color: rgb(var(--rgb-state-fan)); + --bg-color: rgba(var(--rgb-state-fan), 0.2); + } + `}};gn([Gt({attribute:!1})],sA.prototype,"hass",void 0),gn([Gt({attribute:!1})],sA.prototype,"entity",void 0),sA=gn([Lt("mushroom-fan-oscillate-control")],sA),Vt(),Be(),pn(),vn();var lA=class extends Ot{_onTap(t){t.stopPropagation();const e="forward"===this.entity.attributes.direction?"reverse":"forward";this.hass.callService("fan","set_direction",{entity_id:this.entity.entity_id,direction:e})}render(){const t=this.entity.attributes.direction,e=Yo(this.entity);return J` + + + + `}static get styles(){return l` + :host { + display: flex; + } + `}};gn([Gt({attribute:!1})],lA.prototype,"hass",void 0),gn([Gt({attribute:!1})],lA.prototype,"entity",void 0),lA=gn([Lt("mushroom-fan-direction-control")],lA),Vt(),Be(),pn(),vn();var cA,uA=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("fan","set_percentage",{entity_id:this.entity.entity_id,percentage:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){return J` + + `;var t}static get styles(){return l` + mushroom-slider { + --main-color: rgb(var(--rgb-state-fan)); + --bg-color: rgba(var(--rgb-state-fan), 0.2); + } + `}};gn([Gt({attribute:!1})],uA.prototype,"hass",void 0),gn([Gt({attribute:!1})],uA.prototype,"entity",void 0),uA=gn([Lt("mushroom-fan-percentage-control")],uA);var hA,dA,pA,mA=kt(()=>{To(),_g(),jg(),Vg(),Fg(),cA=mo(Pg,mo(zg,gg,sg),Co({icon_animation:$o(bo()),show_percentage_control:$o(bo()),show_oscillate_control:$o(bo()),show_direction_control:$o(bo()),collapsible_controls:$o(bo())}))}),fA=/* @__PURE__ */$t({FanCardEditor:()=>pA}),gA=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),mA(),vn(),hA=["icon_animation","show_percentage_control","show_oscillate_control","show_direction_control"],dA=vi((t,e)=>[{name:"entity",selector:{entity:{domain:oA}}},Ag(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_animation",selector:{boolean:{}}}]},...$g(t),{type:"grid",name:"",schema:[{name:"show_percentage_control",selector:{boolean:{}}},{name:"show_oscillate_control",selector:{boolean:{}}},{name:"show_direction_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg()]),pA=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):hA.includes(t.name)?e(`editor.card.fan.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,cA),this._config=t}render(){if(!this.hass||!this._config)return et;const t=dA(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],pA.prototype,"_config",void 0),pA=gn([Lt(eA)],pA)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),cg(),Xf(),nA(),vn(),oe(),tg({type:tA,name:"Mushroom Fan Card",description:"Card for fan entity"});var _A,vA,bA,yA=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(gA(),fA)),document.createElement(eA)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>oA.includes(t.split(".")[0]));return{type:`custom:${tA}`,entity:e[0]}}get hasControls(){var t,e,o;return Boolean(null===(t=this._config)||void 0===t?void 0:t.show_percentage_control)||Boolean(null===(e=this._config)||void 0===e?void 0:e.show_oscillate_control)||Boolean(null===(o=this._config)||void 0===o?void 0:o.show_direction_control)}setConfig(t){super.setConfig(ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updatePercentage()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updatePercentage()}updatePercentage(){this.percentage=void 0;const t=this._stateObj;this._config&&this.hass&&t&&(this.percentage=rA(t))}onCurrentPercentageChange(t){null!=t.detail.value&&(this.percentage=Math.round(t.detail.value))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type);let r=this.hass.formatEntityState(t);null!=this.percentage&&"on"===t.state&&(r=this.hass.formatEntityAttributeValue(t,"percentage",this.percentage));const a=zo(this.hass),s=(!this._config.collapsible_controls||Yo(t))&&(this._config.show_percentage_control||this._config.show_oscillate_control||this._config.show_direction_control);return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e,r)}; + + ${s?J` +
+ ${this._config.show_percentage_control?J` + + `:et} + ${this._config.show_oscillate_control?J` + + `:et} + ${this._config.show_direction_control?J` + + `:et} +
+ `:et} +
+
+ `}renderIcon(t,e){var o;let i={};const n=rA(t),r=Yo(t);return r&&(i["--animation-duration"]=n?1/(1.5*(n/100)**.5)+"s":"1s"),J` + + + + `}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-fan)); + --shape-color: rgba(var(--rgb-state-fan), 0.2); + } + ha-state-icon { + animation: none; + transform: translateZ(0); + } + .spin ha-state-icon { + animation: var(--animation-duration) infinite linear spin; + } + mushroom-fan-percentage-control { + flex: 1; + } + `]}};gn([ie()],yA.prototype,"percentage",void 0),yA=gn([Lt(tA)],yA);var wA=kt(()=>{ug(),vA=`${_A=`${eg}-humidifier-card`}-editor`,bA=["humidifier"]});wA(),Vt(),Be(),pn(),vn();var kA,CA=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("humidifier","set_humidity",{entity_id:this.entity.entity_id,humidity:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=this.entity.attributes.max_humidity||100,e=this.entity.attributes.min_humidity||0;return J``}static get styles(){return l` + mushroom-slider { + --main-color: rgb(var(--rgb-state-humidifier)); + --bg-color: rgba(var(--rgb-state-humidifier), 0.2); + } + `}};gn([Gt({attribute:!1})],CA.prototype,"hass",void 0),gn([Gt({attribute:!1})],CA.prototype,"entity",void 0),gn([Gt({attribute:!1})],CA.prototype,"color",void 0),CA=gn([Lt("mushroom-humidifier-humidity-control")],CA);var $A,EA,xA,AA=kt(()=>{To(),_g(),jg(),Vg(),Fg(),kA=mo(Pg,mo(zg,gg,sg),Co({show_target_humidity_control:$o(bo()),collapsible_controls:$o(bo())}))}),SA=/* @__PURE__ */$t({HumidifierCardEditor:()=>xA}),TA=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),AA(),vn(),$A=["show_target_humidity_control"],EA=vi((t,e)=>[{name:"entity",selector:{entity:{domain:bA}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),{type:"grid",name:"",schema:[{name:"show_target_humidity_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg()]),xA=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):$A.includes(t.name)?e(`editor.card.humidifier.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,kA),this._config=t}render(){if(!this.hass||!this._config)return et;const t=EA(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],xA.prototype,"_config",void 0),xA=gn([Lt(vA)],xA)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),cg(),Xf(),wA(),vn(),oe(),tg({type:_A,name:"Mushroom Humidifier Card",description:"Card for humidifier entity"});var MA=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(TA(),SA)),document.createElement(vA)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>bA.includes(t.split(".")[0]));return{type:`custom:${_A}`,entity:e[0]}}get hasControls(){var t;return Boolean(null===(t=this._config)||void 0===t?void 0:t.show_target_humidity_control)}setConfig(t){super.setConfig(ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type);let r=this.hass.formatEntityState(t);if(null!==t.attributes.current_humidity){r+=` ⸱ ${this.hass.formatEntityAttributeValue(t,"current_humidity")}`}const a=zo(this.hass),s=(!this._config.collapsible_controls||Yo(t))&&this._config.show_target_humidity_control;return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e,r)}; + + ${s?J` +
+ +
+ `:et} +
+
+ `}renderBadge(t){return qo(t)?this.renderActionBadge(t):super.renderBadge(t)}renderActionBadge(t){const e=t.attributes.action;return e&&"off"!=e?J` + + `:et}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-humidifier)); + --shape-color: rgba(var(--rgb-state-humidifier), 0.2); + } + mushroom-humidifier-humidity-control { + flex: 1; + } + `]}};MA=gn([Lt(_A)],MA),Vt(),Be(),je(),Re(),pn(),On(),Bn(),Ln(),Yf(),dv(),Rf(),pv(),__(),mv(),vn(),oe();var IA=new R_(1e3),zA=["icon","icon_color","badge_color","badge_icon","primary","secondary","picture"],PA=class extends Hf{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(_v(),gv)),document.createElement(G_)}static async getStubConfig(t){return{type:`custom:${F_}`,primary:"Hello, {{user}}",secondary:"How are you?",icon:"mdi:home"}}getCardSize(){let t=1;return this._config?("vertical"===Dn(this._config).layout&&(t+=1),t):t}getLayoutOptions(){var t;const e={grid_columns:2,grid_rows:1};if(!this._config)return e;const o=Dn(this._config);return"vertical"===o.layout&&(e.grid_rows+=1),"horizontal"===o.layout&&(e.grid_columns=4),(null===(t=this._config)||void 0===t?void 0:t.multiline_secondary)&&(e.grid_rows=void 0),e}getGridOptions(){var t;const e={columns:6,rows:1};if(!this._config)return e;const o=Dn(this._config);return"vertical"===o.layout&&(e.rows+=1),"horizontal"===o.layout&&(e.columns=12),(null===(t=this._config)||void 0===t?void 0:t.multiline_secondary)&&(e.rows=void 0),e}setConfig(t){zA.forEach(e=>{var o,i;(null===(o=this._config)||void 0===o?void 0:o[e])===t[e]&&(null===(i=this._config)||void 0===i?void 0:i.entity)==t.entity||this._tryDisconnectKey(e)}),this._config=ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();IA.set(t,this._templateResults)}}_computeCacheKey(){return(0,yv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();IA.has(t)?this._templateResults=IA.get(t):this._templateResults={}}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}render(){if(!this._config||!this.hass)return et;const t=this.getValue("icon"),e=this.getValue("icon_color"),o=this.getValue("badge_icon"),i=this.getValue("badge_color"),n=this.getValue("primary"),r=this.getValue("secondary"),a=this.getValue("picture"),s=this._config.multiline_secondary,l=zo(this.hass),c=Dn({fill_container:this._config.fill_container,layout:this._config.layout,icon_type:Boolean(a)?"entity-picture":Boolean(t)?"icon":"none",primary_info:Boolean(n)?"name":"none",secondary_info:Boolean(r)?"state":"none"}),u=V_(t);return J` + + + + ${a?this.renderPicture(a):u?J`
${u}
`:t?this.renderIcon(t,e):et} + ${(t||a)&&o?this.renderBadgeIcon(o,i):void 0} + +
+
+
+ `}renderPicture(t){return J` + + `}renderIcon(t,e){const o={};if(e){const t=Lf(e);o["--icon-color"]=`rgb(${t})`,o["--shape-color"]=`rgba(${t}, 0.2)`}return J` + + + + `}renderBadgeIcon(t,e){const o={};return e&&(o["--main-color"]=`rgba(${Lf(e)})`),J` + + `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;zA.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;zA.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-disabled)); + --shape-color: rgba(var(--rgb-disabled), 0.2); + } + svg { + width: var(--icon-size); + height: var(--icon-size); + display: flex; + } + ${c_} + `]}};gn([ie()],PA.prototype,"_config",void 0),gn([ie()],PA.prototype,"_templateResults",void 0),gn([ie()],PA.prototype,"_unsubRenderTemplates",void 0),gn([Gt({reflect:!0,type:String})],PA.prototype,"layout",void 0),PA=gn([Lt(F_)],PA),Vt(),Be(),pn(),vn();var NA=class extends Ot{onChange(t){const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,brightness_pct:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){return J` + + `;var t}static get styles(){return l` + :host { + --slider-color: rgb(var(--rgb-state-light)); + --slider-outline-color: transparent; + --slider-bg-color: rgba(var(--rgb-state-light), 0.2); + } + mushroom-slider { + --main-color: var(--slider-color); + --bg-color: var(--slider-bg-color); + --main-outline-color: var(--slider-outline-color); + } + `}};gn([Gt({attribute:!1})],NA.prototype,"hass",void 0),gn([Gt({attribute:!1})],NA.prototype,"entity",void 0),NA=gn([Lt("mushroom-light-brightness-control")],NA),Bf(),Vt(),Be(),pn(),vn();var OA=[[0,"#f00"],[.17,"#ff0"],[.33,"#0f0"],[.5,"#0ff"],[.66,"#00f"],[.83,"#f0f"],[1,"#f00"]],BA=class extends Ot{constructor(...t){super(...t),this._percent=0}_percentToRGB(t){const e=uf({mode:"hsv",h:360*t,s:1,v:1});return e?[Math.round(255*e.r),Math.round(255*e.g),Math.round(255*e.b)]:[0,0,0]}_rgbToPercent(t){const e=cf({mode:"rgb",r:t[0]/255,g:t[1]/255,b:t[2]/255});return((null==e?void 0:e.h)||0)/360}onChange(t){const e=t.detail.value;this._percent=e;const o=this._percentToRGB(e/100);3===o.length&&this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,rgb_color:o})}render(){return J` + + `}static get styles(){return l` + mushroom-slider { + --gradient: -webkit-linear-gradient(left, ${s(OA.map(([t,e])=>`${e} ${100*t}%`).join(", "))}); + } + `}};gn([Gt({attribute:!1})],BA.prototype,"hass",void 0),gn([Gt({attribute:!1})],BA.prototype,"entity",void 0),BA=gn([Lt("mushroom-light-color-control")],BA),Xe();var LA=t=>{const e=t/100;return[Math.round(DA(e)),Math.round(jA(e)),Math.round(HA(e))]},DA=t=>t<=66?255:Ce(329.698727446*(t-60)**-.1332047592,0,255),jA=t=>{let e;return e=t<=66?99.4708025861*Math.log(t)-161.1195681661:288.1221695283*(t-60)**-.0755148492,Ce(e,0,255)},HA=t=>t>=66?255:t<=19?0:Ce(138.5177312231*Math.log(t-10)-305.0447927307,0,255);Vt(),Be(),Re(),Oi(),pn(),vn();var RA=class extends Ot{constructor(...t){super(...t),this._generateTemperatureGradient=vi((t,e)=>((t,e)=>{const o=[],i=(e-t)/10;for(let n=0;n<11;n++){const e=pk(LA(t+i*n));o.push([.1*n,e])}return o.map(([t,e])=>`${e} ${100*t}%`).join(", ")})(t,e))}onChange(t){t.stopPropagation();const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,color_temp_kelvin:e})}render(){var t,e;const o=null!=this.entity.attributes.color_temp_kelvin?this.entity.attributes.color_temp_kelvin:void 0,i=null!==(t=this.entity.attributes.min_color_temp_kelvin)&&void 0!==t?t:2700,n=null!==(e=this.entity.attributes.max_color_temp_kelvin)&&void 0!==e?e:6500,r=this._generateTemperatureGradient(i,n);return J` + + `}static get styles(){return l` + mushroom-slider { + --gradient: -webkit-linear-gradient(left, var(--temp-gradient)); + } + `}};gn([Gt({attribute:!1})],RA.prototype,"hass",void 0),gn([Gt({attribute:!1})],RA.prototype,"entity",void 0),RA=gn([Lt("mushroom-light-color-temp-control")],RA),Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),Rf(),cg(),Xf(),kk(),vn(),oe();var UA={brightness_control:"mdi:brightness-4",color_temp_control:"mdi:thermometer",color_control:"mdi:palette"};tg({type:ck,name:"Mushroom Light Card",description:"Card for light entity"});var VA,FA,GA,KA=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(Ek(),$k)),document.createElement(uk)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>hk.includes(t.split(".")[0]));return{type:`custom:${ck}`,entity:e[0]}}get _controls(){if(!this._config||!this._stateObj)return[];const t=this._stateObj,e=[];return this._config.show_brightness_control&&ei(t)&&e.push("brightness_control"),this._config.show_color_temp_control&&function(t){var e,o;return null!==(e=null===(o=t.attributes.supported_color_modes)||void 0===o?void 0:o.some(t=>[Zo.COLOR_TEMP].includes(t)))&&void 0!==e&&e}(t)&&e.push("color_temp_control"),this._config.show_color_control&&function(t){return ti(t)}(t)&&e.push("color_control"),e}get hasControls(){return this._controls.length>0}setConfig(t){super.setConfig(ee({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updateActiveControl(),this.updateBrightness()}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updateActiveControl(),this.updateBrightness())}updateBrightness(){this.brightness=void 0;const t=this._stateObj;t&&(this.brightness=t.attributes.brightness)}onCurrentBrightnessChange(t){null!=t.detail.value&&(this.brightness=255*t.detail.value/100)}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type);let r=this.hass.formatEntityState(t);null!=this.brightness&&(r=this.hass.formatEntityAttributeValue(t,"brightness",this.brightness));const a=zo(this.hass),s=(!this._config.collapsible_controls||Yo(t))&&this._controls.length;return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e,r)}; + + ${s?J` +
+ ${this.renderActiveControl(t)} + ${this.renderOtherControls()} +
+ `:et} +
+
+ `}renderIcon(t,e){var o,i;const n=mk(t),r=Yo(t),a={},s=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(n&&(null===(i=this._config)||void 0===i?void 0:i.use_light_color)){const t=fk(n).join(",");a["--icon-color"]=`rgb(${t})`,a["--shape-color"]=`rgba(${t}, 0.25)`}else if(s){const t=Lf(s);a["--icon-color"]=`rgb(${t})`,a["--shape-color"]=`rgba(${t}, 0.2)`}return J` + + + + `}renderOtherControls(){return J` + ${this._controls.filter(t=>t!=this._activeControl).map(t=>J` + this._onControlTap(t,e)}> + + + `)} + `}renderActiveControl(t){switch(this._activeControl){case"brightness_control":var e,o;const i=mk(t),n={},r=null===(e=this._config)||void 0===e?void 0:e.icon_color;if(i&&(null===(o=this._config)||void 0===o?void 0:o.use_light_color)){const t=fk(i).join(",");n["--slider-color"]=`rgb(${t})`,n["--slider-bg-color"]=`rgba(${t}, 0.2)`}else if(r){const t=Lf(r);n["--slider-color"]=`rgb(${t})`,n["--slider-bg-color"]=`rgba(${t}, 0.2)`}return J` + + `;case"color_temp_control":return J` + + `;case"color_control":return J` + + `;default:return et}}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-light)); + --shape-color: rgba(var(--rgb-state-light), 0.2); + } + mushroom-light-brightness-control, + mushroom-light-color-temp-control, + mushroom-light-color-control { + flex: 1; + } + `]}};gn([ie()],KA.prototype,"_activeControl",void 0),gn([ie()],KA.prototype,"brightness",void 0),KA=gn([Lt(ck)],KA);var YA=kt(()=>{ug(),FA=`${VA=`${eg}-lock-card`}-editor`,GA=["lock"]});function qA(t){return t.state===ni}function WA(t){return t.state===oi}function XA(t){switch(t.state){case ii:case ri:return!0;default:return!1}}YA(),pn(),Vt(),Be(),pn(),Oc(),vn();var ZA,JA=[{icon:"mdi:lock",title:"lock",serviceName:"lock",isVisible:t=>qA(t),isDisabled:()=>!1},{icon:"mdi:lock-open",title:"unlock",serviceName:"unlock",isVisible:t=>WA(t),isDisabled:()=>!1},{icon:"mdi:lock-clock",isVisible:t=>XA(t),isDisabled:()=>!0},{icon:"mdi:door-open",title:"open",serviceName:"open",isVisible:t=>we(t,1)&&qA(t),isDisabled:t=>XA(t)}],QA=class extends Ot{constructor(...t){super(...t),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("lock",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=zo(this.hass),e=ic(this.hass);return J` + ${JA.filter(t=>t.isVisible(this.entity)).map(t=>J` + + + + `)} + `}};gn([Gt({attribute:!1})],QA.prototype,"hass",void 0),gn([Gt({attribute:!1})],QA.prototype,"entity",void 0),gn([Gt({type:Boolean})],QA.prototype,"fill",void 0),QA=gn([Lt("mushroom-lock-buttons-control")],QA);var tS,eS,oS=kt(()=>{To(),_g(),jg(),Vg(),Fg(),ZA=mo(Pg,mo(zg,gg,sg))}),iS=/* @__PURE__ */$t({LockCardEditor:()=>eS}),nS=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),oS(),vn(),tS=vi((t,e)=>[{name:"entity",selector:{entity:{domain:GA}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),...lg()]),eS=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,ZA),this._config=t}render(){if(!this.hass||!this._config)return et;const t=tS(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],eS.prototype,"_config",void 0),eS=gn([Lt(FA)],eS)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),On(),Bn(),Ln(),cg(),Xf(),YA(),vn(),tg({type:VA,name:"Mushroom Lock Card",description:"Card for all lock entities"});var rS,aS,sS,lS=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(nS(),iS)),document.createElement(FA)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>GA.includes(t.split(".")[0]));return{type:`custom:${VA}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=zo(this.hass);return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e)}; + +
+ + +
+
+
+ `}renderIcon(t,e){const o=qo(t),i={"--icon-color":"rgb(var(--rgb-state-lock))","--shape-color":"rgba(var(--rgb-state-lock), 0.2)"};return WA(t)?(i["--icon-color"]="rgb(var(--rgb-state-lock-locked))",i["--shape-color"]="rgba(var(--rgb-state-lock-locked), 0.2)"):qA(t)?(i["--icon-color"]="rgb(var(--rgb-state-lock-unlocked))",i["--shape-color"]="rgba(var(--rgb-state-lock-unlocked), 0.2)"):XA(t)&&(i["--icon-color"]="rgb(var(--rgb-state-lock-pending))",i["--shape-color"]="rgba(var(--rgb-state-lock-pending), 0.2)"),J` + + + + `}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-lock-buttons-control { + flex: 1; + } + `]}};lS=gn([Lt(VA)],lS);var cS=kt(()=>{ug(),aS=`${rS=`${eg}-media-player-card`}-editor`,sS=["media_player"]});cS(),pn(),oe();var uS=(t,e)=>{if(!t)return[];const o=t.state;if("off"===o)return we(t,128)&&e.includes("on_off")?[{icon:"mdi:power",action:"turn_on"}]:[];const i=[];we(t,256)&&e.includes("on_off")&&i.push({icon:"mdi:power",action:"turn_off"});const n=!0===t.attributes.assumed_state,r=t.attributes;return("playing"===o||"paused"===o||n)&&we(t,32768)&&e.includes("shuffle")&&i.push({icon:!0===r.shuffle?"mdi:shuffle":"mdi:shuffle-disabled",action:"shuffle_set"}),("playing"===o||"paused"===o||n)&&we(t,16)&&e.includes("previous")&&i.push({icon:"mdi:skip-previous",action:"media_previous_track"}),!n&&("playing"===o&&(we(t,1)||we(t,4096))||("paused"===o||"idle"===o)&&we(t,16384)||"on"===o&&(we(t,16384)||we(t,1)))&&e.includes("play_pause_stop")&&i.push({icon:"on"===o?"mdi:play-pause":"playing"!==o?"mdi:play":we(t,1)?"mdi:pause":"mdi:stop",action:"playing"!==o?"media_play":we(t,1)?"media_pause":"media_stop"}),n&&we(t,16384)&&e.includes("play_pause_stop")&&i.push({icon:"mdi:play",action:"media_play"}),n&&we(t,1)&&e.includes("play_pause_stop")&&i.push({icon:"mdi:pause",action:"media_pause"}),n&&we(t,4096)&&e.includes("play_pause_stop")&&i.push({icon:"mdi:stop",action:"media_stop"}),("playing"===o||"paused"===o||n)&&we(t,32)&&e.includes("next")&&i.push({icon:"mdi:skip-next",action:"media_next_track"}),("playing"===o||"paused"===o||n)&&we(t,262144)&&e.includes("repeat")&&i.push({icon:"all"===r.repeat?"mdi:repeat":"one"===r.repeat?"mdi:repeat-once":"mdi:repeat-off",action:"repeat_set"}),i.length>0?i:[]},hS=(t,e,o)=>{let i={};"shuffle_set"===o?i={shuffle:!e.attributes.shuffle}:"repeat_set"===o?i={repeat:"all"===e.attributes.repeat?"one":"off"===e.attributes.repeat?"all":"off"}:"volume_mute"===o&&(i={is_volume_muted:!e.attributes.is_volume_muted}),t.callService("media_player",o,ee({entity_id:e.entity_id},i))};Vt(),Be(),pn(),vn();var dS=class extends Ot{constructor(...t){super(...t),this.fill=!1}_handleClick(t){t.stopPropagation();const e=t.target.action;hS(this.hass,this.entity,e)}render(){const t=zo(this.hass),e=uS(this.entity,this.controls);return J` + + ${e.map(t=>J` + + + + `)} + + `}};gn([Gt({attribute:!1})],dS.prototype,"hass",void 0),gn([Gt({attribute:!1})],dS.prototype,"entity",void 0),gn([Gt({attribute:!1})],dS.prototype,"controls",void 0),gn([Gt({type:Boolean})],dS.prototype,"fill",void 0),dS=gn([Lt("mushroom-media-player-media-control")],dS),Vt(),Be(),pn(),vn();var pS,mS,fS,gS=class extends Ot{constructor(...t){super(...t),this.fill=!1}handleSliderChange(t){const e=t.detail.value;this.hass.callService("media_player","volume_set",{entity_id:this.entity.entity_id,volume_level:e/100})}handleSliderCurrentChange(t){let e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}handleClick(t){t.stopPropagation();const e=t.target.action;hS(this.hass,this.entity,e)}render(){var t,e,o;if(!this.entity)return et;const i=null!=(n=this.entity).attributes.volume_level?100*n.attributes.volume_level:void 0;var n;const r=zo(this.hass),a=(null===(t=this.controls)||void 0===t?void 0:t.includes("volume_set"))&&we(this.entity,4),s=(null===(e=this.controls)||void 0===e?void 0:e.includes("volume_mute"))&&we(this.entity,8),l=(null===(o=this.controls)||void 0===o?void 0:o.includes("volume_buttons"))&&we(this.entity,1024);return J` + + ${a?J` `:et} + ${s?J` + + + + `:void 0} + ${l?J` + + + `:void 0} + ${l?J` + + + `:void 0} + + `}static get styles(){return l` + mushroom-slider { + flex: 1; + --main-color: rgb(var(--rgb-state-media-player)); + --bg-color: rgba(var(--rgb-state-media-player), 0.2); + } + `}};gn([Gt({attribute:!1})],gS.prototype,"hass",void 0),gn([Gt({attribute:!1})],gS.prototype,"entity",void 0),gn([Gt({type:Boolean})],gS.prototype,"fill",void 0),gn([Gt({attribute:!1})],gS.prototype,"controls",void 0),gS=gn([Lt("mushroom-media-player-volume-control")],gS);var _S,vS,bS,yS=kt(()=>{To(),_g(),jg(),Vg(),Fg(),pS=["on_off","shuffle","previous","play_pause_stop","next","repeat"],mS=["volume_mute","volume_set","volume_buttons"],fS=mo(Pg,mo(zg,gg,sg),Co({use_media_info:$o(bo()),show_volume_level:$o(bo()),volume_controls:$o(vo(yo(mS))),media_controls:$o(vo(yo(pS))),collapsible_controls:$o(bo())}))}),wS=/* @__PURE__ */$t({MEDIA_LABELS:()=>_S,MediaCardEditor:()=>bS}),kS=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),yS(),vn(),_S=["use_media_info","use_media_artwork","show_volume_level","media_controls","volume_controls"],vS=vi((t,e)=>[{name:"entity",selector:{entity:{domain:sS}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),{type:"grid",name:"",schema:[{name:"use_media_info",selector:{boolean:{}}},{name:"show_volume_level",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"volume_controls",selector:{select:{options:mS.map(e=>({value:e,label:t(`editor.card.media-player.volume_controls_list.${e}`)})),mode:"list",multiple:!0}}},{name:"media_controls",selector:{select:{options:pS.map(e=>({value:e,label:t(`editor.card.media-player.media_controls_list.${e}`)})),mode:"list",multiple:!0}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg()]),bS=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):_S.includes(t.name)?e(`editor.card.media-player.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,fS),this._config=t}render(){if(!this.hass||!this._config)return et;const t=vS(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],bS.prototype,"_config",void 0),bS=gn([Lt(aS)],bS)});Vt(),Be(),je(),pn(),bn(),Pn(),Bc(),On(),cg(),Xf(),cS(),vn();var CS={media_control:"mdi:play-pause",volume_control:"mdi:volume-high"};tg({type:rS,name:"Mushroom Media Card",description:"Card for media player entity"});var $S,ES,xS,AS=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(kS(),wS)),document.createElement(aS)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>sS.includes(t.split(".")[0]));return{type:`custom:${rS}`,entity:e[0]}}get hasControls(){var t,e;return Boolean(null===(t=this._config)||void 0===t||null===(t=t.media_controls)||void 0===t?void 0:t.length)||Boolean(null===(e=this._config)||void 0===e||null===(e=e.volume_controls)||void 0===e?void 0:e.length)}get _controls(){if(!this._config||!this._stateObj)return[];const t=this._stateObj,e=[];return((t,e)=>uS(t,null!=e?e:[]).length>0)(t,this._config.media_controls)&&e.push("media_control"),((t,e)=>(null==e?void 0:e.includes("volume_buttons"))&&we(t,1024)||(null==e?void 0:e.includes("volume_mute"))&&we(t,8)||(null==e?void 0:e.includes("volume_set"))&&we(t,4))(t,this._config.volume_controls)&&e.push("volume_control"),e}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}setConfig(t){super.setConfig(t),this.updateActiveControl(),this.updateVolume()}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updateActiveControl(),this.updateVolume())}updateVolume(){this.volume=void 0;const t=this._stateObj;t&&(this.volume=t.attributes.volume_level)}onCurrentVolumeChange(t){null!=t.detail.value&&(this.volume=t.detail.value/100)}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=function(t,e){var o,i=t.icon;if(!["unavailable","unknown","off"].includes(e.state)&&t.use_media_info)switch(null===(o=e.attributes.app_name)||void 0===o?void 0:o.toLowerCase()){case"spotify":return"mdi:spotify";case"google podcasts":return"mdi:google-podcast";case"plex":return"mdi:plex";case"soundcloud":return"mdi:soundcloud";case"youtube":return"mdi:youtube";case"oto music":return"mdi:music-circle";case"netflix":return"mdi:netflix";default:return}return i}(this._config,t),o=function(t,e,o){let i=Qf(o,e,t.name);return!["unavailable","unknown","off"].includes(e.state)&&t.use_media_info&&e.attributes.media_title&&(i=e.attributes.media_title),i}(this._config,t,this.hass),i=Dn(this._config),n=Wf(t,i.icon_type);let r=function(t,e,o){let i=o.formatEntityState(e);return!["unavailable","unknown","off"].includes(e.state)&&t.use_media_info&&ai(e)||i}(this._config,t,this.hass);if(null!=this.volume&&this._config.show_volume_level){r+=` ⸱ ${this.hass.formatEntityAttributeValue(t,"volume_level",this.volume)}`}const a=zo(this.hass),s=(!this._config.collapsible_controls||Yo(t))&&this._controls.length;return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,e)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,o,r)}; + + ${s?J` +
+ ${this.renderActiveControl(t,i.layout)} + ${this.renderOtherControls()} +
+ `:et} +
+
+ `}renderOtherControls(){return J` + ${this._controls.filter(t=>t!=this._activeControl).map(t=>J` + this._onControlTap(t,e)}> + + + `)} + `}renderActiveControl(t,e){var o,i,n,r;const a=null!==(o=null===(i=this._config)||void 0===i?void 0:i.media_controls)&&void 0!==o?o:[],s=null!==(n=null===(r=this._config)||void 0===r?void 0:r.volume_controls)&&void 0!==n?n:[];switch(this._activeControl){case"media_control":return J` + + + `;case"volume_control":return J` + + `;default:return et}}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-media-player)); + --shape-color: rgba(var(--rgb-state-media-player), 0.2); + } + mushroom-media-player-media-control, + mushroom-media-player-volume-control { + flex: 1; + } + `]}};gn([ie()],AS.prototype,"_activeControl",void 0),gn([ie()],AS.prototype,"volume",void 0),AS=gn([Lt(rS)],AS);var SS=kt(()=>{ug(),ES=`${$S=`${eg}-number-card`}-editor`,xS=["number","input_number"]});SS(),Vt(),Be(),pn(),vn();var TS,MS,IS=class extends Ot{onChange(t){const e=t.detail.value,o=this.entity.entity_id.split(".")[0];this.hass.callService(o,"set_value",{entity_id:this.entity.entity_id,value:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){var t;const e=Number(this.entity.state),o=null!==(t=Te(this.entity,this.hass.entities[this.entity.entity_id]))&&void 0!==t?t:Me(this.entity.state);return"buttons"===this.displayMode?J` + + `:J` + + `}static get styles(){return l` + :host { + --slider-color: rgb(var(--rgb-state-number)); + --slider-outline-color: transparent; + --slider-bg-color: rgba(var(--rgb-state-number), 0.2); + } + mushroom-slider { + --main-color: var(--slider-color); + --bg-color: var(--slider-bg-color); + --main-outline-color: var(--slider-outline-color); + } + `}};gn([Gt({attribute:!1})],IS.prototype,"hass",void 0),gn([Gt({attribute:!1})],IS.prototype,"entity",void 0),gn([Gt({attribute:!1})],IS.prototype,"displayMode",void 0),IS=gn([Lt("mushroom-number-value-control")],IS);var zS,PS,NS,OS=kt(()=>{To(),_g(),jg(),Vg(),Fg(),TS=["slider","buttons"],MS=mo(Pg,mo(zg,gg,sg),Co({icon_color:$o(Eo()),display_mode:$o(yo(TS))}))}),BS=/* @__PURE__ */$t({NUMBER_LABELS:()=>zS,NumberCardEditor:()=>NS}),LS=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),OS(),vn(),oe(),zS=["display_mode"],PS=vi((t,e)=>[{name:"entity",selector:{entity:{domain:xS}}},Ag(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...$g(t),{name:"display_mode",selector:{select:{options:["default",...TS].map(e=>({value:e,label:t(`editor.card.number.display_mode_list.${e}`)})),mode:"dropdown"}}},...lg()]),NS=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return zS.includes(t.name)?e(`editor.card.number.${t.name}`):Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,MS),this._config=t}render(){if(!this.hass||!this._config)return et;const t=PS(ic(this.hass),this.hass.config.version),e=ee({},this._config);return e.display_mode||(e.display_mode="default"),J` + + `}_valueChanged(t){const e=ee({},t.detail.value);"default"===e.display_mode&&delete e.display_mode,ve(this,"config-changed",{config:e})}},gn([ie()],NS.prototype,"_config",void 0),NS=gn([Lt(ES)],NS)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),Rf(),cg(),Xf(),SS(),vn(),tg({type:$S,name:"Mushroom Number Card",description:"Card for number and input number entity"});var DS,jS,HS,RS=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(LS(),BS)),document.createElement(ES)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>xS.includes(t.split(".")[0]));return{type:`custom:${$S}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}onCurrentValueChange(t){null!=t.detail.value&&(this.value=t.detail.value)}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updateValue()}updateValue(){this.value=void 0;const t=this._stateObj;t&&!Number.isNaN(t.state)&&(this.value=Number(t.state))}render(){var t;if(!this._config||!this.hass||!this._config.entity)return et;const e=this._stateObj;if(!e)return this.renderNotFound(this._config);const o=Qf(this.hass,e,this._config.name),i=this._config.icon,n=Dn(this._config),r=Wf(e,n.icon_type);let a=this.hass.formatEntityState(e);void 0!==this.value&&(a=this.hass.formatEntityState(e,this.value.toString()));const s=zo(this.hass),l={},c=null===(t=this._config)||void 0===t?void 0:t.icon_color;if(c){const t=Lf(c);l["--slider-color"]=`rgb(${t})`,l["--slider-bg-color"]=`rgba(${t}, 0.2)`}return J` + + + + ${r?this.renderPicture(r):this.renderIcon(e,i)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,n,o,a)}; + +
+ +
+
+
+ `}renderIcon(t,e){var o;const i=Yo(t),n={},r=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(r){const t=Lf(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return J` + + + + `}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-number)); + --shape-color: rgba(var(--rgb-state-number), 0.2); + } + mushroom-number-value-control { + flex: 1; + } + `]}};gn([ie()],RS.prototype,"value",void 0),RS=gn([Lt($S)],RS);var US,VS=kt(()=>{ug(),jS=`${DS=`${eg}-person-card`}-editor`,HS=["person","device_tracker"]});function FS(t,e){const o=t.state;return"unknown"===o?"var(--rgb-state-person-unknown)":"not_home"===o?"var(--rgb-state-person-not-home)":"home"===o?"var(--rgb-state-person-home)":e.some(t=>o===t.attributes.friendly_name)?"var(--rgb-state-person-zone)":"var(--rgb-state-person-home)"}VS(),pn();var GS,KS,YS,qS=kt(()=>{To(),_g(),jg(),Vg(),Fg(),US=mo(Pg,mo(zg,gg,sg))}),WS=/* @__PURE__ */$t({SwitchCardEditor:()=>YS}),XS=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),qS(),vn(),GS=["more-info","navigate","url","perform-action","assist","none"],KS=vi((t,e)=>[{name:"entity",selector:{entity:{domain:HS}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),...lg(GS)]),YS=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,US),this._config=t}render(){if(!this.hass||!this._config)return et;const t=KS(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],YS.prototype,"_config",void 0),YS=gn([Lt(jS)],YS)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),cg(),Xf(),VS(),vn(),tg({type:DS,name:"Mushroom Person Card",description:"Card for person entity"});var ZS,JS,QS,tT=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(XS(),WS)),document.createElement(jS)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>HS.includes(t.split(".")[0]));return{type:`custom:${DS}`,entity:e[0]}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=zo(this.hass);return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e)}; + + + + `}renderStateBadge(t){const e=Object.values(this.hass.states).filter(t=>t.entity_id.startsWith("zone."));return J` + o===t.attributes.friendly_name);return i&&i.attributes.icon?i.attributes.icon:"mdi:home"}(t,e)} + style=${fe({"--main-color":`rgb(${FS(t,e)})`})} + > + `}renderBadge(t){return qo(t)?this.renderStateBadge(t):super.renderBadge(t)}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + `]}};tT=gn([Lt(DS)],tT);var eT=kt(()=>{ug(),JS=`${ZS=`${eg}-select-card`}-editor`,QS=["input_select","select"]});function oT(t){return null!=t.state?t.state:void 0}eT(),Vt(),Be(),pn(),vn();var iT,nT=class extends Ot{_selectChanged(t){let e;e=rn(this.hass.connection.haVersion,2026,3)?t.detail.item.value:t.target.value;const o=oT(this.entity);e&&e!==o&&this._setValue(e)}_setValue(t){const e=this.entity.entity_id.split(".")[0];this.hass.callService(e,"select_option",{entity_id:this.entity.entity_id,option:t})}render(){const t=oT(this.entity),e=this.entity.attributes.options;return rn(this.hass.connection.haVersion,2026,3)?J` + ({value:t,label:this.hass.formatEntityState(this.entity,t)}))} + @wa-select=${this._selectChanged} + > + `:J` + t.stopPropagation()} + @selected=${this._selectChanged} + > + ${e.map(t=>J` + + ${this.hass.formatEntityState(this.entity,t)} + + `)} + + `}static get styles(){return l` + :host { + display: flex; + height: 100%; + align-items: center; + } + ha-control-select-menu { + width: 100%; + --control-select-menu-height: var(--control-height); + --control-select-menu-border-radius: var(--control-border-radius); + } + `}};gn([Gt()],nT.prototype,"hass",void 0),gn([Gt({attribute:!1})],nT.prototype,"entity",void 0),nT=gn([Lt("mushroom-select-option-control")],nT);var rT,aT,sT,lT=kt(()=>{To(),_g(),jg(),Vg(),Fg(),iT=mo(Pg,mo(zg,gg,sg),Co({icon_color:$o(Eo())}))}),cT=/* @__PURE__ */$t({SelectCardEditor:()=>sT}),uT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),lT(),vn(),rT=["more-info","navigate","url","perform-action","assist","none"],aT=vi((t,e)=>[{name:"entity",selector:{entity:{domain:QS}}},Ag(e),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{ui_color:{}}}]},...$g(t),...lg(rT)]),sT=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,iT),this._config=t}render(){if(!this.hass||!this._config)return et;const t=aT(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],sT.prototype,"_config",void 0),sT=gn([Lt(JS)],sT)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),Bc(),On(),Bn(),Ln(),Rf(),cg(),Xf(),eT(),vn(),tg({type:ZS,name:"Mushroom Select Card",description:"Card for select and input_select entities"});var hT,dT=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(uT(),cT)),document.createElement(JS)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>QS.includes(t.split(".")[0]));return{type:`custom:${ZS}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this._config||!this.hass||!this._config.entity)return et;const e=this._stateObj;if(!e)return this.renderNotFound(this._config);const o=Qf(this.hass,e,this._config.name),i=this._config.icon,n=Dn(this._config),r=Wf(e,n.icon_type),a=zo(this.hass),s=null===(t=this._config)||void 0===t?void 0:t.icon_color,l={};if(s){const t=Lf(s);l["--card-primary-color"]=`rgb(${t})`,l["--mdc-theme-primary"]=`rgb(${t})`}return J` + + + + ${r?this.renderPicture(r):this.renderIcon(e,i)} + ${this.renderBadge(e)} + ${this.renderStateInfo(e,n,o)}; + +
+ +
+
+
+ `}renderIcon(t,e){var o;const i=Yo(t),n={},r=null===(o=this._config)||void 0===o?void 0:o.icon_color;if(r){const t=Lf(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return J` + + + + `}static get styles(){return[super.styles,Jf,l` + .actions { + overflow: visible; + display: block; + } + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-entity)); + --shape-color: rgba(var(--rgb-state-entity), 0.2); + } + mushroom-select-option-control { + flex: 1; + --card-primary-color: rgb(var(--rgb-state-entity)); + --mdc-theme-primary: rgb(var(--rgb-state-entity)); + } + `]}};dT=gn([Lt(ZS)],dT);var pT,mT,fT=kt(()=>{Ht(),hT=t=>null!=t?t:et}),gT=kt(()=>{fT()});function _T(t){return pT.has(t)||mT.has(t)?`var(--${t}-color)`:function(t){return/^\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*$/.test(t)}(t)?`rgb(${t.split(",").map(t=>t.trim()).join(", ")})`:t}var vT,bT,yT,wT,kT,CT,$T,ET,xT,AT,ST,TT,MT,IT,zT,PT,NT,OT,BT,LT,DT,jT,HT=kt(()=>{pT=new Set(["primary","accent","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white"]),mT=new Set(["primary-text","secondary-text","disabled-text","disabled"])}),RT=kt(()=>{vT=/{%|{{/,bT=t=>vT.test(t)}),UT=kt(()=>{To(),pn(),Fg(),oe(),yT=mo(Pg,Co({entity:$o(Eo()),area:$o(Eo()),primary:$o(Eo()),secondary:$o(Eo()),color:$o(Eo()),icon:$o(Eo()),picture:$o(Eo()),badge_icon:$o(Eo()),badge_text:$o(Eo()),badge_color:$o(Eo()),vertical:$o(bo()),multiline_secondary:$o(bo()),tap_action:$o(on),hold_action:$o(on),double_tap_action:$o(on),icon_tap_action:$o(on),icon_hold_action:$o(on),icon_double_tap_action:$o(on),features:$o(vo(_o())),features_position:$o(yo(["bottom","inline"])),entity_id:$o(Ao([Eo(),vo(Eo())])),icon_color:$o(Eo()),layout:$o(Eo()),fill_container:$o(bo())})),wT=t=>{const e=ee({},t);return e.icon_color&&(delete e.icon_color,null==e.color&&(e.color=t.icon_color)),e.layout&&(delete e.layout,null==e.vertical&&(e.vertical="vertical"===t.layout)),delete e.fill_container,e},kT=t=>Boolean(t.icon_color||t.layout||t.fill_container)}),VT=/* @__PURE__ */$t({MushroomTemplateCardEditor:()=>xT,TEMPLATE_CARD_HELPERS:()=>ET,TEMPLATE_CARD_LABELS:()=>CT,TILE_LABELS:()=>$T}),FT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),Hg(),Ug(),GT(),UT(),vn(),oe(),CT=["area","badge_color","badge_icon","badge_text","primary","secondary","multiline_secondary"],$T=["content_layout","vertical","features_position","icon_tap_action","icon_hold_action","icon_double_tap_action"],ET=["area","entity","badge_text","multiline_secondary"],xT=class extends Ot{constructor(...t){super(...t),this._featureContext=vi(t=>({entity_id:t.entity,area_id:t.area})),this._schema=vi((t,e)=>[{name:"context",flatten:!0,type:"expandable",icon:"mdi:shape",schema:[{name:"entity",selector:{entity:{}}},{name:"area",selector:{area:{}}}]},{name:"content",flatten:!0,type:"expandable",icon:"mdi:text-short",schema:[{name:"primary",selector:{template:{}}},{name:"secondary",selector:{template:{}}},{name:"color",selector:{template:{}}},{name:"icon",selector:{template:{}}},{name:"picture",selector:{template:{}}}]},{name:"badge",type:"expandable",flatten:!0,icon:"mdi:square-rounded-badge-outline",schema:[{name:"badge_icon",selector:{template:{}}},{name:"badge_text",selector:{template:{}}},{name:"badge_color",selector:{template:{}}}]},{name:"layout",type:"expandable",flatten:!0,icon:"mdi:image-text",schema:[{name:"content_layout",required:!0,selector:{select:{mode:"box",options:["horizontal","vertical"].map(e=>({label:t(`ui.panel.lovelace.editor.card.tile.content_layout_options.${e}`),value:e,image:{src:`/static/images/form/tile_content_layout_${e}.svg`,src_dark:`/static/images/form/tile_content_layout_${e}_dark.svg`,flip_rtl:!0}}))}}},{name:"multiline_secondary",selector:{boolean:{}}}]},{name:"interactions",type:"expandable",flatten:!0,icon:"mdi:gesture-tap",schema:[{name:"tap_action",selector:{ui_action:{default_action:e?"more-info":"none"}}},{name:"icon_tap_action",selector:{ui_action:{default_action:e?TT(e):"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","icon_hold_action","double_tap_action","icon_double_tap_action"].map(t=>({name:t,selector:{ui_action:{default_action:"none"}}}))}]}]),this._featuresSchema=vi((t,e)=>[{name:"features_position",required:!0,selector:{select:{mode:"box",options:["bottom","inline"].map(o=>({label:t(`ui.panel.lovelace.editor.card.tile.features_position_options.${o}`),description:t(`ui.panel.lovelace.editor.card.tile.features_position_options.${o}_description`),value:o,image:{src:`/static/images/form/tile_features_position_${o}.svg`,src_dark:`/static/images/form/tile_features_position_${o}_dark.svg`,flip_rtl:!0},disabled:e&&"inline"===o}))}}}]),this._computeLabel=t=>{const e=ic(this.hass);return"expandable"===t.type?e(`editor.section.${t.name}`):Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):CT.includes(t.name)?e(`editor.card.template.${t.name}`):$T.includes(t.name)?this.hass.localize(`ui.panel.lovelace.editor.card.tile.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{if("expandable"===t.type)return;const e=ic(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}_helper`):ET.includes(t.name)?e(`editor.card.template.${t.name}_helper`):void 0},this._done=()=>{this._legacyConfig=void 0},this._revertToLegacy=()=>{this._legacyConfig&&ve(this,"config-changed",{config:this._legacyConfig})}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,yT),kT(t)?(this._legacyConfig=ee({},t),this._legacyConfig.type="custom:mushroom-legacy-template-card"):delete this._legacyConfig,this._config=wT(t)}render(){var t;if(!this.hass||!this._config)return et;const e=this._schema(this.hass.localize,this._config.entity),o=ic(this.hass),i=ee(ee({},this._config),{},{content_layout:this._config.vertical?"vertical":"horizontal"});i.features_position&&!i.vertical||(i.features_position="bottom");const n=this._featuresSchema(this.hass.localize,"vertical"===i.content_layout),r=this._featureContext(this._config);return J` + ${this._legacyConfig?J` + +
+ ${o("migration.description",{link:J` + ${o("migration.post")} + `})} +
+
+ + ${o("migration.revert")} + + + ${o("migration.ok")} + +
+
+ `:et} + + + +

+ ${this.hass.localize("ui.panel.lovelace.editor.card.generic.features")} +

+
+ + +
+
+ `}_featuresChanged(t){if(t.stopPropagation(),!this._config||!this.hass)return;const e=t.detail.features,o=ee(ee({},this._config),{},{features:e});0===e.length&&delete o.features,ve(this,"config-changed",{config:o})}_editDetailElement(t){const e=t.detail.subElementConfig.index,o=this._config.features[e],i=this._featureContext(this._config);ve(this,"edit-sub-element",{config:o,saveConfig:t=>this._updateFeature(e,t),context:i,type:"feature"})}_updateFeature(t,e){const o=this._config.features.concat();o[t]=e;const i=ee(ee({},this._config),{},{features:o});ve(this,"config-changed",{config:i})}_valueChanged(t){if(t.stopPropagation(),!this._config||!this.hass)return;const e=t.detail.value,o=ee({features:this._config.features},e);o.content_layout&&(o.vertical="vertical"===o.content_layout,delete o.content_layout),o.vertical||delete o.vertical,ve(this,"config-changed",{config:o})}static get styles(){return[l` + ha-form { + display: block; + margin-bottom: 24px; + } + .features-form { + margin-bottom: 8px; + } + ha-expansion-panel { + display: block; + --expansion-panel-content-padding: 0; + border-radius: 6px; + --ha-card-border-radius: 6px; + } + ha-expansion-panel .content { + padding: 12px; + } + ha-expansion-panel > *[slot="header"] { + margin: 0; + font-size: inherit; + font-weight: inherit; + } + ha-expansion-panel ha-icon { + color: var(--secondary-text-color); + } + ha-alert { + margin-bottom: 16px; + display: block; + } + ha-alert a { + color: var(--primary-color); + } + ha-alert .actions { + display: flex; + width: 100%; + flex: 1; + align-items: flex-end; + flex-direction: row; + justify-content: flex-end; + gap: 8px; + margin-top: 8px; + border-radius: 8px; + } + `]}},gn([Gt({attribute:!1})],xT.prototype,"hass",void 0),gn([ie()],xT.prototype,"_config",void 0),gn([ie()],xT.prototype,"_legacyConfig",void 0),xT=gn([Lt("mushroom-template-card-editor")],xT)}),GT=kt(()=>{Vt(),Be(),je(),gT(),Re(),Oi(),AT=/* @__PURE__ */Et(hv()),pn(),HT(),RT(),dv(),cg(),UT(),pv(),__(),vn(),oe(),TT=t=>{const e=be(t);return _e.has(e)||["button","input_button","scene"].includes(e)?"toggle":"none"},tg({type:"mushroom-template-card",name:"Mushroom Template",description:"Build your own Mushroom card using templates"}),MT=new R_(1e3),IT=["icon","color","primary","secondary","picture","badge_icon","badge_color","badge_text"],(ST=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map,this._featureContext=vi(t=>({entity_id:t.entity,area_id:t.area})),this._featurePosition=vi(t=>t.vertical?"bottom":t.features_position||"bottom"),this._displayedFeatures=vi(t=>{const e=t.features||[];return"inline"===this._featurePosition(t)?e.slice(0,1):e})}static async getConfigElement(){return await Promise.resolve().then(()=>(FT(),VT)),document.createElement("mushroom-template-card-editor")}static getStubConfig(){return{type:"custom:mushroom-template-card",primary:"Hello, {{user}}",secondary:"How are you?",icon:"mdi:mushroom"}}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();MT.set(t,this._templateResults)}}_computeCacheKey(){return(0,AT.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();MT.has(t)?this._templateResults=MT.get(t):this._templateResults={}}}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}_getTemplateKeyValue(t){var e;return this._config&&null!==(e=this._config[t])&&void 0!==e?e:""}async _tryConnect(){var t=this;IT.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0!==e._unsubRenderTemplates.get(t)||!e.hass||!e._config)return;const o=e._getTemplateKeyValue(t);if(bT(o))try{const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:o,entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity,area:e._config.area},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;IT.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}setConfig(t){this._config=wT(t),this._config.entity&&(this._config.tap_action||(this._config.tap_action={action:"more-info"}),this._config.icon_tap_action||(this._config.icon_tap_action={action:TT(this._config.entity)}))}getValue(t){var e;const o=this._getTemplateKeyValue(t);return bT(o)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():o}getCardSize(){var t,e,o,i,n,r;const a=this._config&&this._featurePosition(this._config),s=(null===(t=this._config)||void 0===t||null===(t=t.features)||void 0===t?void 0:t.length)||0;return(Boolean((null===(e=this._config)||void 0===e?void 0:e.icon)||(null===(o=this._config)||void 0===o?void 0:o.picture)||(null===(i=this._config)||void 0===i?void 0:i.primary)||(null===(n=this._config)||void 0===n?void 0:n.secondary))||"inline"===a?1:0)+((null===(r=this._config)||void 0===r?void 0:r.vertical)?1:0)+("inline"===a?0:s)}getGridOptions(){var t,e,o,i,n,r,a;let s=6,l=0;l=Boolean((null===(t=this._config)||void 0===t?void 0:t.icon)||(null===(e=this._config)||void 0===e?void 0:e.picture)||(null===(o=this._config)||void 0===o?void 0:o.primary)||(null===(i=this._config)||void 0===i?void 0:i.secondary))?1:0;const c=this._config&&this._featurePosition(this._config),u=(null===(n=this._config)||void 0===n||null===(n=n.features)||void 0===n?void 0:n.length)||0;return u&&("inline"===c?(s=12,l=1):l+=u),(null===(r=this._config)||void 0===r?void 0:r.vertical)&&(s=3,(this._config.primary||this._config.secondary&&!this._config.icon)&&l++),(null===(a=this._config)||void 0===a?void 0:a.multiline_secondary)?{columns:6,min_columns:s}:{columns:6,rows:l,min_columns:s,min_rows:l}}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}_handleIconAction(t){t.stopPropagation();const e={entity:this._config.entity,tap_action:this._config.icon_tap_action,hold_action:this._config.icon_hold_action,double_tap_action:this._config.icon_double_tap_action};Ni(this,this.hass,e,t.detail.action)}get _hasCardAction(){var t,e,o;return Yi(null===(t=this._config)||void 0===t?void 0:t.tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.hold_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.double_tap_action)}get _hasIconAction(){var t,e,o;return Yi(null===(t=this._config)||void 0===t?void 0:t.icon_tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.icon_hold_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.icon_double_tap_action)}render(){var t;if(!this._config||!this.hass)return et;const e=this.getValue("icon"),o=this.getValue("color"),i=o?_T(o):void 0,n=this.getValue("primary"),r=this.getValue("secondary"),a=this.getValue("picture"),s=this.getValue("badge_icon"),l=this.getValue("badge_color"),c=this.getValue("badge_text"),u=l?_T(l):void 0,h=V_(e),d={"--tile-color":i},p=this._featurePosition(this._config),m=this._displayedFeatures(this._config),f=this._config.multiline_secondary,g=this._featureContext(this._config),_=m.length>0&&!e&&!a&&!n&&!r,v=de({horizontal:"inline"===p,"feature-only":_}),{haVersion:b}=this.hass.connection,y=rn(b,2026,2),w=rn(b,2026,8)&&"grid"===this.layout&&"auto"!==(null===(t=this._config.grid_options)||void 0===t?void 0:t.rows),k=de({vertical:Boolean(this._config.vertical),"fixed-info-height":w}),C={disabled:!this._hasIconAction,hasHold:Yi(this._config.icon_hold_action),hasDoubleClick:Yi(this._config.icon_double_tap_action)};return J` + +
+ +
+
+ ${e||a||n||r?J`
+ ${e||a?J` + + ${a?et:h?J`
${h}
`:J``} + ${s||c?J` + + ${c?J`${c}`:J` + `} + + `:et} +
+ `:et} + ${n||r?J` + + ${n} + ${r} + + `:et} +
`:et} + ${m.length>0?J` + + `:et} +
+
+ `}}).styles=[c_,l` + :host { + --tile-color: var(--state-inactive-color); + -webkit-tap-highlight-color: transparent; + } + ha-card:has(.background:focus-visible) { + --shadow-default: var(--ha-card-box-shadow, 0 0 0 0 transparent); + --shadow-focus: 0 0 0 1px var(--tile-color); + border-color: var(--tile-color); + box-shadow: var(--shadow-default), var(--shadow-focus); + } + ha-card { + --ha-ripple-color: var(--tile-color); + --ha-ripple-hover-opacity: 0.04; + --ha-ripple-pressed-opacity: 0.12; + height: 100%; + transition: + box-shadow 180ms ease-in-out, + border-color 180ms ease-in-out; + display: flex; + flex-direction: column; + justify-content: space-between; + } + [role="button"] { + cursor: pointer; + pointer-events: auto; + } + [role="button"]:focus { + outline: none; + } + .background { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + border-radius: var( + --ha-card-border-radius, + var(--ha-border-radius-lg, 12px) + ); + margin: calc(-1 * var(--ha-card-border-width, 1px)); + overflow: hidden; + } + .container { + margin: calc(-1 * var(--ha-card-border-width, 1px)); + display: flex; + flex-direction: column; + flex: 1; + } + .container.horizontal { + flex-direction: row; + } + + .content { + position: relative; + display: flex; + flex-direction: row; + align-items: center; + padding: 0 10px; + min-height: var(--row-height, 56px); + flex: 1; + min-width: 0; + box-sizing: border-box; + pointer-events: none; + gap: 10px; + } + .content:has(.multiline) { + padding-top: 10px; + padding-bottom: 10px; + } + + .vertical { + flex-direction: column; + text-align: center; + justify-content: center; + padding: 10px var(--ha-space-2, 8px); + } + .vertical.fixed-info-height { + gap: 2px; + --ha-tile-info-gap: 2px; + --ha-tile-info-primary-line-height: var(--ha-space-4); + --ha-tile-info-primary-min-height: var(--ha-space-8); + --ha-tile-info-min-height: var(--ha-space-12); + } + .vertical ha-tile-info { + width: 100%; + flex: none; + } + + .multiline { + white-space: pre-wrap; + } + + ha-tile-icon { + --tile-icon-color: var(--tile-color); + position: relative; + padding: 6px; + margin: -6px; + } + ha-tile-icon.weather svg { + width: 36px; + height: 36px; + display: flex; + } + ha-tile-icon.weather { + --tile-icon-opacity: 0; + --tile-icon-hover-opacity: 0; + --tile-icon-border-radius: 0; + } + ha-tile-badge { + position: absolute; + top: 3px; + right: 3px; + inset-inline-end: 3px; + inset-inline-start: initial; + --tile-badge-background-color: var( + --badge-color, + var(--secondary-text-color) + ); + } + ha-tile-badge span { + font-size: 0.8rem; + font-weight: bold; + height: 16px; + line-height: 16px; + } + ha-tile-info { + position: relative; + min-width: 0; + transition: background-color 180ms ease-in-out; + box-sizing: border-box; + } + hui-card-features { + --feature-color: var(--tile-color); + padding: 0 var(--ha-space-3, 12px) var(--ha-space-3, 12px) + var(--ha-space-3, 12px); + min-width: 0; + } + .container.horizontal hui-card-features { + width: calc(50% - var(--column-gap, 0px) / 2 - var(--ha-space-3, 12px)); + flex: none; + --feature-height: var(--ha-space-9, 36px); + padding: 0 var(--ha-space-3, 12px); + padding-inline-start: 0; + } + .container.feature-only { + justify-content: flex-end; + } + .container.feature-only hui-card-features { + flex: 1; + width: 100%; + padding: var(--ha-space-3, 12px); + } + .container.feature-only.horizontal hui-card-features { + padding: 0 var(--ha-space-3, 12px); + } + .container.horizontal .content:not(:has(ha-tile-info)) { + flex: none; + } + .container.horizontal:not(:has(ha-tile-info)) hui-card-features { + width: auto; + flex: 1; + } + .container.horizontal:not(:has(ha-tile-info)) .content { + flex: none; + } + `],zT=ST,gn([Gt({attribute:!1})],zT.prototype,"hass",void 0),gn([Gt({attribute:!1})],zT.prototype,"layout",void 0),gn([ie()],zT.prototype,"_config",void 0),gn([ie()],zT.prototype,"_templateResults",void 0),gn([ie()],zT.prototype,"_unsubRenderTemplates",void 0),zT=gn([Lt("mushroom-template-card")],zT)}),KT=kt(()=>{ug(),NT=`${PT=`${eg}-title-card`}-editor`}),YT=kt(()=>{To(),pn(),Fg(),OT=mo(Pg,Co({title:$o(Eo()),subtitle:$o(Eo()),alignment:$o(Eo()),title_tap_action:$o(on),subtitle_tap_action:$o(on)}))}),qT=/* @__PURE__ */$t({TitleCardEditor:()=>jT}),WT=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),jg(),Yf(),Ug(),KT(),YT(),vn(),BT=["navigate","url","perform-action","none"],LT=["title","subtitle","alignment","title_tap_action","subtitle_tap_action"],DT=vi(t=>[{name:"title",selector:{template:{}}},{name:"subtitle",selector:{template:{}}},{name:"alignment",selector:{select:{options:kg(t),mode:"dropdown"}}},{name:"title_tap_action",selector:{ui_action:{actions:BT}}},{name:"subtitle_tap_action",selector:{ui_action:{actions:BT}}}]),jT=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return LT.includes(t.name)?e(`editor.card.title.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,OT),this._config=t}render(){if(!this.hass||!this._config)return et;const t=DT(ic(this.hass));return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],jT.prototype,"_config",void 0),jT=gn([Lt(NT)],jT)});Vt(),Be(),je(),gT(),pn(),On(),Bn(),Ln(),Yf(),dv(),cg(),KT(),vn(),oe();var XT=new R_(1e3);tg({type:PT,name:"Mushroom Title Card",description:"Title and subtitle to separate sections"});var ZT,JT,QT,tM,eM=["title","subtitle"],oM=class extends Hf{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(WT(),qT)),document.createElement(NT)}static async getStubConfig(t){return{type:`custom:${PT}`,title:"Hello, {{ user }} !"}}getCardSize(){return 1}setConfig(t){eM.forEach(e=>{var o;(null===(o=this._config)||void 0===o?void 0:o[e])!==t[e]&&this._tryDisconnectKey(e)}),this._config=ee({title_tap_action:{action:"none"},subtitle_tap_action:{action:"none"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();XT.set(t,this._templateResults)}}_computeCacheKey(){return(0,yv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();XT.has(t)?this._templateResults=XT.get(t):this._templateResults={}}}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}_handleTitleAction(t){const e={tap_action:this._config.title_tap_action};Ni(this,this.hass,e,t.detail.action)}_handleSubtitleAction(t){const e={tap_action:this._config.subtitle_tap_action};Ni(this,this.hass,e,t.detail.action)}render(){if(!this._config||!this.hass)return et;const t=this.getValue("title"),e=this.getValue("subtitle");let o="";this._config.alignment&&(o=`align-${this._config.alignment}`);const i=Boolean(this._config.title_tap_action&&"none"!==this._config.title_tap_action.action),n=Boolean(this._config.subtitle_tap_action&&"none"!==this._config.subtitle_tap_action.action),r=zo(this.hass);return J` + + ${t?J` +
+

${t}${this.renderArrow()}

+
+ `:et} + ${e?J` +
+

${e}${this.renderArrow()}

+
+ `:et} +
+ `}renderArrow(){return J` `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;eM.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;eM.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}static get styles(){return[super.styles,Jf,l` + .header { + display: block; + padding: var(--title-padding); + background: none; + border: none; + box-shadow: none; + text-align: var(--card-text-align, inherit); + } + .header div * { + margin: 0; + white-space: pre-wrap; + } + .header div:not(:last-of-type) { + margin-bottom: var(--title-spacing); + } + .actionable { + cursor: pointer; + } + .header ha-icon { + display: none; + } + .actionable ha-icon { + display: inline-block; + margin-left: 4px; + transition: transform 180ms ease-in-out; + } + .actionable:hover ha-icon { + transform: translateX(4px); + } + [rtl] .actionable ha-icon { + margin-left: initial; + margin-right: 4px; + } + [rtl] .actionable:hover ha-icon { + transform: translateX(-4px); + } + .title { + color: var(--title-color); + font-size: var(--title-font-size); + font-weight: var(--title-font-weight); + line-height: var(--title-line-height); + letter-spacing: var(--title-letter-spacing); + --mdc-icon-size: var(--title-font-size); + } + .subtitle { + color: var(--subtitle-color); + font-size: var(--subtitle-font-size); + font-weight: var(--subtitle-font-weight); + line-height: var(--subtitle-line-height); + letter-spacing: var(--subtitle-letter-spacing); + --mdc-icon-size: var(--subtitle-font-size); + } + .align-start { + text-align: start; + } + .align-end { + text-align: end; + } + .align-center { + text-align: center; + } + .align-justify { + text-align: justify; + } + `]}};gn([ie()],oM.prototype,"_config",void 0),gn([ie()],oM.prototype,"_templateResults",void 0),gn([ie()],oM.prototype,"_unsubRenderTemplates",void 0),oM=gn([Lt(PT)],oM);var iM=kt(()=>{ug(),JT=`${ZT=`${eg}-update-card`}-editor`,QT=["update"],tM={on:"var(--rgb-state-update-on)",off:"var(--rgb-state-update-off)",installing:"var(--rgb-state-update-installing)"}});iM(),Vt(),Be(),pn(),vn();var nM,rM=class extends Ot{constructor(...t){super(...t),this.fill=!1}_handleInstall(){this.hass.callService("update","install",{entity_id:this.entity.entity_id})}_handleSkip(t){t.stopPropagation(),this.hass.callService("update","skip",{entity_id:this.entity.entity_id})}get installDisabled(){if(!qo(this.entity))return!0;const t=this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version;return!Yo(this.entity)&&!t||wi(this.entity)}get skipDisabled(){return!qo(this.entity)||(this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version||!Yo(this.entity)||wi(this.entity))}render(){const t=zo(this.hass);return J` + + + + + + + + + `}};gn([Gt({attribute:!1})],rM.prototype,"hass",void 0),gn([Gt({attribute:!1})],rM.prototype,"entity",void 0),gn([Gt({type:Boolean})],rM.prototype,"fill",void 0),rM=gn([Lt("mushroom-update-buttons-control")],rM);var aM,sM,lM,cM,uM=kt(()=>{To(),_g(),jg(),Vg(),Fg(),nM=mo(Pg,mo(zg,gg,sg),Co({show_buttons_control:$o(bo()),collapsible_controls:$o(bo())}))}),hM=/* @__PURE__ */$t({UpdateCardEditor:()=>cM}),dM=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),iM(),uM(),vn(),aM=["show_buttons_control"],sM=["more-info","navigate","url","perform-action","assist","none"],lM=vi((t,e)=>[{name:"entity",selector:{entity:{domain:QT}}},Ag(e),{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...$g(t),{type:"grid",name:"",schema:[{name:"show_buttons_control",selector:{boolean:{}}},{name:"collapsible_controls",selector:{boolean:{}}}]},...lg(sM)]),cM=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):aM.includes(t.name)?e(`editor.card.update.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,nM),this._config=t}render(){if(!this.hass||!this._config)return et;const t=lM(ic(this.hass),this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],cM.prototype,"_config",void 0),cM=gn([Lt(JT)],cM)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),On(),Bn(),Ln(),cg(),Xf(),iM(),vn(),tg({type:ZT,name:"Mushroom Update Card",description:"Card for update entity"});var pM,mM,fM,gM=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(dM(),hM)),document.createElement(JT)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>QT.includes(t.split(".")[0]));return{type:`custom:${ZT}`,entity:e[0]}}get hasControls(){return!(!this._stateObj||!this._config)&&(Boolean(this._config.show_buttons_control)&&we(this._stateObj,1))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return et;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=Qf(this.hass,t,this._config.name),o=this._config.icon,i=Dn(this._config),n=Wf(t,i.icon_type),r=zo(this.hass),a=(!this._config.collapsible_controls||Yo(t))&&this._config.show_buttons_control&&we(t,1);return J` + + + + ${n?this.renderPicture(n):this.renderIcon(t,o)} + ${this.renderBadge(t)} + ${this.renderStateInfo(t,i,e)}; + + ${a?J` +
+ +
+ `:et} +
+
+ `}renderIcon(t,e){const o=wi(t),i=function(t,e){return e?tM.installing:tM[t]||"var(--rgb-grey)"}(t.state,o),n={"--icon-color":`rgb(${i})`,"--shape-color":`rgba(${i}, 0.2)`};return J` + + + + `}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-entity)); + --shape-color: rgba(var(--rgb-state-entity), 0.2); + } + mushroom-shape-icon.pulse { + --shape-animation: 1s ease 0s infinite normal none running pulse; + } + mushroom-update-buttons-control { + flex: 1; + } + `]}};gM=gn([Lt(ZT)],gM);var _M=kt(()=>{ug(),mM=`${pM=`${eg}-vacuum-card`}-editor`,fM=["vacuum"]});function vM(t){switch(t.state){case ki:case"on":return!0;default:return!1}}function bM(t){return t.state===Ei}_M(),pn(),Vt(),Be(),pn(),vn();var yM,wM,kM=(t,e,o)=>CM(t,e,o)&&(!e.isVisible||e.isVisible(t)),CM=(t,e,o)=>e.isSupported(t)&&o.includes(e.command),$M=[{icon:"mdi:power",serviceName:"turn_on",command:"on_off",isSupported:t=>we(t,1),isVisible:t=>!Yo(t),isDisabled:()=>!1},{icon:"mdi:power",serviceName:"turn_off",command:"on_off",isSupported:t=>we(t,2),isVisible:t=>Yo(t),isDisabled:()=>!1},{icon:"mdi:play",serviceName:"start",command:"start_pause",isSupported:t=>we(t,Ai),isVisible:t=>!vM(t),isDisabled:()=>!1},{icon:"mdi:pause",serviceName:"pause",command:"start_pause",isSupported:t=>we(t,8192)&&we(t,4),isVisible:t=>vM(t),isDisabled:()=>!1},{icon:"mdi:play-pause",serviceName:"start_pause",command:"start_pause",isSupported:t=>!we(t,8192)&&we(t,4),isDisabled:()=>!1},{icon:"mdi:stop",serviceName:"stop",command:"stop",isSupported:t=>we(t,8),isDisabled:t=>function(t){switch(t.state){case Ci:case"off":case $i:case Ei:return!0;default:return!1}}(t)},{icon:"mdi:target-variant",serviceName:"clean_spot",command:"clean_spot",isSupported:t=>we(t,xi),isDisabled:()=>!1},{icon:"mdi:map-marker",serviceName:"locate",command:"locate",isSupported:t=>we(t,512),isDisabled:t=>bM(t)},{icon:"mdi:home-map-marker",serviceName:"return_to_base",command:"return_home",isSupported:t=>we(t,16),isDisabled:()=>!1}],EM=class extends Ot{constructor(...t){super(...t),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("vacuum",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=zo(this.hass);return J` + + ${$M.filter(t=>kM(this.entity,t,this.commands)).map(t=>J` + + + + `)} + + `}};gn([Gt({attribute:!1})],EM.prototype,"hass",void 0),gn([Gt({attribute:!1})],EM.prototype,"entity",void 0),gn([Gt({attribute:!1})],EM.prototype,"commands",void 0),gn([Gt({type:Boolean})],EM.prototype,"fill",void 0),EM=gn([Lt("mushroom-vacuum-commands-control")],EM);var xM,AM,SM,TM=kt(()=>{To(),_g(),jg(),Vg(),Fg(),yM=["on_off","start_pause","stop","locate","clean_spot","return_home"],wM=mo(Pg,mo(zg,gg,sg),Co({icon_animation:$o(bo()),commands:$o(vo(Eo()))}))}),MM=/* @__PURE__ */$t({VacuumCardEditor:()=>SM}),IM=kt(()=>{Vt(),Be(),Oi(),To(),pn(),Oc(),_g(),jg(),Yf(),Hg(),Rg(),Ug(),TM(),vn(),xM=["commands"],AM=vi((t,e,o)=>[{name:"entity",selector:{entity:{domain:fM}}},Ag(o),{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_animation",selector:{boolean:{}}}]},...$g(e),{name:"commands",selector:{select:{mode:"list",multiple:!0,options:yM.map(o=>({value:o,label:"on_off"===o?e(`editor.card.vacuum.commands_list.${o}`):t(`ui.dialogs.more_info_control.vacuum.${o}`)}))}}},...lg()]),SM=class extends Hf{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):xM.includes(t.name)?e(`editor.card.vacuum.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,wM),this._config=t}render(){if(!this.hass||!this._config)return et;const t=ic(this.hass),e=AM(this.hass.localize,t,this.hass.config.version);return J` + + `}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([ie()],SM.prototype,"_config",void 0),SM=gn([Lt(mM)],SM)});Vt(),Be(),je(),Re(),pn(),bn(),Pn(),On(),Bn(),Ln(),cg(),Xf(),_M(),vn(),tg({type:pM,name:"Mushroom Vacuum Card",description:"Card for vacuum entity"});var zM,PM=class extends Zf{static async getConfigElement(){return await Promise.resolve().then(()=>(IM(),MM)),document.createElement(mM)}static async getStubConfig(t){const e=Object.keys(t.states).filter(t=>fM.includes(t.split(".")[0]));return{type:`custom:${pM}`,entity:e[0]}}get hasControls(){var t,e,o;return!(!this._stateObj||!this._config)&&(e=this._stateObj,o=null!==(t=this._config.commands)&&void 0!==t?t:[],$M.some(t=>CM(e,t,o)))}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this._config||!this.hass||!this._config.entity)return et;const o=this._stateObj;if(!o)return this.renderNotFound(this._config);const i=Qf(this.hass,o,this._config.name),n=this._config.icon,r=Dn(this._config),a=Wf(o,r.icon_type),s=zo(this.hass),l=null!==(t=null===(e=this._config)||void 0===e?void 0:e.commands)&&void 0!==t?t:[];return J` + + + + ${a?this.renderPicture(a):this.renderIcon(o,n)} + ${this.renderBadge(o)} + ${this.renderStateInfo(o,r,i)}; + + ${((t,e)=>$M.some(o=>kM(t,o,e)))(o,l)?J` +
+ + +
+ `:et} +
+
+ `}renderIcon(t,e){var o,i;return J` + + + `}static get styles(){return[super.styles,Jf,l` + mushroom-state-item { + cursor: pointer; + } + mushroom-shape-icon { + --icon-color: rgb(var(--rgb-state-vacuum)); + --shape-color: rgba(var(--rgb-state-vacuum), 0.2); + } + .cleaning ha-state-icon { + animation: 5s infinite linear cleaning; + } + .cleaning ha-state-icon { + animation: 2s infinite linear returning; + } + mushroom-vacuum-commands-control { + flex: 1; + } + `]}};PM=gn([Lt(pM)],PM),At(),oe();var NM,OM,BM,LM,DM,jM=kt(()=>{To(),zM=Co({type:Eo(),visibility:_o()})}),HM=kt(()=>{To(),_g(),jM(),NM=mo(zM,sg,Co({entity:$o(Eo()),area:$o(Eo()),icon:$o(Eo()),color:$o(Eo()),label:$o(Eo()),content:$o(Eo()),picture:$o(Eo()),entity_id:$o(Ao([Eo(),vo(Eo())]))}))}),RM=/* @__PURE__ */$t({MushroomTemplateBadgeEditor:()=>DM,TEMPLATE_BADGE_HELPERS:()=>BM,TEMPLATE_BADGE_LABELS:()=>OM}),UM=kt(()=>{Vt(),Be(),To(),pn(),Oc(),Hg(),Ug(),HM(),vn(),OM=["label","content"],BM=["area","entity"],LM=[{name:"context",flatten:!0,type:"expandable",icon:"mdi:shape",schema:[{name:"entity",selector:{entity:{}}},{name:"area",selector:{area:{}}}]},{name:"content",flatten:!0,type:"expandable",icon:"mdi:text-short",schema:[{name:"label",selector:{template:{}}},{name:"content",selector:{template:{}}},{name:"color",selector:{template:{}}},{name:"icon",selector:{template:{}}},{name:"picture",selector:{template:{}}}]},{name:"interactions",type:"expandable",flatten:!0,icon:"mdi:gesture-tap",schema:[{name:"tap_action",selector:{ui_action:{default_action:"none"}}},{name:"",type:"optional_actions",flatten:!0,schema:["hold_action","double_tap_action"].map(t=>({name:t,selector:{ui_action:{default_action:"none"}}}))}]}],DM=class extends Ot{constructor(...t){super(...t),this._computeLabel=t=>{const e=ic(this.hass);return"expandable"===t.type?e(`editor.section.${t.name}`):Eg.includes(t.name)?e(`editor.card.generic.${t.name}`):OM.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)},this._computeHelper=t=>{if("expandable"===t.type)return;const e=ic(this.hass);return xg.includes(t.name)?e(`editor.card.generic.${t.name}_helper`):OM.includes(t.name)?e(`editor.card.template.${t.name}_helper`):void 0}}connectedCallback(){super.connectedCallback(),Sg()}setConfig(t){ho(t,NM),this._config=t}render(){return this.hass&&this._config?J` + + `:et}_valueChanged(t){ve(this,"config-changed",{config:t.detail.value})}},gn([Gt({attribute:!1})],DM.prototype,"hass",void 0),gn([ie()],DM.prototype,"_config",void 0),DM=gn([Lt("mushroom-template-badge-editor")],DM)});Vt(),Be(),je(),gT(),Re(),pn(),HT(),pv(),__(),dv(),vn(),oe();var VM=new R_(1e3);!function(t){const o=window;o.customBadges=o.customBadges||[];const i=t.type.replace("-badge","").replace("mushroom-","");o.customBadges.push(ee(ee({},t),{},{preview:!0,documentationURL:`${e.url}/blob/main/docs/badges/${i}.md`}))}({type:"mushroom-template-badge",name:"Mushroom Template",description:"Build your own badge using templates"});var FM=["icon","color","label","content","picture"],GM=class extends Ot{constructor(...t){super(...t),this._unsubRenderTemplates=/* @__PURE__ */new Map}static async getConfigElement(){return await Promise.resolve().then(()=>(UM(),RM)),document.createElement("mushroom-template-badge-editor")}static async getStubConfig(t){return{type:"custom:mushroom-template-badge",content:"Hello",icon:"mdi:mushroom",color:"red"}}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){if(super.disconnectedCallback(),this._tryDisconnect(),this._config&&this._templateResults){const t=this._computeCacheKey();VM.set(t,this._templateResults)}}_computeCacheKey(){return(0,yv.default)(this._config)}willUpdate(t){if(super.willUpdate(t),this._config&&!this._templateResults){const t=this._computeCacheKey();VM.has(t)?this._templateResults=VM.get(t):this._templateResults={}}}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){var t=this;FM.forEach(e=>{t._tryConnectKey(e)})}async _tryConnectKey(t){var e=this;if(void 0===e._unsubRenderTemplates.get(t)&&e.hass&&e._config&&e.isTemplate(t))try{var o;const i=Si(e.hass.connection,o=>{e._templateResults=ee(ee({},e._templateResults),{},{[t]:o})},{template:null!==(o=e._config[t])&&void 0!==o?o:"",entity_ids:e._config.entity_id,variables:{config:e._config,user:e.hass.user.name,entity:e._config.entity},strict:!0});e._unsubRenderTemplates.set(t,i),await i}catch(n){var i;const o={result:null!==(i=e._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};e._templateResults=ee(ee({},e._templateResults),{},{[t]:o}),e._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){var t=this;FM.forEach(e=>{t._tryDisconnectKey(e)})}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e){this._unsubRenderTemplates.delete(t);try{await(await e)()}catch(o){if("not_found"!==o.code&&"template_error"!==o.code)throw o}}}setConfig(t){FM.forEach(e=>{var o,i;(null===(o=this._config)||void 0===o?void 0:o[e])===t[e]&&(null===(i=this._config)||void 0===i?void 0:i.entity)==t.entity||this._tryDisconnectKey(e)}),this._config=ee({tap_action:{action:"none"}},t)}get hasAction(){var t,e,o,i;return!(null===(t=this._config)||void 0===t?void 0:t.tap_action)||Yi(null===(e=this._config)||void 0===e?void 0:e.tap_action)||Yi(null===(o=this._config)||void 0===o?void 0:o.hold_action)||Yi(null===(i=this._config)||void 0===i?void 0:i.double_tap_action)}render(){if(!this._config||!this.hass)return et;const t=this.getValue("icon"),e=this.getValue("color"),o=this.getValue("content"),i=this.getValue("label"),n=this.getValue("picture"),r=!!o,a=!!t||!!n,s={};e&&(s["--badge-color"]=_T(e));const l=V_(t);return J` +
+ + ${n?J``:l||(t?J` + + `:et)} + ${o?J` + + ${i?J`${i}`:et} + ${o} + + `:et} +
+ `}_handleAction(t){Ni(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const o=null===(e=this._config)||void 0===e?void 0:e[t];return null==o?void 0:o.includes("{")}getValue(t){var e,o;return this.isTemplate(t)?null===(e=this._templateResults)||void 0===e||null===(e=e[t])||void 0===e||null===(e=e.result)||void 0===e?void 0:e.toString():null===(o=this._config)||void 0===o?void 0:o[t]}static get styles(){return l` + :host { + -webkit-tap-highlight-color: transparent; + } + .badge { + position: relative; + --ha-ripple-color: var(--badge-color); + --ha-ripple-hover-opacity: 0.04; + --ha-ripple-pressed-opacity: 0.12; + transition: + box-shadow 180ms ease-in-out, + border-color 180ms ease-in-out; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 8px; + height: var(--ha-badge-size, 36px); + min-width: var(--ha-badge-size, 36px); + padding: 0px 8px; + box-sizing: border-box; + width: auto; + border-radius: var( + --ha-badge-border-radius, + calc(var(--ha-badge-size, 36px) / 2) + ); + background: var( + --ha-card-background, + var(--card-background-color, white) + ); + -webkit-backdrop-filter: var(--ha-card-backdrop-filter, none); + backdrop-filter: var(--ha-card-backdrop-filter, none); + border-width: var(--ha-card-border-width, 1px); + box-shadow: var(--ha-card-box-shadow, none); + border-style: solid; + border-color: var( + --ha-card-border-color, + var(--divider-color, #e0e0e0) + ); + --mdc-icon-size: 18px; + text-align: center; + } + .badge:focus-visible { + --shadow-default: var(--ha-card-box-shadow, 0 0 0 0 transparent); + --shadow-focus: 0 0 0 1px var(--badge-color); + border-color: var(--badge-color); + box-shadow: var(--shadow-default), var(--shadow-focus); + } + button, + [role="button"] { + cursor: pointer; + } + button:focus, + [role="button"]:focus { + outline: none; + } + .info { + display: flex; + flex-direction: column; + align-items: flex-start; + padding-right: 4px; + padding-inline-end: 4px; + padding-inline-start: initial; + } + .label { + font-size: 10px; + font-style: normal; + font-weight: 500; + line-height: 10px; + letter-spacing: 0.1px; + color: var(--secondary-text-color); + } + .content { + font-size: 12px; + font-style: normal; + font-weight: 500; + line-height: 16px; + letter-spacing: 0.1px; + color: var(--primary-text-color); + } + svg { + width: var(--mdc-icon-size); + height: var(--mdc-icon-size); + display: flex; + } + ha-state-icon { + color: var(--badge-color); + line-height: 0; + } + img { + width: 30px; + height: 30px; + border-radius: 50%; + object-fit: cover; + overflow: hidden; + } + .badge.no-info { + padding: 0; + } + .badge:not(.no-icon):not(.no-info) img { + margin-left: -6px; + margin-inline-start: -6px; + margin-inline-end: initial; + } + .badge.no-icon .info { + padding-right: 4px; + padding-left: 4px; + padding-inline-end: 4px; + padding-inline-start: 4px; + } + ${c_} + `}};gn([Gt({attribute:!1})],GM.prototype,"hass",void 0),gn([ie()],GM.prototype,"_config",void 0),gn([ie()],GM.prototype,"_templateResults",void 0),gn([ie()],GM.prototype,"_unsubRenderTemplates",void 0),GM=gn([Lt("mushroom-template-badge")],GM),At(),GT(),console.info(`%c🍄 Mushroom 🍄 - ${t}`,"color: #ef5350; font-weight: 700;"); \ No newline at end of file diff --git a/www/community/lovelace-mushroom/mushroom.js.gz b/www/community/lovelace-mushroom/mushroom.js.gz index 10762c9..6085f42 100644 Binary files a/www/community/lovelace-mushroom/mushroom.js.gz and b/www/community/lovelace-mushroom/mushroom.js.gz differ diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index 2be4fe4..bb0ecc8 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -4,7 +4,7 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 121.5, + "voltage": 120.9, "countdown_to_turn_on": 0, "ac_frequency": 60, "power_factor": 0.11, @@ -22,15 +22,15 @@ }, "0xffffb40e0607af27": { "state": "ON", - "voltage": 121.7, + "voltage": 121.3, "ac_frequency": 60, "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "power": 2.1, - "current": 0.12, - "energy": 24.05, - "power_factor": 0.14, + "power": 4, + "current": 0.13, + "energy": 24.1, + "power_factor": 0.25, "update": { "state": "idle", "installed_version": 268513381, @@ -47,7 +47,7 @@ "countdown_to_turn_off": 0, "voltage": 120.7, "countdown_to_turn_on": 0, - "energy": 44.18, + "energy": 44.22, "power_factor": 0.2, "ac_frequency": 60, "update": { @@ -58,8 +58,8 @@ "latest_release_notes": null }, "linkquality": 83, - "power": 83.7, - "current": 0.82, + "power": 0.2, + "current": 0.02, "power_on_behavior": "on" }, "0xb40e060fffe031e3": { @@ -74,13 +74,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 120.3, + "voltage": 120, "state": "ON", "ac_frequency": 60, - "energy": 89.25, - "power": 0.8, + "energy": 89.31, + "power": 3.7, "current": 0.05, - "power_factor": 0.38, + "power_factor": 0.41, "update": { "state": "idle", "installed_version": 268513381, @@ -95,13 +95,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 121.4, - "energy": 36.66, + "voltage": 120.7, + "energy": 36.73, "state": "ON", - "power": 64.6, - "current": 0.63, + "power": 77.4, + "current": 0.84, "ac_frequency": 60, - "power_factor": 0.85, + "power_factor": 0.8, "update": { "state": "idle", "installed_version": 268513381, @@ -114,12 +114,12 @@ }, "0xffffb40e060895b3": { "state": "ON", - "voltage": 121, + "voltage": 120.8, "ac_frequency": 60, "energy": 5.74, - "current": 0.02, + "current": 0.01, "power": 0.1, - "power_factor": 0.22, + "power_factor": 0.11, "linkquality": 109, "update": { "state": "idle", @@ -136,14 +136,14 @@ "0xffffb40e0608864e": { "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 121.9, + "voltage": 121.4, "energy": 16.08, "countdown_to_turn_on": 0, "state": "ON", "current": 0.02, "ac_frequency": 60, "power": 0.4, - "power_factor": 0.14, + "power_factor": 0.2, "update": { "state": "idle", "installed_version": 268513381, @@ -172,7 +172,7 @@ "0xffffb40e060893d8": { "state": "ON", "led_brightness": 100, - "voltage": 122.1, + "voltage": 121.7, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, "energy": 2.98, @@ -187,12 +187,12 @@ "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/ThirdReality/SmartPlug_Zigbee_PROD_OTA_V101_1.01.01.ota", "latest_release_notes": null }, - "power_factor": 0.06, - "power": 0.1 + "power_factor": 0, + "power": 0.3 }, "0xa4c1380d0679ffff": { "battery": 100, - "temperature": 26.8, + "temperature": 26.9, "temperature_units": "celsius", "temperature_calibration": 0, "update": { @@ -245,7 +245,7 @@ }, "0xb40e060fffe717c5": { "battery": 100, - "occupancy": true, + "occupancy": false, "tamper": false, "battery_low": false, "linkquality": 65,