diff --git a/Readme.Md b/README.md similarity index 92% rename from Readme.Md rename to README.md index c8ee687..c4129ef 100755 --- a/Readme.Md +++ b/README.md @@ -1,4 +1,6 @@ -# Wiser Home Assistant Integration v3.0.24 +# Wiser Home Assistant Integration v3.1.0 + +[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/hacs/integration) This repository contains a Home Assistant component + platforms, for the awesome Drayton Wiser Heating solution. It also supports the European version of the Wiser Hub under the Schneider Electric brand, including support for lights and blinds. @@ -7,16 +9,20 @@ For the latest version of the Wiser Home Assistant Platform please use the maste For more information checkout the AMAZING community thread available on https://community.home-assistant.io/t/drayton-wiser-home-assistant-integration/80965 --- +## What's New? +- The Wiser Schedule Card to allow you add, edit, rename, delete and assign schedules to rooms or devices via the HA UI. See [Schedule Card](#schedule-card) for how to setup and use. + ## Contents - [Minimum Requirements](#minimum-requirements) -- [Updating to v3.0 from v2.x](#updating-to-v30-from-v2.x---important-please-read) +- [Updating to v3.x from v2.x](#updating-to-v30-from-v2.x---important-please-read) - [Issues & Questions](#issues-and-questions) - [Functionality of this Integration](#functionality) - [Installing](#code-installation) - [Configuration](#configuration) - [Managing Schedules with Home Assistant](#managing-schedules-with-home-assistant) - [Network Topology](#network-topology) +- [Schedule Card](#schedule-card) - [Network Map](#network-map) - [Battery Values](#battery-values) - [Community and Recipes](#community) @@ -26,11 +32,9 @@ For more information checkout the AMAZING community thread available on https:// ## Minimum Requirements -Requires a minimum of HA 2021.12. This is needed to support the new button functionality and changes to config flow. -Requires the new WiserHeatAPIv2 api. +Requires a minimum of HA 2022.06. - -## Updating to v3.0 from v2.x - IMPORTANT PLEASE READ! +## Updating to v3.x from v2.x - IMPORTANT PLEASE READ! Some of the great new functionality below has only been possible by making some major changes to the integration code and how HA entities are registered. As such, when upgrading a number of existing entities in v2 will be replaced with new ones and the old ones will show unavailable. @@ -68,8 +72,7 @@ Mark & Angelo - Support for hub discovery and UI config. No YAML editing. - Support for multiple hubs -- Support for Wiser Hub, iTRVs, Roomstats, Heating Actuators and SmartPlugs -- Basic sensor support for Dimmable Lights and Shutters +- Support for Wiser Hub, iTRVs, Roomstats, Heating Actuators, SmartPlugs, Lights and Blinds - **Hub (System) Device** - Various switches to control hub settings (Away Mode, Comfort Mode, Daylight Saving, Eco Mode, Valve Protection) @@ -112,9 +115,6 @@ Mark & Angelo - Selector to set mode (Auto, Manual) for Smart Plug - Many attributes available -- **Network Map Sensor** - - Sensor for use with Zigbee2mqtt Networkmap Card by @azuwis - see XXXX for how to setup - - **Moments** - Buttons to activate Moments configured in the Wiser App @@ -129,7 +129,8 @@ Mark & Angelo - Service `remove_orphaned_entries`: Provides ability to remove HA devices for rooms/devices that have been removed from your hub. Must have no entities. - Service `output_hub_json`: Provides ability to output hub json to 3 anonymised files to enable easier debugging - +- **UI Cards** + - Schedule Card to add, edit, delete and rename schedules ## Sample Images ![](docs/screenshot.PNG) @@ -146,8 +147,6 @@ Mark & Angelo ![](docs/heatingactuator.PNG) -![](docs/networkmap.png) - # Code Installation @@ -453,7 +452,22 @@ In order to create these files do the following: 4) Select Call Service 5) This will output 3 files - domain.json, schedule.json, network.json in a directory wiser_data in your config directory. These can be uploaded to an issue on github. +## Schedule Card + +This is our first venture into creating UI components for Home Assistant. We have done a lot of testing but there maybe some scenarios we haven't thought of that could enhibit unexpected behaviour. Rest assured however, the worst that can happen is a deleted schedule that you will have to recreate. + +So, it has been on our request list since early 2021 to be able to manage schedules via HA. Well, as HA lacks any inbuilt way to do this, we have had to build our own. I would like to give a shout out to @neilsfaber who writes the amazing scheduler-card integration and card for HA where we have used his code to learn how to do this, and copied some of his ideas/code. + +It is very simple to use/add the card. If you go to add a card to your dashboard, you will now see the Wiser Schedule Card in the list. Just add like any other card. + +Instead of lots of words about how to use this card, we thought best to do a short video which may lack Tarantino quality directorship but should get the point across! + + +![](docs/schedule-card.PNG) + +[Video](https://www.loom.com/share/6c85291deee94d709f36515be8fc1763) +We hope you enjoy it and find it useful in managing your Wiser environment via HA. ## Network Topology With V1.9 for TRVs you can now determine if the TRV is connected to the heathub directly or via a smartplug repeater. @@ -470,38 +484,7 @@ Each TRV sensor now has three special network related attributes ## Network Map -From v3.0.24, you can now use the zigbee2mqtt-networkmap card from @azuwis to display an image of your Wiser Zigbee network. The below instructions will help you set it up. -1) Firstly, install the zigbee2mqtt-networkmap card using HACS -2) Create a new card in lovelace with the following yaml - ```yaml - type: custom:zigbee2mqtt-networkmap - entity: sensor.wiser_zigbee_network_map - node_size: 24 - font_size: 10 - link_width: 2 - height: 500 - force: 5000 - css: | - .card-actions mwc-button {visibility: hidden} - :host { - --zigbee2mqtt-networkmap-node-fill-color: var(--ha-card-background, var(--card-background-color, white)); - --zigbee2mqtt-networkmap-node-pinned-color:var(--primary-color); - --zigbee2mqtt-networkmap-link-color: var(--primary-color); - --zigbee2mqtt-networkmap-hover-color: var(--primary-color); - --zigbee2mqtt-networkmap-link-selected-color:var(--primary-color); - --zigbee2mqtt-networkmap-label-color: var(--primary-text-color); - --zigbee2mqtt-networkmap-arrow-color: var(--primary-color); - --zigbee2mqtt-networkmap-node-coordinator-color: var(--label-badge-red); - --zigbee2mqtt-networkmap-node-router-color: var(--label-badge-green); - } - - ``` - 3) Tweak the settings and css to suit how you want it to look. - - ![](docs/networkmap.png) - - ***NOTES*** - 1) As this card is designed to work with zigbee2mqtt, we are using css in the card yaml to hide the refresh button. This is advisable as a) it doesn't do anything and b) if you don't have mqtt installed it will error. +This was removed from 3.0.24 just before release as it caused some spamming of the HA logs. It will return in 3.1.x as a dedicated Wiser Zigbee network map card. ## Battery Values @@ -544,6 +527,13 @@ And many many more, please see github pull requests for more info Moving forward (post 1.9) there will be two primary branches, `master` and `dev` . Master will be the primary "production" branch and "dev" will be the branch used for development. Other branches will likely exist where we build code into and then merge into dev, which in turn gets merged into master when all is good and dandy. # Change log +- 3.1.0 + * Bump api to 0.0.37 + * Fix for battery voltages over 3v show 0% + * Added update delay after sending light command to allow time for hub to update new values before reading + * Added websockets functions to support schedule card + * Addded schedule card to managed schedules + * Fixed deprecation functions warning for number entity - 3.0.24 * Bump api to 0.0.32 * Add shutter, light and dimable light support - thanks @LGO44 diff --git a/custom_components/wiser/__init__.py b/custom_components/wiser/__init__.py index d07530d..b97483e 100755 --- a/custom_components/wiser/__init__.py +++ b/custom_components/wiser/__init__.py @@ -7,6 +7,7 @@ import asyncio from datetime import timedelta, datetime import logging +import json import voluptuous as vol from wiserHeatAPIv2.wiserhub import ( TEMP_MINIMUM, @@ -39,8 +40,12 @@ ) from homeassistant.helpers.dispatcher import dispatcher_send from homeassistant.helpers.event import async_track_time_interval +from homeassistant.loader import Integration, async_get_integration from homeassistant.util import Throttle +from .websockets import async_register_websockets +from .frontend import locate_dir + from .const import ( CONF_MOMENTS, CONF_SETPOINT_MODE, @@ -55,8 +60,10 @@ DEFAULT_SCAN_INTERVAL, DOMAIN, MANUFACTURER, + SCHEDULE_CARD_FILENAME, UPDATE_LISTENER, UPDATE_TRACK, + URL_BASE, WISER_PLATFORMS, WISER_SERVICES ) @@ -194,6 +201,8 @@ async def async_setup_entry(hass, config_entry): hass.config_entries.async_forward_entry_setup(config_entry, platform) ) + await async_register_websockets(hass, data) + # Initialise global services def get_entity_from_entity_id(entity: str): """Get wiser entity from entity_id""" @@ -378,6 +387,18 @@ def output_hub_json(service): # Add hub as device await data.async_update_device_registry() + # Register custom cards + url = f"{URL_BASE}/{SCHEDULE_CARD_FILENAME}" + hass.http.register_static_path( + URL_BASE, + hass.config.path("custom_components/wiser/frontend"), + cache_headers=False + ) + resource_loaded = [res["url"] for res in hass.data['lovelace']["resources"].async_items() if res["url"] == url] + if not resource_loaded: + # Custom card - need to remove on uninstall! + resource_id = await hass.data['lovelace']["resources"].async_create_item({"res_type":"module", "url":url}) + _LOGGER.info("Wiser Component Setup Completed") return True @@ -396,6 +417,12 @@ async def async_unload_entry(hass, config_entry): :param config_entry: :return: """ + # Unload lovelace module resource + url = f"{URL_BASE}/{SCHEDULE_CARD_FILENAME}" + wiser_resources = [resource for resource in hass.data['lovelace']["resources"].async_items() if resource["url"] == url] + for resource in wiser_resources: + await hass.data['lovelace']["resources"].async_delete_item(resource.get("id")) + # Deregister services _LOGGER.debug("Unregister Wiser Services") hass.services.async_remove(DOMAIN, SERVICE_REMOVE_ORPHANED_ENTRIES) @@ -466,11 +493,13 @@ async def async_update(self, no_throttle: bool = False): try: result = await self._hass.async_add_executor_job(self.wiserhub.read_hub_data) if result: - _LOGGER.debug(f"Wiser Hub data updated - {self.wiserhub.system.name}") + _LOGGER.info(f"Wiser Hub data updated - {self.wiserhub.system.name}") # Send update notice to all components to update self.last_update_time = datetime.now() self.last_update_status = "Success" dispatcher_send(self._hass, f"{self.wiserhub.system.name}-HubUpdateMessage") + # Fire event on successfull update + dispatcher_send(self._hass,"wiser_update_received") return True _LOGGER.error(f"Unable to update from Wiser hub - {self.wiserhub.system.name}") @@ -556,5 +585,26 @@ async def async_output_hub_json(self, entry_id, wiser_hub_id: str): wiserhub.output_raw_hub_data, endpoint, f"{endpoint}-{datetime.now().strftime('%Y%m%d-%H%M%S')}", self._hass.config.config_dir ): _LOGGER.info(f"Written hub {endpoint} data to the wiser_data subdirectory in your config directory") - - \ No newline at end of file + + def _remove_schedule_elements(self, schedule_data: dict) -> dict: + remove_list = ["Name", "Description", "Type"] + for item in remove_list: + if item in schedule_data: + del schedule_data[item] + return schedule_data + + def async_get_schedules(self): + """fetch a list of schedules (websocket API hook)""" + schedules = [] + for schedule in self.wiserhub.schedules.all: + schedules.append( + { + "id": schedule.id, + "name": schedule.name, + "type": schedule.schedule_type, + "level_type": schedule.schedule_level_type if hasattr(schedule, 'schedule_level_type') else None, + "schedule": self._remove_schedule_elements(schedule._convert_from_wiser_schedule(schedule.schedule_data)) + } + ) + + return schedules \ No newline at end of file diff --git a/custom_components/wiser/const.py b/custom_components/wiser/const.py index 1bb4ba7..7a6219e 100755 --- a/custom_components/wiser/const.py +++ b/custom_components/wiser/const.py @@ -7,8 +7,10 @@ """ DOMAIN = "wiser" DATA_WISER_CONFIG = "wiser_config" +URL_BASE = "/wiser" +SCHEDULE_CARD_FILENAME = "wiser-schedule-card.js" -VERSION = "3.0.24" +VERSION = "3.1.0" WISER_PLATFORMS = ["climate", "sensor", "switch", "select", "button", "number", "light", "cover"] DATA = "data" UPDATE_TRACK = "update_track" diff --git a/custom_components/wiser/cover.py b/custom_components/wiser/cover.py index c0de825..3a9d2ce 100644 --- a/custom_components/wiser/cover.py +++ b/custom_components/wiser/cover.py @@ -57,21 +57,19 @@ class WiserShutter(CoverEntity, WiserScheduleEntity): def __init__(self, data, shutter_id): """Initialize the sensor.""" self._data = data - self._shutter_id = shutter_id - self._shutter = self._data.wiserhub.devices.shutters.get_by_id(self._shutter_id) - self._device_id = self._shutter.id - self._device_type_id = self._shutter.device_type_id - self._schedule = self._shutter.schedule + self._device_id = shutter_id + self._device = self._data.wiserhub.devices.shutters.get_by_id(self._device_id) + self._schedule = self._device.schedule _LOGGER.info(f"{self._data.wiserhub.system.name} {self.name} init") async def async_force_update(self): - _LOGGER.debug(f"{self._shutter.name} requested hub update") + _LOGGER.debug(f"{self._device.name} requested hub update") await self._data.async_update(no_throttle=True) async def async_update(self): """Async update method.""" - self._shutter = self._data.wiserhub.devices.shutters.get_by_id(self._shutter_id) - self._schedule = self._shutter.schedule + self._device = self._data.wiserhub.devices.shutters.get_by_id(self._device_id) + self._schedule = self._device.schedule @property def supported_features(self): @@ -82,19 +80,19 @@ def supported_features(self): @property def scheduled_position(self): """Return scheduled position from data.""" - return self._shutter.scheduled_lift + return self._device.scheduled_lift @property def device_info(self): """Return device specific attributes.""" return { - "name": get_device_name(self._data, self._shutter_id), - "identifiers": {(DOMAIN, get_identifier(self._data, self._shutter_id))}, + "name": get_device_name(self._data, self._device_id), + "identifiers": {(DOMAIN, get_identifier(self._data, self._device_id))}, "manufacturer": MANUFACTURER, - "model": self._data.wiserhub.devices.get_by_id(self._shutter_id).model, - "serial_number" : self._data.wiserhub.devices.get_by_id(self._shutter_id).serial_number, - "product_type": self._shutter.product_type, - "product_identifier": self._shutter.product_identifier, + "model": self._data.wiserhub.devices.get_by_id(self._device_id).model, + "serial_number" : self._data.wiserhub.devices.get_by_id(self._device_id).serial_number, + "product_type": self._device.product_type, + "product_identifier": self._device.product_identifier, "via_device": (DOMAIN, self._data.wiserhub.system.name), } @@ -106,7 +104,7 @@ def icon(self): @property def name(self): """Return Name of device""" - return f"{get_device_name(self._data, self._shutter_id)} Control" + return f"{get_device_name(self._data, self._device_id)} Control" @property def should_poll(self): @@ -116,24 +114,24 @@ def should_poll(self): @property def current_cover_position(self): """Return current position from data.""" - return self._shutter.current_lift + return self._device.current_lift @property def is_closed(self): - return self._shutter.is_closed + return self._device.is_closed @property def is_opening(self): - return self._shutter.is_opening + return self._device.is_opening @property def is_closing(self): - return self._shutter.is_closing + return self._device.is_closing @property def unique_id(self): """Return unique Id.""" - return f"{self._data.wiserhub.system.name}-Wisershutter-{self._shutter_id}-{self.name}" + return f"{self._data.wiserhub.system.name}-Wisershutter-{self._device_id}-{self.name}" @property def extra_state_attributes(self): @@ -141,54 +139,54 @@ def extra_state_attributes(self): # Generic attributes attrs = super().state_attributes # Shutter Identification - attrs["name"] = self._shutter.name - attrs["model"] = self._shutter.model - attrs["product_type"] = self._shutter.product_type - attrs["product_identifier"] = self._shutter.product_identifier - attrs["product_model"] = self._shutter.product_model - attrs["serial_number"] = self._shutter.serial_number - attrs["firmware"] = self._shutter.firmware_version + attrs["name"] = self._device.name + attrs["model"] = self._device.model + attrs["product_type"] = self._device.product_type + attrs["product_identifier"] = self._device.product_identifier + attrs["product_model"] = self._device.product_model + attrs["serial_number"] = self._device.serial_number + attrs["firmware"] = self._device.firmware_version # Room - if self._data.wiserhub.rooms.get_by_id(self._shutter.room_id) is not None: - attrs["room"] = self._data.wiserhub.rooms.get_by_id(self._shutter.room_id).name + if self._data.wiserhub.rooms.get_by_id(self._device.room_id) is not None: + attrs["room"] = self._data.wiserhub.rooms.get_by_id(self._device.room_id).name else: attrs["room"] = "Unassigned" # Settings - attrs["shutter_id"] = self._shutter_id - attrs["away_mode_action"] = self._shutter.away_mode_action - attrs["mode"] = self._shutter.mode - attrs["lift_open_time"] = self._shutter.drive_config.open_time - attrs["lift_close_time"] = self._shutter.drive_config.close_time + attrs["shutter_id"] = self._device_id + attrs["away_mode_action"] = self._device.away_mode_action + attrs["mode"] = self._device.mode + attrs["lift_open_time"] = self._device.drive_config.open_time + attrs["lift_close_time"] = self._device.drive_config.close_time # Command state - attrs["control_source"] = self._shutter.control_source + attrs["control_source"] = self._device.control_source # Status - attrs["is_open"] = self._shutter.is_open - attrs["is_closed"] = self._shutter.is_closed - if self._shutter.is_open : + attrs["is_open"] = self._device.is_open + attrs["is_closed"] = self._device.is_closed + if self._device.is_open : attrs["current_state"] = "Open" - elif self._shutter.is_closed : + elif self._device.is_closed : attrs["current_state"] ="Closed" - elif (self._shutter.is_open == False and self._shutter.is_closed == False): + elif (self._device.is_open == False and self._device.is_closed == False): attrs["current_state"] = "Middle" - attrs["lift_movement"] = self._shutter.lift_movement + attrs["lift_movement"] = self._device.lift_movement # Positions - attrs["current_lift"] = self._shutter.current_lift - attrs["manual_lift"] = self._shutter.manual_lift - attrs["target_lift"] = self._shutter.target_lift - attrs["scheduled_lift"] = self._shutter.scheduled_lift + attrs["current_lift"] = self._device.current_lift + attrs["manual_lift"] = self._device.manual_lift + attrs["target_lift"] = self._device.target_lift + attrs["scheduled_lift"] = self._device.scheduled_lift # Schedule - attrs["schedule_id"] = self._shutter.schedule_id - if self._shutter.schedule: - attrs["schedule_name"] = self._shutter.schedule.name - attrs["next_day_change"] = str(self._shutter.schedule.next.day) - attrs["next_schedule_change"] = str(self._shutter.schedule.next.time) - attrs["next_schedule_state"] = self._shutter.schedule.next.setting + attrs["schedule_id"] = self._device.schedule_id + if self._device.schedule: + attrs["schedule_name"] = self._device.schedule.name + attrs["next_day_change"] = str(self._device.schedule.next.day) + attrs["next_schedule_change"] = str(self._device.schedule.next.time) + attrs["next_schedule_state"] = self._device.schedule.next.setting return attrs @@ -196,21 +194,21 @@ async def async_set_cover_position(self, **kwargs): """Move the cover to a specific position.""" position = kwargs[ATTR_POSITION] await self.hass.async_add_executor_job( - setattr, self._shutter, "current_lift", position + setattr, self._device, "current_lift", position ) await self.async_force_update() async def async_close_cover(self, **kwargs): """Close shutter""" await self.hass.async_add_executor_job( - self._shutter.close + self._device.close ) await self.async_force_update() async def async_open_cover(self, **kwargs): """Close shutter""" await self.hass.async_add_executor_job( - self._shutter.open + self._device.open ) await self.async_force_update() @@ -218,7 +216,7 @@ async def async_open_cover(self, **kwargs): async def async_stop_cover(self, **kwargs): """Stop shutter""" await self.hass.async_add_executor_job( - self._shutter.stop + self._device.stop ) await self.async_force_update() diff --git a/custom_components/wiser/frontend/__init__.py b/custom_components/wiser/frontend/__init__.py new file mode 100644 index 0000000..c45c4e2 --- /dev/null +++ b/custom_components/wiser/frontend/__init__.py @@ -0,0 +1,4 @@ +"""Wiser Frontend""" + +def locate_dir(): + return __path__[0] \ No newline at end of file diff --git a/custom_components/wiser/frontend/wiser-schedule-card.js b/custom_components/wiser/frontend/wiser-schedule-card.js new file mode 100644 index 0000000..09a39de --- /dev/null +++ b/custom_components/wiser/frontend/wiser-schedule-card.js @@ -0,0 +1,2601 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};function t(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}var i=function(){return i=Object.assign||function(e){for(var t,i=1,o=arguments.length;i=0;d--)(n=e[d])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}function n(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],o=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")} +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const r=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),d=new Map;class s{constructor(e,t){if(this._$cssResult$=!0,t!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=d.get(this.cssText);return r&&void 0===e&&(d.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const l=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1]),e[0]);return new s(i,a)},c=(e,t)=>{r?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const i=document.createElement("style"),o=window.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=t.cssText,e.appendChild(i)}))},h=r?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new s("string"==typeof e?e:e+"",a))(t)})(e):e +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;var p;const m=window.trustedTypes,u=m?m.emptyScript:"",f=window.reactiveElementPolyfillSupport,g={toAttribute(e,t){switch(t){case Boolean:e=e?u:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},b=(e,t)=>t!==e&&(t==t||e==e),v={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:b};class x extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,i)=>{const o=this._$Eh(i,t);void 0!==o&&(this._$Eu.set(o,i),e.push(o))})),e}static createProperty(e,t=v){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i="symbol"==typeof e?Symbol():"__"+e,o=this.getPropertyDescriptor(e,i,t);void 0!==o&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(o){const n=this[e];this[t]=o,this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||v}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(h(e))}else void 0!==e&&t.push(h(e));return t}static _$Eh(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,i;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return c(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ES(e,t,i=v){var o,n;const r=this.constructor._$Eh(e,i);if(void 0!==r&&!0===i.reflect){const a=(null!==(n=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==n?n:g.toAttribute)(t,i.type);this._$Ei=e,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$Ei=null}}_$AK(e,t){var i,o,n;const r=this.constructor,a=r._$Eu.get(e);if(void 0!==a&&this._$Ei!==a){const e=r.getPropertyOptions(a),d=e.converter,s=null!==(n=null!==(o=null===(i=d)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof d?d:null)&&void 0!==n?n:g.fromAttribute;this._$Ei=a,this[a]=s(t,e.type),this._$Ei=null}}requestUpdate(e,t,i){let o=!0;void 0!==e&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||b)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$Ei!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,i))):o=!1),!this.isUpdatePending&&o&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((e,t)=>this[t]=e)),this._$Et=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$ES(t,this[t],e))),this._$EC=void 0),this._$EU()}updated(e){}firstUpdated(e){}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var _;x.finalized=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:x}),(null!==(p=globalThis.reactiveElementVersions)&&void 0!==p?p:globalThis.reactiveElementVersions=[]).push("1.3.2");const y=globalThis.trustedTypes,w=y?y.createPolicy("lit-html",{createHTML:e=>e}):void 0,E=`lit$${(Math.random()+"").slice(9)}$`,S="?"+E,C=`<${S}>`,I=document,A=(e="")=>I.createComment(e),T=e=>null===e||"object"!=typeof e&&"function"!=typeof e,k=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,L=/>/g,R=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,D=/'/g,F=/"/g,M=/^(?:script|style|textarea|title)$/i,N=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),z=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),B=new WeakMap,P=I.createTreeWalker(I,129,null,!1),V=(e,t)=>{const i=e.length-1,o=[];let n,r=2===t?"":"",a=O;for(let t=0;t"===s[0]?(a=null!=n?n:O,l=-1):void 0===s[1]?l=-2:(l=a.lastIndex-s[2].length,d=s[1],a=void 0===s[3]?R:'"'===s[3]?F:D):a===F||a===D?a=R:a===$||a===L?a=O:(a=R,n=void 0);const h=a===R&&e[t+1].startsWith("/>")?" ":"";r+=a===O?i+C:l>=0?(o.push(d),i.slice(0,l)+"$lit$"+i.slice(l)+E+h):i+E+(-2===l?(o.push(void 0),t):h)}const d=r+(e[i]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(d):d,o]};class U{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let n=0,r=0;const a=e.length-1,d=this.parts,[s,l]=V(e,t);if(this.el=U.createElement(s,i),P.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(o=P.nextNode())&&d.length0){o.textContent=y?y.emptyScript:"";for(let i=0;i{var t;return k(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])})(e)?this.S(e):this.$(e)}M(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.M(e))}$(e){this._$AH!==H&&T(this._$AH)?this._$AA.nextSibling.data=e:this.k(I.createTextNode(e)),this._$AH=e}T(e){var t;const{values:i,_$litType$:o}=e,n="number"==typeof o?this._$AC(e):(void 0===o.el&&(o.el=U.createElement(o.h,this.options)),o);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===n)this._$AH.m(i);else{const e=new Y(n,this),t=e.p(this.options);e.m(i),this.k(t),this._$AH=e}}_$AC(e){let t=B.get(e.strings);return void 0===t&&B.set(e.strings,t=new U(e)),t}S(e){k(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const n of e)o===t.length?t.push(i=new X(this.M(A()),this.M(A()),this,this.options)):i=t[o],i._$AI(n),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,o){const n=this.strings;let r=!1;if(void 0===n)e=j(this,e,t,0),r=!T(e)||e!==this._$AH&&e!==z,r&&(this._$AH=e);else{const o=e;let a,d;for(e=n[0],a=0;a{var o,n;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:t;let a=r._$litPart$;if(void 0===a){const e=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=a=new X(t.insertBefore(A(),e),e,void 0,null!=i?i:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return z}}ie.finalized=!0,ie._$litElement$=!0,null===(ee=globalThis.litElementHydrateSupport)||void 0===ee||ee.call(globalThis,{LitElement:ie});const oe=globalThis.litElementPolyfillSupport;null==oe||oe({LitElement:ie}),(null!==(te=globalThis.litElementVersions)&&void 0!==te?te:globalThis.litElementVersions=[]).push("3.2.0"); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const ne=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:i,elements:o}=t;return{kind:i,elements:o,finisher(t){window.customElements.define(e,t)}}})(e,t) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */,re=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(i){i.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}};function ae(e){return(t,i)=>void 0!==i?((e,t,i)=>{t.constructor.createProperty(i,e)})(e,t,i):re(e,t) +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */}function de(e){return ae({...e,state:!0})} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const se=({finisher:e,descriptor:t})=>(i,o)=>{var n;if(void 0===o){const o=null!==(n=i.originalKey)&&void 0!==n?n:i.key,r=null!=t?{kind:"method",placement:"prototype",key:o,descriptor:t(i.key)}:{...i,key:o};return null!=e&&(r.finisher=function(t){e(t,o)}),r}{const n=i.constructor;void 0!==t&&Object.defineProperty(i,o,t(o)),null==e||e(n,o)}} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */;function le(e){return se({finisher:(t,i)=>{Object.assign(t.prototype[i],e)}})} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function ce(e,t){return se({descriptor:i=>{const o={get(){var t,i;return null!==(i=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[t]&&(this[t]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(e))&&void 0!==o?o:null),this[t]}}return o}})} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function he(e){return se({descriptor:t=>({async get(){var t;return await this.updateComplete,null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0})})} +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */var pe;const me=null!=(null===(pe=window.HTMLSlotElement)||void 0===pe?void 0:pe.prototype.assignedElements)?(e,t)=>e.assignedElements(t):(e,t)=>e.assignedNodes(t).filter((e=>e.nodeType===Node.ELEMENT_NODE)); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function ue(e,t,i){let o,n=e;return"object"==typeof e?(n=e.slot,o=e):o={flatten:t},i?function(e){const{slot:t,selector:i}=null!=e?e:{};return se({descriptor:o=>({get(){var o;const n="slot"+(t?`[name=${t}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),a=null!=r?me(r,e):[];return i?a.filter((e=>e.matches(i))):a},enumerable:!0,configurable:!0})})}({slot:n,flatten:t,selector:i}):se({descriptor:e=>({get(){var e,t;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(i);return null!==(t=null==r?void 0:r.assignedNodes(o))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}var fe=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ge="[^\\s]+",be=/\[([^]*?)\]/gm;function ve(e,t){for(var i=[],o=0,n=e.length;o-1?n:null}};function _e(e){for(var t=[],i=1;i3?0:(e-e%10!=10?1:0)*e%10]}},Ce=_e({},Se),Ie=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length0?"-":"+")+Ie(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+Ie(Math.floor(Math.abs(t)/60),2)+":"+Ie(Math.abs(t)%60,2)}},Te=function(e){return+e-1},ke=[null,"[1-9]\\d?"],Oe=[null,ge],$e=["isPm",ge,function(e,t){var i=e.toLowerCase();return i===t.amPm[0]?0:i===t.amPm[1]?1:null}],Le=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var i=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?i:-i}return 0}],Re=(xe("monthNamesShort"),xe("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"}),De=function(e,t,i){if(void 0===t&&(t=Re.default),void 0===i&&(i={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var o=[];t=(t=Re[t]||t).replace(be,(function(e,t){return o.push(t),"@@@"}));var n=_e(_e({},Ce),i);return(t=t.replace(fe,(function(t){return Ae[t](e,n)}))).replace(/@@@/g,(function(){return o.shift()}))};var Fe,Me;!function(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"===e.name}}(),function(){try{(new Date).toLocaleString("i")}catch(e){return"RangeError"===e.name}}(),function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}}(),function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none"}(Fe||(Fe={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(Me||(Me={}));var Ne=function(e,t,i,o){o=o||{},i=null==i?{}:i;var n=new Event(t,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return n.detail=i,e.dispatchEvent(n),n};function ze(e,t,i){if(t.has("config")||i)return!0;if(e.config.entity){var o=t.get("hass");return!o||o.states[e.config.entity]!==e.hass.states[e.config.entity]}return!1}var He,Be,Pe,Ve;!function(e){e.Heating="mdi:radiator",e.OnOff="mdi:power-socket-uk",e.Shutters="mdi:blinds",e.Lighting="mdi:lightbulb-outline"}(He||(He={})),function(e){e.Overview="OVERVIEW",e.ScheduleEdit="SCHEDULE_EDIT",e.ScheduleCopy="SCHEDULE_COPY",e.ScheduleAdd="SCHEDULE_ADD",e.ScheduleRename="SCHEDULE_RENAME"}(Be||(Be={})),function(e){e.Heating="19",e.OnOff="Off",e.Lighting="0",e.Shutters="100"}(Pe||(Pe={})),function(e){e.Heating="°C",e.OnOff="",e.Lighting="%",e.Shutters="%"}(Ve||(Ve={}));const Ue=["Heating","OnOff","Lighting","Shutters"],je=["Lighting","Shutters"],Ye=["Monday","Tuesday","Wednesday","Thursday","Friday"].concat(["Saturday","Sunday"]),Xe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ge=["Sunrise","Sunset"];var We;!function(e){e.Sunrise="3000",e.Sunset="4000"}(We||(We={}));var qe={version:"Version",invalid_configuration:"Invalid configuration"},Ke={actions:{copy:"Copy",files:"Files",rename:"Rename",add_before:"Add Before",add_after:"Add After"},headings:{schedule_actions:"Schedule Actions",schedule_type:"Schedule Type",schedule_id:"Schedule Id",schedule_name:"Schedule Name",schedule_assignment:"Schedule Assignment",not_assigned:"(Not Assigned)"}},Ze={common:qe,wiser:Ke},Qe={version:"Déclinaison",invalid_configuration:"Configuration Invalide"},Je={actions:{copy:"Copie",files:"Fichier",rename:"Renommer",add_before:"Ajouter Avant",add_after:"Ajouter Après"},headings:{schedule_actions:"Schedule Actions",schedule_type:"Schedule Type",schedule_id:"Schedule Id",schedule_name:"Schedule Name",schedule_assignment:"Schedule Assignment",not_assigned:"(Not Assigned)"}},et={common:Qe,wiser:Je};const tt={en:Object.freeze({__proto__:null,common:qe,wiser:Ke,default:Ze}),fr:Object.freeze({__proto__:null,common:Qe,wiser:Je,default:et})};function it(e,t="",i=""){const o=(localStorage.getItem("selectedLanguage")||"en").replace(/['"]+/g,"").replace("-","_");let n;try{n=e.split(".").reduce(((e,t)=>e[t]),tt[o]),n||(n=e.split(".").reduce(((e,t)=>e[t]),tt.en))}catch(t){try{n=e.split(".").reduce(((e,t)=>e[t]),tt.en)}catch(e){n=""}}return void 0===n&&(n=e.split(".").reduce(((e,t)=>e[t]),tt.en)),""!==t&&""!==i&&(n=n.replace(t,i)),n}const ot=l` + .card-header { + display: flex; + justify-content: space-between; + } + .card-header .name { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display: flex; + } + .card-header ha-switch { + padding: 5px; + } + .card-header ha-icon-button { + position: absolute; + right: 6px; + top: 6px; + } + .card-content { + flex: 1; + } + .card-content > *:first-child { + margin-top: 0; + } + .card-content > *:last-child { + margin-bottom: 0; + } + div.text-field, div.secondary { + color: var(--secondary-text-color); + } + .disabled { + color: var(--disabled-text-color); + } + div.header { + color: var(--secondary-text-color); + text-transform: uppercase; + font-weight: 500; + font-size: 12px; + margin: 20px 0px 0px 0px; + display: flex; + flex-direction: row; + } + div.header .switch { + text-transform: none; + font-weight: normal; + font-size: 14px; + display: flex; + flex-grow: 1; + justify-content: flex-end; + } + div.header ha-switch { + display: flex; + align-self: center; + margin: 0px 8px; + line-height: 24px; + } + mwc-button { + margin: 2px 0px; + } + mwc-button.active { + background: var(--primary-color); + --mdc-theme-primary: var(--text-primary-color); + border-radius: 4px; + } + mwc-button ha-icon { + margin-right: 11px; + } + mwc-button.warning { + --mdc-theme-primary: var(--error-color); + } + div.checkbox-container { + display: grid; + grid-template-columns: max-content 1fr max-content; + grid-template-rows: min-content; + grid-template-areas: "checkbox slider value"; + grid-gap: 0px 10px; + } + div.checkbox-container div.checkbox { + grid-area: checkbox; + display: flex; + align-items: center; + } + div.checkbox-container div.slider { + grid-area: slider; + display: flex; + align-items: center; + } + div.checkbox-container div.value { + grid-area: value; + min-width: 40px; + display: flex; + align-items: center; + } + a { + color: var(--primary-color); + } + a:visited { + color: var(--accent-color); + } + `,nt=(e,t)=>e.callWS({type:"wiser/schedules/types",hub:t}),rt=(e,t,i="")=>e.callWS({type:"wiser/schedules",hub:t,schedule_type:i}),at=(e,t,i,o)=>e.callWS({type:"wiser/schedule/id",hub:t,schedule_type:i,schedule_id:o});const dt=new RegExp("[^#a-f\\d]","gi"),st=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");const lt=Math.trunc;function ct(e){if(function(e){return 6===(e=String(e).replace("#","")).length&&!isNaN(Number("0x"+e))}(e)){const t=function(e,t={}){if("string"!=typeof e||dt.test(e)||!st.test(e))throw new TypeError("Expected a valid hex string");let i=1;8===(e=e.replace(/^#/,"")).length&&(i=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),4===e.length&&(i=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const o=Number.parseInt(e,16),n=o>>16,r=o>>8&255,a=255&o,d="number"==typeof t.alpha?t.alpha:i;if("array"===t.format)return[n,r,a,d];if("css"===t.format)return`rgb(${n} ${r} ${a}${1===d?"":` / ${Number((100*d).toFixed(2))}%`})`;return{red:n,green:r,blue:a,alpha:d}}(e);return String(t.red+","+t.green+","+t.blue+","+t.alpha)}return"100,100,100"}function ht(e,t){return getComputedStyle(e).getPropertyValue(t).trim()}function pt(e,t,i){if("Unknown"==i)return"100,100,100";if("onoff"===t.toLowerCase())return ct(ht(e,"On"==i?"--state-on-color":"--state-off-color"));if(["lighting","shutters"].includes(t.toLowerCase()))return(0==(o=parseInt(i))?"50,50,50":lt(50+2*o)+","+lt(50+1.5*o)+",0")+",1";{if(-20==parseFloat(i))return"138, 138, 138";const e=25,t=5,o=(parseFloat(i)-t)/(e-t);return 255+","+Math.floor(255*(1-o))+","+0+",1"}var o}function mt(e,t){return!t.display_only&&!!(t.admin_only&&e.user.is_admin||!t.admin_only)}function ut(e,t){return 0==e.slots.length||e.slots.length-1==t?"23:59":e.slots[t+1].Time}function ft(e,t,i){return-1==t?function(e,t){const i=[...Ye.slice(Ye.indexOf(e.day)),...Ye.slice(0,Ye.indexOf(e.day))].reverse();let o;for(o of i){const e=t.ScheduleData.filter((e=>e.day==o))[0];if(e&&e.slots.length>0)return e.slots[e.slots.length-1].Setpoint}return"Unknown"}(e,i):e.slots[t].Setpoint}function gt(e){const[t,i]=e.split(":");return 3600*+t+60*+i}const bt=e=>e.locale||{language:e.language,number_format:Fe.system},vt=e=>{class t extends e{connectedCallback(){super.connectedCallback(),this.__checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then((e=>e())):null!=e&&e()}this.__unsubs=void 0}}updated(e){super.updated(e),e.has("hass")&&this.__checkSubscribed()}hassSubscribe(){return[]}__checkSubscribed(){void 0===this.__unsubs&&this.isConnected&&void 0!==this.hass&&(this.__unsubs=this.hassSubscribe())}}return o([ae({attribute:!1})],t.prototype,"hass",void 0),t};let xt=class extends(vt(ie)){constructor(){super(...arguments),this.component_loaded=!1,this.connectionError=!1}async initialise(){return await this.isComponentLoaded()&&(this.component_loaded=!0,await this.loadData()),!0}async isComponentLoaded(){for(;!this.hass||!this.hass.config.components.includes("wiser");)await new Promise((e=>setTimeout(e,100)));return!0}hassSubscribe(){return this.initialise(),[this.hass.connection.subscribeMessage((e=>this.handleUpdate(e)),{type:"wiser_updated"})]}async handleUpdate(e){"wiser_updated"==e.event&&await this.loadData()}async loadData(){this.supported_schedule_types=await nt(this.hass,this.config.hub),this.schedule_list=await rt(this.hass,this.config.hub)}shouldUpdate(e){return!!e.has("schedule_list")||!!ze(this,e,!1)&&(this.loadData(),!0)}render(){return this.hass&&this.config?this.schedule_list&&this.schedule_list.length>0?N` + +
+
+ ${this.config.name} +
+
+
+
+ Select a schedule to view +
+ ${this.supported_schedule_types.map((e=>this.renderScheduleItemsByType(e)))} +
+ ${this.renderAddScheduleButton()} +
+ `:N` + +
+
+ ${this.config.name} +
+
+
+ ${this._showWarning("No schedules found")} +
+ +
+ `:N``}_showWarning(e){return N` ${e} `}renderScheduleItemsByType(e){const t=this.schedule_list.filter((t=>t.Type===e));return t.length>0?N` +
+
${e} +
+ ${t.map((e=>this.renderScheduleItem(e)))} +
+
+ `:N``}renderScheduleItem(e){var t;const i=He[e.Type];return N` +
this._scheduleClick(e.Type,e.Id)} + > + + ${e.Name} + ${(null===(t=this.config)||void 0===t?void 0:t.show_badges)?N`${e.Assignments}`:null} +
+ `}renderAddScheduleButton(){if(mt(this.hass,this.config))return N` +
+ Add Schedule + +
+ `}async _addScheduleClick(){const e=new CustomEvent("addScheduleClick");this.dispatchEvent(e)}_scheduleClick(e,t){const i=new CustomEvent("scheduleClick",{detail:{schedule_type:e,schedule_id:t}});this.dispatchEvent(i)}};xt.styles=l` + ${ot} + div.info-text { + margin-bottom: 10px; + } + span.button-label { + padding-left:5px; + text-transform: uppercase; + font-weight: 500; + } + div.wrapper { + white-space: nowrap; + transition: width 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), + margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + overflow: auto; + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: flex-start; + } + div.sub-heading { + display:block; + margin: 5px 0; + } + div.sub-heading fieldset { + border: 1px solid var(--divider-color, #e8e8e8); + border-radius: 5px; + font-size: small; + } + + div.schedule-item ha-icon { + float: left; + cursor: pointer; + + } + .schedule-item { + line-height: 32px; + cursor: pointer; + /*overflow: hidden;*/ + white-space: nowrap; + text-overflow: ellipsis; + margin: 5px 10px 5px 0px; + display: flex; + padding: 2px 10px 2px 5px; + color: var(--mdc-theme-primary, #6200ee); + background: var(--primary-color); + --mdc-theme-primary: var(--text-primary-color); + border-radius: 4px; + font-size: var(--material-button-font-size); + position: relative; + } + .badge { + font-size: small; + position: absolute; + top: -5px; + right: -8px; + background-color: var(--label-badge-red); + width: 20px; + height: 20px; + border-radius: 50%; + line-height: 20px; + text-align: center; + } + `,o([ae({attribute:!1})],xt.prototype,"config",void 0),o([ae({attribute:!1})],xt.prototype,"schedule_list",void 0),o([ae({attribute:!1})],xt.prototype,"component_loaded",void 0),xt=o([ne("wiser-schedule-list-card")],xt); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const _t={},yt=1,wt=3,Et=4,St=e=>(...t)=>({_$litDirective$:e,values:t}); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class Ct{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}} +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */class It{}var At="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";let Tt=class extends ie{async showDialog(e){this._params=e,await this.updateComplete}async closeDialog(){this._params&&this._params.cancel(),this._params=void 0}render(){return this._params?N` + +
+ + + + ${"Confirm Delete"} + + +
+
+ ${"Are you sure you wish to delete the schedule "+this._params.name+"?"} +
+ + ${"Delete"} + + + ${"Cancel"} + +
+ `:N``}confirmClick(){this._params.confirm()}cancelClick(){this._params.cancel()}static get styles(){return l` + div.wrapper { + color: var(--primary-text-color); + } + mwc-button.warning + { + --mdc-theme-primary: var(--error-color); + } + `}};o([ae({attribute:!1})],Tt.prototype,"hass",void 0),o([de()],Tt.prototype,"_params",void 0),Tt=o([ne("wiser-dialog-delete-confirm")],Tt);var kt,Ot=Object.freeze({__proto__:null,get DialogDeleteConfirm(){return Tt}});function $t(e,t){if(e.match(/^([0-9:]+)$/)){const t=e.split(":").map(Number);return 3600*t[0]+60*t[1]+(t[2]||0)}const i=Dt(e);if(i){const e=t.states["sun.sun"],o=$t(e.attributes.next_rising,t),n=$t(e.attributes.next_setting,t);let r="sunrise"==i.event?o:n;return r="+"==i.sign?r+$t(i.offset,t):r-$t(i.offset,t),r}const o=new Date(e);return 3600*o.getHours()+60*o.getMinutes()+o.getSeconds()}function Lt(e){const t=Math.floor(e/3600);e-=3600*t;const i=Math.floor(e/60);e-=60*i;const o=Math.round(e);return String(t%24).padStart(2,"0")+":"+String(i).padStart(2,"0")+":"+String(o).padStart(2,"0")}function Rt(e,t,i={wrapAround:!0}){let o=e>=0?Math.floor(e/3600):Math.ceil(e/3600),n=Math.floor((e-3600*o)/60);n%t!=0&&(n=Math.round(n/t)*t),n>=60?(o++,n-=60):n<0&&(o--,n+=60),i.wrapAround&&(o>=24?o-=24:o<0&&(o+=24));const r=3600*o+60*n;if(i.maxHours){if(r>3600*i.maxHours)return 3600*i.maxHours;if(r<3600*-i.maxHours)return 3600*-i.maxHours}return r}function Dt(e){const t=e.match(/^([a-z]+)([\+|-]{1})([0-9:]+)$/);return!!t&&{event:t[1],sign:t[2],offset:t[3]}}!function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(kt||(kt={}));const Ft=e=>{if(e.time_format===kt.language||e.time_format===kt.system){const t=e.time_format===kt.language?e.language:void 0,i=(new Date).toLocaleString(t);return i.includes("AM")||i.includes("PM")}return e.time_format===kt.am_pm};function Mt(e,t,i){return i===kt.am_pm||!i&&t.time_format===kt.am_pm?De(e,"h:mm A"):i===kt.twenty_four||!i&&t.time_format===kt.twenty_four?De(e,"shortTime"):(()=>{try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}return!1})()?e.toLocaleTimeString(t.language,{hour:"numeric",minute:"2-digit",hour12:Ft(t)}):Ft(t)?Mt(e,t,kt.am_pm):Mt(e,t,kt.twenty_four)}function Nt(e){const t=new Date,i=(e||"").match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})/);null!==i&&t.setFullYear(Number(i[1]),Number(i[2])-1,Number(i[3]));const o=(e||"").match(/([0-9]{2}):([0-9]{2})(:([0-9]{2}))?$/);return null!==o&&t.setHours(Number(o[1]),Number(o[2]),o.length>4?Number(o[4]):t.getSeconds()),t}var zt,Ht;!function(e){e.Sunrise="sunrise",e.Sunset="sunset"}(zt||(zt={})),function(e){e.WiserUpdated="wiser_updated"}(Ht||(Ht={}));let Bt=class extends ie{constructor(){super(...arguments),this.min=0,this.max=255,this.step=1,this.scaleFactor=1,this.unit="",this.optional=!1,this.disabled=!1,this._displayedValue=0}set value(e){e=isNaN(e)?this.min:this._roundedValue(e/this.scaleFactor),this._displayedValue=e}render(){return N` +
+
+ ${this.getCheckbox()} +
+
+ ${this.getSlider()} +
+
+ ${this._displayedValue}${this.unit} +
+
+ `}getSlider(){return this.disabled?N` + + `:N` + + `}getCheckbox(){return this.optional?N` + + `:N``}_toggleChecked(e){const t=e.target.checked;this.disabled=!t;const i=this.disabled?null:this._scaledValue(this._displayedValue);Ne(this,"value-changed",{value:i})}_updateValue(e){let t=Number(e.target.value);this._displayedValue=t,t=this._scaledValue(this._displayedValue),Ne(this,"value-changed",{value:t})}_roundedValue(e){return e=Math.round(e/this.step)*this.step,(e=parseFloat(e.toPrecision(12)))>this.max?e=this.max:e + ${this.renderTimes()} + + `}renderTimes(){if(this.hass){const e=parseFloat(getComputedStyle(this).getPropertyValue("width"))||460,t=[1,2,3,4,6,8,12],i=Ft(bt(this.hass))?55:40;let o=Math.ceil(24/(e/i));for(;!t.includes(o);)o++;const n=[0,...Array.from(Array(24/o-1).keys()).map((e=>(e+1)*o)),24];return n.map((e=>{const t=0==e||24==e,i=t?o/48*100:o/24*100;return N` +
+ ${t?"":Mt(Nt(Lt(3600*e)),bt(this.hass))} +
+ `}))}return N``}static get styles(){return l` + :host { + display: block; + max-width: 100%; + overflow: hidden; + } + div.outer { + width: 100%; + overflow-x: hidden; + overflow-y: hidden; + border-radius: 5px; + } + div.time-wrapper { + white-space: nowrap; + transition: width 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), + margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + overflow: auto; + } + div.time-wrapper div { + float: left; + display: flex; + position: relative; + height: 25px; + line-height: 25px; + font-size: 12px; + text-align: center; + align-content: center; + align-items: center; + justify-content: center; + } + div.time-wrapper div.time:before { + content: ' '; + background: var(--disabled-text-color); + position: absolute; + left: 0px; + top: 0px; + width: 1px; + height: 5px; + margin-left: 50%; + margin-top: 0px; + } + @keyframes fadeIn { + 99% { + visibility: hidden; + } + 100% { + visibility: visible; + } + } + + `}};o([ae({attribute:!1})],Pt.prototype,"hass",void 0),Pt=o([ne("wiser-time-bar")],Pt);let Vt=class extends ie{constructor(){super(),this.editMode=!1,this._activeSlot=-99,this._activeDay="",this._show_short_days=!1,this.schedule_type=Ue[0],this.activeMarker=0,this.isDragging=!1,this.currentTime=0,this.timer=0,this.timeout=0,this.zoomFactor=1,this.switchRef=new It,this.rangeMin=0,this.rangeMax=86400,this.stepSize=5,this.initialise()}async initialise(){return this.schedule&&(this.schedule_type=this.schedule.Type),!0}shouldUpdate(){return this.editMode||(this._activeSlot=-99,this._activeDay=""),!0}render(){const e=parseFloat(getComputedStyle(this).getPropertyValue("width"));return this._show_short_days=e<500,this.hass&&this.config&&this.suntimes&&this.schedule?N` +
+ ${Ye.map((e=>this.renderDay(this.schedule.ScheduleData.filter((t=>t.day==e))[0]?this.schedule.ScheduleData.filter((t=>t.day==e))[0]:{day:e,slots:[]})))} +
+
 
+ +
+
+ + ${this.editMode&&je.includes(this.schedule_type)?this.renderSpecialTimeButtons():null} + ${this.editMode?this.renderAddDeleteButtons():null} + ${this.renderSetPointControl()} + `:N``}renderDay(e){return N` +
+ ${this.computeDayLabel(e.day)} +
+
+ ${e.slots.length>0?e.slots.map(((t,i)=>this.renderSlot(t,i,e))):this.renderEmptySlot({Time:"23:59",Setpoint:"0",SpecialTime:""},-1,e,!0)} +
+
+
+ `}renderEmptySlot(e,t,i,o=!1){const n="00:00",r=e.Time,a=ft(i,t,this.schedule),d=parseFloat(getComputedStyle(this).getPropertyValue("width")),s=this.config.theme_colors?"rgba(var(--rgb-primary-color), 0.7)":"rgba("+pt(this,this.schedule_type,a)+")",l=(gt(r)-gt(n))/86400*100,c="Start - 00:00\nEnd - "+r+"\nSetting - "+this.computeSetpointLabel(a),h=l/100*d<35?"setpoint rotate":"setpoint";return N` + + `}renderSlot(e,t,i){const o=e.Time,n=ut(i,t),r=e.Setpoint,a=(gt(n)-gt(o))/86400*100,d=this.config.theme_colors?"rgba(var(--rgb-primary-color), 0.7)":"rgba("+pt(this,this.schedule_type,r)+")",s=a/100*parseFloat(getComputedStyle(this).getPropertyValue("width"))<35?"setpoint rotate":"setpoint",l="Start - "+(e.SpecialTime?e.SpecialTime+" ("+o+")":o)+"\nEnd - "+n+"\nSetting - "+this.computeSetpointLabel(r);return N` + ${0==t&&"00:00"!=o&&"0:00"!=o?this.renderEmptySlot(e,-1,i,!1):""} +
+ +
+ ${this.computeSetpointLabel(r)} +
+ ${this._activeSlot==t&&this._activeDay==i.day?N` +
+
+ + +
+
+ `:""} + ${this._activeSlot==t&&this._activeDay==i.day?this.renderTooltip(i,t):""} +
+ `}renderSpecialTimeButtons(){const e=this._activeDay?this.schedule.ScheduleData.filter((e=>e.day==this._activeDay))[0].slots[this._activeSlot]:null;return N` +
+
Set Special Time
+ + + Sunrise + + + + Sunset + +
+ `}renderAddDeleteButtons(){let e=0;return this.schedule.ScheduleData.filter((e=>e.day==this._activeDay)).length>0&&(e=this._activeDay?this.schedule.ScheduleData.filter((e=>e.day==this._activeDay))[0].slots.length:0),N` +
+
 
+ =24} + > + + ${it("wiser.actions.add_before")} + + =24} + > + + ${it("wiser.actions.add_after")} + + + + ${this.hass.localize("ui.common.delete")} + +
+ `}renderSetPointControl(){let e={};return this.editMode?(this.schedule.ScheduleData.filter((e=>e.day==this._activeDay)).length>0&&(e=this._activeDay?this.schedule.ScheduleData.filter((e=>e.day==this._activeDay))[0].slots:{}),"Heating"==this.schedule_type?N` +
+
 
+
Temperature
+ this._updateSetPoint("-20")} + > + =0?parseFloat(e[this._activeSlot].Setpoint):0} + unit="°C" + .optional=${!1} + .disabled=${this._activeSlot<0} + @value-changed=${e=>{this._updateSetPoint(Number(e.detail.value))}} + > + +
+ `:"OnOff"==this.schedule_type?N` +
+
 
+
State
+ this._updateSetPoint("Off")} + > + Off + + this._updateSetPoint("On")} + > + On + +
+ `:["Lighting","Shutters"].includes(this.schedule_type)?N` +
+
 
+
Level
+ =0?parseInt(e[this._activeSlot].Setpoint):0} + unit="%" + .optional=${!1} + .disabled=${this._activeSlot<0} + @value-changed=${e=>{this._updateSetPoint(Number(e.detail.value))}} + > + +
+ `:N``):N``}renderTooltip(e,t){const i=e.slots,o=Ge.includes(i[t].SpecialTime);return N` +
+
+ ${o?N` + + ${i[t].SpecialTime} + `:i[t].Time} +
+
+ `}_slotClick(e){const t=e.target.parentElement.parentElement;if(t.id){const e=t.id.split("|")[0],i=t.id.split("|")[1];i!=this._activeSlot||e!=this._activeDay?(this._activeSlot=parseInt(i),this._activeDay=e):(this._activeSlot=-99,this._activeDay="");const o=new CustomEvent("slotClicked",{detail:{day:this._activeDay,slot:this._activeSlot}});this.dispatchEvent(o)}}_updateSetPoint(e){this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots=Object.assign(this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots,{[this._activeSlot]:Object.assign(Object.assign({},this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots[this._activeSlot]),{Setpoint:e})});const t=new CustomEvent("scheduleChanged",{detail:{schedule:this.schedule}});this.dispatchEvent(t),this.requestUpdate()}getSunTime(e,t){return t==Ge[0]?this.suntimes.Sunrises[Ye.indexOf(e)].time:this.suntimes.Sunsets[Ye.indexOf(e)].time}convertScheduleDay(e){const t=e.slots.map((t=>Ge.includes(t.SpecialTime)?{Time:this.getSunTime(e.day,t.SpecialTime),Setpoint:t.Setpoint,SpecialTime:t.SpecialTime}:{Time:t.Time,Setpoint:t.Setpoint,SpecialTime:t.SpecialTime})).sort(((e,t)=>parseInt(e.Time.replace(":",""))JSON.stringify(e)))),o=Array.from(i).map((e=>JSON.parse(e)));return{day:e.day,slots:o}}_setSpecialTime(e){const t=e.target.id.replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()));this._activeDay&&this._activeSlot>=0&&(this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots[this._activeSlot].SpecialTime!=t&&(this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots=Object.assign(this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots,{[this._activeSlot]:Object.assign(Object.assign({},this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots[this._activeSlot]),{SpecialTime:t,Time:this.getSunTime(this._activeDay,t)})})),this.schedule.ScheduleData[Ye.indexOf(this._activeDay)]=this.convertScheduleDay(this.schedule.ScheduleData[Ye.indexOf(this._activeDay)]),this.schedule.ScheduleData[Ye.indexOf(this._activeDay)].slots.forEach(((e,i)=>{e.SpecialTime==t&&(this._activeSlot=i)})),this.requestUpdate())}_addSlot(e){const t="add-before"===e.target.id;if(this._activeSlot<-1)return;const i=Ye.indexOf(this._activeDay);if(this._activeSlot<0)this.schedule.ScheduleData[i].slots=[{Time:Mt(Nt(Lt($t("06:00",this.hass))),bt(this.hass)).padStart(5,"0"),Setpoint:Pe[this.schedule_type],SpecialTime:""}],this._activeSlot=0;else{const e=this.schedule.ScheduleData[i].slots[this._activeSlot];let o=$t(e.Time,this.hass),n=$t(ut(this.schedule.ScheduleData[i],this._activeSlot),this.hass);ne.day==this._activeDay))[0].slots;const o=e.target;let n=o;for(;!n.classList.contains("outer");)n=n.parentElement;const r=parseFloat(getComputedStyle(n).getPropertyValue("width")),a=86400/(this.rangeMax-this.rangeMin)*r,d=-(-this.rangeMin/(this.rangeMax-this.rangeMin)*r)/a*86400;let s=o;for(;!s.classList.contains("slot");)s=s.parentElement;const l=s,c=Number(l.getAttribute("slot")),h=c>0?$t(i[c-1].Time,this.hass)+60*this.stepSize:0,p=c{let o;o="undefined"!=typeof TouchEvent&&e instanceof TouchEvent?e.changedTouches[0].pageX:e.pageX;let n=o-m.left;n>r-1&&(n=r-1),n<-18&&(n=-18);let s=Math.round(n/a*86400+d);sp&&(s=p),this.currentTime=s;const l=Dt(ut(this.schedule.ScheduleData[t],c));let u;l?u=((e,t,i,o={})=>{if(Dt(e))return e;const n=$t(e,i),r=i.states["sun.sun"],a=$t(r.attributes.next_rising,i),d=$t(r.attributes.next_setting,i);t||(t=Math.abs(n-a)0?"+":"-"}${Lt(Math.abs(s))}`})(Lt(s),l.event,this.hass,{stepSize:this.stepSize}):(s=Math.round(s)>=86400?86400:Rt(s,this.stepSize),u=Mt(Nt(Lt(s)),bt(this.hass)).padStart(5,"0")),u!=ut(this.schedule.ScheduleData[t],c)&&(i=Object.assign(i,{[c]:Object.assign(Object.assign({},i[c]),{Time:u,SpecialTime:""})}),this.requestUpdate())};const f=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u),window.removeEventListener("mouseup",f),window.removeEventListener("touchend",f),window.removeEventListener("blur",f),u=()=>{},setTimeout((()=>{this.isDragging=!1}),100),o.blur();const e=new CustomEvent("scheduleChanged",{detail:{schedule:this.schedule}});this.dispatchEvent(e)};window.addEventListener("mouseup",f),window.addEventListener("touchend",f),window.addEventListener("blur",f),window.addEventListener("mousemove",u),window.addEventListener("touchmove",u)}_selectMarker(e,t=!0){e.stopImmediatePropagation();let i=e.target;for(;!i.classList.contains("slot");)i=i.parentElement;const o=Number(i.getAttribute("slot"));t&&this.activeMarker===o?this.activeMarker=null:this.activeMarker=t?o:null;const n=new CustomEvent("update",{detail:{entry:this._activeSlot,marker:this.activeMarker}});this.dispatchEvent(n),this._updateTooltips()}_updateTooltips(){var e;const t=parseFloat(getComputedStyle(this).getPropertyValue("width")),i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".tooltip"),o=e=>{const t=e.offsetWidth,i=e.parentElement.offsetLeft+e.offsetLeft-15;return e.parentElement.classList.contains("left")?[i+t/2,i+3*t/2]:e.parentElement.classList.contains("right")?[i-t/2,i+t/2]:[i,i+t]};null==i||i.forEach(((e,n)=>{const r=e.parentElement,a=r.classList.contains("visible"),d=Number(r.parentElement.getAttribute("slot"));if(d!=this._activeSlot&&d-1!=this._activeSlot)a&&r.classList.remove("visible");else{const s=e.parentElement.offsetLeft;if(s<0||s>t+15)a&&r.classList.remove("visible");else{a||r.classList.add("visible");const s=r.offsetWidth,l=r.classList.contains("center");let c=o(e)[0],h=t-o(e)[1];if(n>0&&d-1==this._activeSlot)c-=o(i[n-1])[1];else if(n+1s/2&&(r.classList.add("right"),r.classList.remove("center"),r.classList.remove("left")):(r.classList.add("center"),r.classList.remove("right"),r.classList.remove("left")):h<0?l&&c>s/2&&(r.classList.add("left"),r.classList.remove("center"),r.classList.remove("right")):(r.classList.add("center"),r.classList.remove("left"),r.classList.remove("right"))}}}))}computeDayLabel(e){return N` +
+ ${this._show_short_days?Xe[Ye.indexOf(e)]:e} +
+ `}computeSetpointLabel(e){return"Unknown"==e?e:"Heating"==this.schedule_type&&-20==e?"Off":e+Ve[this.schedule_type]}static get styles(){return l` + :host { + display: block; + max-width: 100%; + } + div.outer { + width: 100%; + overflow: visible; + } + div.wrapper, + div.time-wrapper { + white-space: nowrap; + transition: width 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), + margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + display: flex; + } + div.assignment-wrapper { + border-top: 1px solid var(--divider-color, #e8e8e8); + padding: 5px 0px; + min-height: 40px; + } + .special-times { + justify-content: flex-end; + line-height: 40px; + padding: 0 5px; + text-transform: uppercase; + font-size: small; + } + .section-header { + color: var(--material-body-text-color, #000); + text-transform: uppercase; + font-weight: 500; + font-size: var(--material-small-font-size); + padding: 5px 10px; + } + .slot { + float: left; + background: rgba(var(--rgb-primary-color), 0.7); + height: 60px; + box-sizing: border-box; + transition: background 0.1s cubic-bezier(0.17, 0.67, 0.83, 0.67); + position: relative; + height: 40px; + line-height: 40px; + font-size: 10px; + text-align: center; + } + .slot:first-child { + border-radius: 5px 0 0 5px; + } + .slot:last-child { + border-radius: 0 5px 5px 0; + } + .slot:only-child { + border-radius: 5px; + } + .slot.previous { + cursor: default; + } + .slot.selected { + background: rgba(52,143,255,1) + } + .setpoint { + z-index: 3; + position: relative; + text-align: center; + } + .slotoverlay { + position: absolute; + display: hidden; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + /*background-color: rgba(0,0,0,0.5);*/ + z-index: 2; + } + div.slot.selectable { + cursor: pointer; + } + + .previous { + display: block; + background: repeating-linear-gradient(135deg, rgba(0,0,0,0), rgba(0,0,0,0) 5px, rgba(255,255,255,0.2) 5px, rgba(255,255,255,0.2) 10px); + border-radius: 5px 0 0 5px; + } + .previous.selected { + border: 2px solid var(--primary-color); + } + .previous.selected.theme-colors { + border: 2px solid var(--warning-color) + } + .wrapper.selectable .slot:hover { + background: rgba(var(--rgb-primary-color), 0.85); + } + .slot:not(:first-child) { + border-left: 1px solid var(--card-background-color); + } + .slot.active { + background: rgba(var(--rgb-accent-color), 0.7); + } + .slot.noborder { + border: none; + } + .wrapper.selectable .slot.active:hover { + background: rgba(var(--rgb-accent-color), 0.85); + } + .wrapper .day.short { + max-width: 50px; + } + .wrapper .day { + line-height: 42px; + float: left; + width: 20%; + max-width: 100px; + } + .wrapper .schedule { + position: relative; + width: 100%; + height: 40px; + border-radius: 5px; + overflow: auto; + margin-bottom: 2px; + display: flex; + } + .setpoint.rotate { + z-index: 3; + transform: rotate(-90deg); + position: absolute; + top: 20px; + height: 0px !important; + width: 100%; + overflow: visible !important; + } + div.time-wrapper div { + float: left; + display: flex; + position: relative; + height: 25px; + line-height: 25px; + font-size: 12px; + text-align: center; + align-content: center; + align-items: center; + justify-content: center; + } + div.time-wrapper div.time:before { + content: ' '; + background: var(--disabled-text-color); + position: absolute; + left: 0px; + top: 0px; + width: 1px; + height: 5px; + margin-left: 50%; + margin-top: 0px; + } + .slot span { + font-size: 10px; + color: var(--text-primary-color); + height: 100%; + display: flex; + align-content: center; + align-items: center; + justify-content: center; + transition: margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + word-break: nowrap; + white-space: normal; + overflow: hidden; + line-height: 1em; + } + div.handle { + display: flex; + height: 100%; + width: 36px; + margin-left: -19px; + margin-bottom: -60px; + align-content: center; + align-items: center; + justify-content: center; + } + div.button-holder { + background: var(--card-background-color); + border-radius: 50%; + width: 24px; + height: 24px; + display: flex; + visibility: hidden; + animation: 0.2s fadeIn; + animation-fill-mode: forwards; + z-index: 5; + } + div.tooltip-container { + position: absolute; + margin-top: -12px; + margin-left: -22px; + width: 40px; + height: 0px; + text-align: center; + line-height: 35px; + z-index: 3; + top: -26px; + } + + div.tooltip-container.visible { + display: block; + } + div.tooltip-container.left { + margin-left: -80px; + text-align: right; + } + div.tooltip-container.right { + margin-left: 0px; + text-align: left; + } + div.tooltip { + display: inline-flex; + margin: 0px auto; + border-radius: 5px; + color: var(--text-primary-color); + font-size: 1em; + padding: 0px 5px; + text-align: center; + line-height: 20px; + z-index: 5; + transition: all 0.1s ease-in; + transform-origin: center bottom; + --tooltip-color: var(--primary-color); + background: var(--primary-color); + } + div.tooltip.active { + --tooltip-color: rgba(var(--rgb-accent-color), 0.7); + } + div.tooltip-container.left div.tooltip { + transform-origin: right bottom; + } + div.tooltip-container.right div.tooltip { + transform-origin: left bottom; + } + div.tooltip-container.center div.tooltip:before { + content: ' '; + width: 0px; + height: 0px; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-top: 10px solid var(--primary-color); + position: absolute; + margin-top: 25px; + margin-left: calc(50% - 6px); + top: 0px; + left: 0px; + } + div.tooltip-container.left div.tooltip:before { + content: ' '; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + border-right: 8px solid var(--tooltip-color); + opacity: 1; + position: absolute; + margin-top: 15px; + margin-left: calc(100% - 8px); + left: 0px; + top: 0px; + width: 0px; + height: 0px; + } + div.tooltip-container.right div.tooltip:before { + content: ' '; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + border-left: 8px solid var(--tooltip-color); + opacity: 1; + position: absolute; + margin-top: 15px; + margin-left: 0px; + left: 0px; + top: 0px; + width: 0px; + height: 0px; + } + div.tooltip ha-icon { + --mdc-icon-size: 18px; + } + + mwc-button.state-button { + width: 20%; + padding: 0px 18px; + margin: 0 2px; + max-width: 100px; + } + mwc-button#state-on { + background-color: var(--state-on-color); + } + mwc-button#state-off { + background-color: var(--state-off-color); + } + + mwc-button.warning + { + --mdc-theme-primary: var(--error-color); + } + mwc-button.warning .mdc-button .mdc-button__label { + color: var(--primary-text-color) + } + mwc-button.right { + float: right; + } + ha-icon-button { + --mdc-icon-button-size: 36px; + margin-top: -6px; + margin-left: -6px; + } + @keyframes fadeIn { + 99% { + visibility: hidden; + } + 100% { + visibility: visible; + } + } + + mwc-button ha-icon { + margin-right: 2px; + } + mwc-button.active { + background: var(--primary-color); + --mdc-theme-primary: var(--text-primary-color); + border-radius: 4px; + } + ha-icon-button.set-off-button { + margin-left: 0px; + } + .sub-heading { + padding-bottom: 10px; + font-weight: 500; + } + `}};o([ae({attribute:!1})],Vt.prototype,"hass",void 0),o([ae({attribute:!1})],Vt.prototype,"config",void 0),o([ae({attribute:!1})],Vt.prototype,"schedule",void 0),o([ae({attribute:!1})],Vt.prototype,"suntimes",void 0),o([ae({attribute:!1})],Vt.prototype,"editMode",void 0),o([de()],Vt.prototype,"_activeSlot",void 0),o([de()],Vt.prototype,"_activeDay",void 0),o([de()],Vt.prototype,"_show_short_days",void 0),o([de()],Vt.prototype,"rangeMin",void 0),o([de()],Vt.prototype,"rangeMax",void 0),o([de()],Vt.prototype,"stepSize",void 0),o([le({passive:!0})],Vt.prototype,"_handleTouchStart",null),Vt=o([ne("wiser-schedule-slot-editor")],Vt);let Ut=class extends ie{async showDialog(e){this._params=e,await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?N` + +
+ + + + ${this._params.title||this.hass.localize("state_badge.default.error")} + + +
+
+ ${this._params.error||""} +
+ + ${this.hass.localize("ui.dialogs.generic.ok")} + +
+ `:N``}static get styles(){return l` + div.wrapper { + color: var(--primary-text-color); + } + `}};o([ae({attribute:!1})],Ut.prototype,"hass",void 0),o([de()],Ut.prototype,"_params",void 0),Ut=o([ne("wiser-dialog-error")],Ut);var jt=Object.freeze({__proto__:null,get DialogError(){return Ut}});let Yt=class extends(vt(ie)){constructor(){var e;super(...arguments),this.schedule_id=0,this.use_heat_colors=!0,this.rooms=[],this.entities=[],this._activeSlot=null,this._activeDay=null,this.editMode=!1,this._current_user=null===(e=this.hass)||void 0===e?void 0:e.user,this._assigning_in_progress=0,this._save_in_progress=!1,this.stepSize=5}async initialise(){return await this._isComponentLoaded()&&(this.component_loaded=!0),!0}hassSubscribe(){return this.initialise(),[this.hass.connection.subscribeMessage((e=>this.handleUpdate(e)),{type:"wiser_updated"})]}async handleUpdate(e){"wiser_updated"==e.event&&await this.loadData()}async _isComponentLoaded(){for(;!this.hass&&!this.config&&!this.hass.config.components.includes("wiser");)await new Promise((e=>setTimeout(e,100)));return await this.loadData(),!0}getSunTime(e,t){return t==Ge[0]?this.suntimes.Sunrises[Ye.indexOf(e)].time:this.suntimes.Sunsets[Ye.indexOf(e)].time}async convertLoadedSchedule(e){const t=e.ScheduleData.map((e=>this.convertLoadedScheduleDay(e)));return e.ScheduleData=t,e}convertLoadedScheduleDay(e){const t=e.slots.map((t=>Ge.includes(t.Time)?{Time:this.getSunTime(e.day,t.Time),Setpoint:t.Setpoint,SpecialTime:t.Time}:{Time:t.Time,Setpoint:t.Setpoint,SpecialTime:""})).sort(((e,t)=>parseInt(e.Time.replace(":",""))JSON.stringify(e)))),o=Array.from(i).map((e=>JSON.parse(e)));return{day:e.day,slots:o}}async convertScheduleForSaving(e){const t=e.ScheduleData.map((e=>this.convertScheduleDayForSaving(e)));return e.ScheduleData=t,e}convertScheduleDayForSaving(e){const t=e.slots.map((e=>Ge.includes(e.SpecialTime)?{Time:e.SpecialTime,Setpoint:e.Setpoint,SpecialTime:e.SpecialTime}:{Time:e.Time,Setpoint:e.Setpoint,SpecialTime:""})).sort(((e,t)=>e.Time.replace(":","")JSON.stringify(e)))),o=Array.from(i).map((e=>JSON.parse(e)));return{day:e.day,slots:o}}async loadData(){if(this.schedule_type&&this.schedule_id&&!this.editMode){const i=await at(this.hass,this.config.hub,this.schedule_type,this.schedule_id);this.suntimes=await(e=this.hass,t=this.config.hub,e.callWS({type:"wiser/suntimes",hub:t})),this.schedule=await this.convertLoadedSchedule(i),this.entities=await this.get_entity_list(this.hass,this.config.hub)}var e,t}async get_entity_list(e,t){return"heating"==this.schedule.Type.toLowerCase()?await((e,t)=>e.callWS({type:"wiser/rooms",hub:t}))(e,t):await((e,t,i)=>e.callWS({type:"wiser/devices",device_type:i,hub:t}))(e,t,this.schedule.SubType)}shouldUpdate(e){return e.has("schedule_id")||e.has("editMode")?(this.loadData(),!0):!!(e.has("schedule")||e.has("entities")||e.has("editMode")||e.has("_assigning_in_progress")||e.has("_save_in_progress"))}render(){return this.hass&&this.config&&this.component_loaded?this.schedule&&this.entities&&this.suntimes?N` + +
+
+ ${this.config.name} +
+
+
+
+ ${it("wiser.headings.schedule_type")}: ${this.schedule.SubType} +
+
+ ${it("wiser.headings.schedule_id")}: ${this.schedule.Id} +
+
+ ${it("wiser.headings.schedule_name")}: ${this.schedule.Name} +
+
+ ${this.editMode?"Edit Mode":null} +
+
+
+
+ +
+
+
+ ${this.renderScheduleAssignment(this.entities,this.schedule.Assignments)} + ${this.renderScheduleActionButtonSection()} +
+ ${this.renderCardActions()} +
+ `:N` + +
+
+ ${this.config.name} +
+
+
+
+
`:N``}renderScheduleAssignment(e,t){if(this.schedule&&!this.editMode)return mt(this.hass,this.config)?N` +
+
${it("wiser.headings.schedule_assignment")}
+ ${e.length>0?e.map((e=>this.renderEntityButton(e,t.map((function(e){return e.name})).includes(e.Name)))):N`
(No Assignable Devices)
`} +
+ `:N` +
+
${it("wiser.headings.schedule_assignment")}
+ ${t.length>0?e.filter((e=>t.map((function(e){return e.name})).includes(e.Name))).map((e=>this.renderEntityLabel(e))):N`${it("wiser.headings.not_assigned")}`} +
+ `}renderEntityButton(e,t){return N` + + ${this._assigning_in_progress==e.Id?N``:null} + ${e.Name} + + `}renderScheduleActionButtonSection(){if(this.schedule&&!this.editMode&&mt(this.hass,this.config))return N` +
+
${it("wiser.headings.schedule_actions")}
+
+ ${this.renderScheduleRenameButton()} + ${this.renderEditScheduleButton()} + ${this.renderCopyScheduleButton()} + ${this.renderDeleteScheduleButton()} +
+
+ `}renderEntityLabel(e){return N` + + ${e.Name} + + `}renderCardActions(){if(!this.config.selected_schedule||this.editMode)return N` +
+
+ ${this.editMode?null:this.renderBackButton()} + ${this.editMode?this.renderCancelButton():null} + ${this.editMode?this.renderSaveScheduleButton():null} +
+
+ `}renderBackButton(){return N` + Back + + `}renderCancelButton(){return N` + Cancel + + `}renderScheduleRenameButton(){return N` + + + `}renderDeleteScheduleButton(){return N` + + + `}renderCopyScheduleButton(){return N` + + + `}renderEditScheduleButton(){return N` + + + `}renderFilesScheduleButton(){return N` + + + `}renderSaveScheduleButton(){if(mt(this.hass,this.config))return N` + + ${this._save_in_progress?N``:"Save"} + + `}async entityAssignmentClick(e){const t=e.target;this._assigning_in_progress=parseInt(t.id),mt(this.hass,this.config)&&await((e,t,i,o,n,r=!1)=>e.callWS({type:"wiser/schedule/assign",hub:t,schedule_type:i,schedule_id:o,entity_id:n,remove:r}))(this.hass,this.config.hub,this.schedule_type,this.schedule_id,t.id,t.classList.contains("active")),this._assigning_in_progress=0}backClick(){const e=new CustomEvent("backClick");this.dispatchEvent(e)}editClick(){this._tempSchedule=this.schedule,this.editMode=!this.editMode}copyClick(){const e=new CustomEvent("copyClick");this.dispatchEvent(e)}filesClick(){const e=new CustomEvent("filesClick");this.dispatchEvent(e)}async renameScheduleClick(){const e=new CustomEvent("renameClick");this.dispatchEvent(e)}async deleteClick(e){const t=e.target;if(await new Promise((e=>{Ne(t,"show-dialog",{dialogTag:"wiser-dialog-delete-confirm",dialogImport:()=>Promise.resolve().then((function(){return Ot})),dialogParams:{cancel:()=>{e(!1)},confirm:()=>{e(!0)},name:this.schedule.Name}})}))){this.schedule_id=0,await(i=this.hass,o=this.config.hub,n=this.schedule.Type,r=this.schedule.Id,i.callWS({type:"wiser/schedule/delete",hub:o,schedule_type:n,schedule_id:r}));const e=new CustomEvent("scheduleDeleted");this.dispatchEvent(e)}var i,o,n,r}cancelClick(){this.editMode=!1}validateSchedule(e){return e.ScheduleData.map((e=>e.slots)).map((e=>e.length>0)).includes(!0)}async saveClick(){if(this._save_in_progress=!0,this.validateSchedule(this._tempSchedule))je.includes(this.schedule_type)&&(this._tempSchedule=await this.convertScheduleForSaving(this._tempSchedule)),await(e=this.hass,t=this.config.hub,i=this.schedule_type,o=this.schedule_id,n=this._tempSchedule,e.callWS({type:"wiser/schedule/save",hub:t,schedule_type:i,schedule_id:o,schedule:n})),this.editMode=!1;else{const e=N`The schedule you are trying to save has no time slots.`;Ne(this,"show-dialog",{dialogTag:"wiser-dialog-error",dialogImport:()=>Promise.resolve().then((function(){return jt})),dialogParams:{title:"Error Saving Schedule",error:e}})}var e,t,i,o,n;this._save_in_progress=!1}scheduleChanged(e){this._tempSchedule=e.detail.schedule,this.render()}static get styles(){return l` + :host { + display: block; + max-width: 100%; + } + div.outer { + width: 100%; + overflow-x: hidden; + overflow-y: hidden; + border-radius: 5px; + } + div.wrapper, + div.time-wrapper { + white-space: nowrap; + transition: width 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), + margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + } + div.assignment-wrapper, div.actions-wrapper { + border-top: 1px solid var(--divider-color, #e8e8e8); + padding: 5px 0px; + min-height: 40px; + } + div.mode { + position: absolute; + right: 10px; + top: 64px; + background: var(--primary-color); + padding: 2px 10px; + border-radius: 20px; + font-size: smaller; + color: var(--app-header-text-color); + } + div.action-buttons { + display: flow-root; + } + span.assignment-label { + color: var(--primary-color); + text-transform: uppercase; + font-weight: 500; + font-size: var(--material-small-font-size); + padding: 5px 10px; + } + .slot { + float: left; + background: rgba(var(--rgb-primary-color), 0.7); + height: 60px; + cursor: pointer; + box-sizing: border-box; + transition: background 0.1s cubic-bezier(0.17, 0.67, 0.83, 0.67); + position: relative; + height: 40px; + line-height: 40px; + font-size: 10px; + text-align: center; + overflow: hidden; + } + .slot.previous { + cursor: default; + } + .slot.selected { + background: rgba(52,143,255,1) + } + .setpoint { + z-index: 3; + position: relative; + text-align: center; + } + .slotoverlay { + position: absolute; + display: hidden; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + /*background-color: rgba(0,0,0,0.5);*/ + z-index: 2; + cursor: pointer; + } + .previous { + display: block; + background: repeating-linear-gradient(135deg, rgba(0,0,0,0), rgba(0,0,0,0) 5px, rgba(255,255,255,0.2) 5px, rgba(255,255,255,0.2) 10px); + } + .wrapper.selectable .slot:hover { + background: rgba(var(--rgb-primary-color), 0.85); + } + .slot:not(:first-child) { + border-left: 1px solid var(--card-background-color); + } + .slot:not(:last-child) { + border-right: 1px solid var(--card-background-color); + } + .slot.active { + background: rgba(var(--rgb-accent-color), 0.7); + } + .slot.noborder { + border: none; + } + .wrapper.selectable .slot.active:hover { + background: rgba(var(--rgb-accent-color), 0.85); + } + .wrapper .days .day { + line-height: 42px; + float: left; + width: 100%; + } + .wrapper .schedules { + position: relative; + padding-top: 30px; + width: 100%; + } + .wrapper .schedules .slots { + height: 40px; + border-radius: 5px; + overflow: auto; + margin-bottom: 2px; + display: flex; + } + .slots-wrapper { + padding-bottom: 20px; + } + .setpoint.rotate { + z-index: 3; + transform: rotate(-90deg); + position: absolute; + top: 20px; + height: 0px !important; + width: 100%; + overflow: visible !important; + } + div.schedule-action-wrapper { + display: flex; + justify-content: center; + } + div.time-wrapper div { + float: left; + display: flex; + position: relative; + height: 25px; + line-height: 25px; + font-size: 12px; + text-align: center; + align-content: center; + align-items: center; + justify-content: center; + } + div.time-wrapper div.time:before { + content: ' '; + background: var(--disabled-text-color); + position: absolute; + left: 0px; + top: 0px; + width: 1px; + height: 5px; + margin-left: 50%; + margin-top: 0px; + } + .slot span { + font-size: 10px; + color: var(--text-primary-color); + height: 100%; + display: flex; + align-content: center; + align-items: center; + justify-content: center; + transition: margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + word-break: nowrap; + white-space: normal; + overflow: hidden; + line-height: 1em; + } + div.handle { + display: flex; + height: 100%; + width: 36px; + margin-left: -19px; + margin-bottom: -60px; + align-content: center; + align-items: center; + justify-content: center; + } + div.button-holder { + background: var(--card-background-color); + border-radius: 50%; + width: 24px; + height: 24px; + display: flex; + visibility: hidden; + animation: 0.2s fadeIn; + animation-fill-mode: forwards; + } + mwc-button.warning + { + --mdc-theme-primary: #fff; + background-color: var(--error-color); + border-radius: var(--mdc-shape-small, 4px) + } + mwc-button.large { + width: 22.5%; + margin: 2px; + max-width: 200px; + } + mwc-button.right { + float: right; + } + mwc-button.warning .mdc-button .mdc-button__label { + color: var(--primary-text-color) + } + ha-icon-button { + --mdc-icon-button-size: 36px; + margin-top: -6px; + margin-left: -6px; + } + @keyframes fadeIn { + 99% { + visibility: hidden; + } + 100% { + visibility: visible; + } + } + + mwc-button ha-icon { + margin-right: 11px; + } + mwc-button.active { + background: var(--primary-color); + --mdc-theme-primary: var(--text-primary-color); + border-radius: 4px; + } + mwc-button { + margin: 2px 0; + } + .card-header ha-icon-button { + position: absolute; + right: 6px; + top: 6px; + } + .sub-heading { + padding-bottom: 10px; + font-weight: 500; + } + span.waiting { + position: absolute; + height: 28px; + width: 100%; + margin: 4px; + } + div.schedule-info { + margin: 3px 0; + } + `}};o([ae({attribute:!1})],Yt.prototype,"config",void 0),o([ae({attribute:!1})],Yt.prototype,"schedule_id",void 0),o([ae({attribute:!1})],Yt.prototype,"schedule_type",void 0),o([ae({attribute:!1})],Yt.prototype,"use_heat_colors",void 0),o([de()],Yt.prototype,"schedule",void 0),o([de()],Yt.prototype,"rooms",void 0),o([de()],Yt.prototype,"entities",void 0),o([de()],Yt.prototype,"suntimes",void 0),o([de()],Yt.prototype,"component_loaded",void 0),o([de()],Yt.prototype,"_activeSlot",void 0),o([de()],Yt.prototype,"_activeDay",void 0),o([de()],Yt.prototype,"editMode",void 0),o([de()],Yt.prototype,"_current_user",void 0),o([de()],Yt.prototype,"_assigning_in_progress",void 0),o([de()],Yt.prototype,"_save_in_progress",void 0),Yt=o([ne("wiser-schedule-edit-card")],Yt);let Xt=class extends ie{constructor(){super(),this.component_loaded=!1,this._schedule_types=[],this._schedule_info={Name:"",Type:"Heating"},this.initialise()}async initialise(){return await this.isComponentLoaded()&&(this.component_loaded=!0,await this.loadData()),!0}async isComponentLoaded(){for(;!this.hass||!this.hass.config.components.includes("wiser");)await new Promise((e=>setTimeout(e,100)));return!0}async loadData(){this._schedule_types=await nt(this.hass,this.config.hub)}render(){return this.hass&&this.config?N` + +
+
+ ${this.config.name} +
+
+
+
+ Add Schedule +
+
+ ${"Select the schedule type and enter a name for the schedule to create"} +
+
+ ${this._schedule_types.map(((e,t)=>this.renderScheduleTypeButtons(e,t)))} +
+ + +
+
+ + ${"Ok"} + + + ${"Cancel"} + +
+
+ `:N``}renderScheduleTypeButtons(e,t){return N` + + ${e} + + `}async confirmClick(){await this.createSchedule()}async createSchedule(){var e,t,i,o;await(e=this.hass,t=this.config.hub,i=this._schedule_info.Type,o=this._schedule_info.Name,e.callWS({type:"wiser/schedule/create",hub:t,schedule_type:i,name:o}));const n=new CustomEvent("scheduleAdded");this.dispatchEvent(n)}cancelClick(){const e=new CustomEvent("backClick");this.dispatchEvent(e)}_valueChanged(e){const t=e.target;t.configValue&&(this._schedule_info=Object.assign(Object.assign({},this._schedule_info),{[t.configValue]:void 0!==t.checked?t.checked:t.value}))}static get styles(){return l` + div.wrapper { + white-space: nowrap; + transition: width 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), + margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + overflow: auto; + } + div.wrapper { + color: var(--primary-text-color); + padding: 5px 0; + } + .schedule-type-select { + margin: 20px 0 0 0; + } + .schedule-name { + margin: 20px 0 0 0; + width: 100%; + } + ha-icon-button { + --mdc-icon-button-size: 36px; + margin-top: -6px; + margin-left: -6px; + } + .card-header ha-icon-button { + position: absolute; + right: 6px; + top: 6px; + } + mwc-button.active { + background: var(--primary-color); + --mdc-theme-primary: var(--text-primary-color); + border-radius: 4px; + } + `}};o([ae({attribute:!1})],Xt.prototype,"hass",void 0),o([ae({attribute:!1})],Xt.prototype,"config",void 0),o([ae({attribute:!1})],Xt.prototype,"component_loaded",void 0),o([de()],Xt.prototype,"_schedule_types",void 0),o([de()],Xt.prototype,"_schedule_info",void 0),Xt=o([ne("wiser-schedule-add-card")],Xt);let Gt=class extends ie{constructor(){super(),this.schedule_id=0,this.component_loaded=!1,this._copy_in_progress=0,this._schedule_list=[],this.initialise()}async initialise(){return await this.isComponentLoaded()&&(this.component_loaded=!0,await this.loadData()),!0}async isComponentLoaded(){for(;!this.hass||!this.hass.config.components.includes("wiser");)await new Promise((e=>setTimeout(e,100)));return!0}async loadData(){this.schedule=await at(this.hass,this.config.hub,this.schedule_type,this.schedule_id),this._schedule_list=await rt(this.hass,this.config.hub,this.schedule_type)}render(){return this.hass&&this.config&&this.schedule?N` + +
+
+ ${this.config.name} +
+
+
+
+ Copy Schedule +
+
+ Schedule Type: ${this.schedule.Type} +
+
+ Schedule Id: ${this.schedule.Id} +
+
+ Schedule Name: ${this.schedule.Name} +
+
+ ${"Select the schedule below to copy to"} +
+
+ ${this._schedule_list.filter((e=>{var t;return e.Id!=(null===(t=this.schedule)||void 0===t?void 0:t.Id)})).map((e=>this.renderScheduleButtons(e)))} +
+
+
+ + ${"Cancel"} + +
+
+ `:N``}renderScheduleButtons(e){return N` + + ${this._copy_in_progress==e.Id?N``:null} + ${e.Name} + + `}cancelClick(){const e=new CustomEvent("backClick",{detail:Be.ScheduleEdit});this.dispatchEvent(e)}async _copySchedule(e){const t=e.target;if(t.id){this._copy_in_progress=parseInt(t.id),await(i=this.hass,o=this.config.hub,n=this.schedule_type,r=this.schedule_id,a=parseInt(t.id),i.callWS({type:"wiser/schedule/copy",hub:o,schedule_type:n,schedule_id:r,to_schedule_id:a})),this._copy_in_progress=0;const e=new CustomEvent("scheduleCopied");this.dispatchEvent(e)}var i,o,n,r,a}static get styles(){return l` + div.wrapper { + white-space: nowrap; + transition: width 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), + margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + overflow: auto; + } + div.wrapper { + color: var(--primary-text-color); + padding: 5px 0; + } + .schedule-type-select { + margin: 20px 0 0 0; + } + .schedule-name { + margin: 20px 0 0 0; + width: 100%; + } + ha-icon-button { + --mdc-icon-button-size: 36px; + margin-top: -6px; + margin-left: -6px; + } + .card-header ha-icon-button { + position: absolute; + right: 6px; + top: 6px; + } + mwc-button.active { + background: var(--primary-color); + --mdc-theme-primary: var(--text-primary-color); + border-radius: 4px; + } + .sub-heading { + padding-bottom: 10px; + font-weight: 500; + } + span.waiting { + position: absolute; + height: 28px; + width: 100%; + margin: 4px; + } + div.schedule-info { + margin: 3px 0; + } + `}};o([ae({attribute:!1})],Gt.prototype,"hass",void 0),o([ae({attribute:!1})],Gt.prototype,"config",void 0),o([ae({attribute:!1})],Gt.prototype,"schedule_id",void 0),o([ae({attribute:!1})],Gt.prototype,"schedule_type",void 0),o([de()],Gt.prototype,"schedule",void 0),o([de()],Gt.prototype,"component_loaded",void 0),o([de()],Gt.prototype,"_copy_in_progress",void 0),o([de()],Gt.prototype,"_schedule_list",void 0),Gt=o([ne("wiser-schedule-copy-card")],Gt);let Wt=class extends ie{constructor(){super(),this.component_loaded=!1,this._newScheduleName="",this._rename_in_progress=!1,this.initialise()}async initialise(){return await this.isComponentLoaded()&&(this.component_loaded=!0,await this.loadData()),!0}async isComponentLoaded(){for(;!this.hass||!this.hass.config.components.includes("wiser");)await new Promise((e=>setTimeout(e,100)));return!0}async loadData(){this._schedule=await at(this.hass,this.config.hub,this.schedule_type,this.schedule_id)}render(){return this.hass&&this.config?N` + +
+
+ ${this.config.name} +
+
+
+
+ Rename Schedule +
+
+ ${"Enter the new schedule name"} +
+ + +
+
+ + ${this._rename_in_progress?N``:"OK"} + + + ${"Cancel"} + +
+
+ `:N``}async confirmClick(){await this.renameSchedule()}async renameSchedule(){var e,t,i,o,n;this._rename_in_progress=!0,await(e=this.hass,t=this.config.hub,i=this.schedule_type,o=this.schedule_id,n=this._newScheduleName,e.callWS({type:"wiser/schedule/rename",hub:t,schedule_type:i,schedule_id:o,schedule_name:n}));const r=new CustomEvent("scheduleRenamed");this.dispatchEvent(r),this._rename_in_progress=!1}cancelClick(){const e=new CustomEvent("backClick",{detail:Be.ScheduleEdit});this.dispatchEvent(e)}_valueChanged(e){const t=e.target;t.configValue&&(this._newScheduleName=t.value)}static get styles(){return l` + div.wrapper { + white-space: nowrap; + transition: width 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), + margin 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + overflow: auto; + } + div.wrapper { + color: var(--primary-text-color); + padding: 5px 0; + } + .schedule-type-select { + margin: 20px 0 0 0; + } + .schedule-name { + margin: 20px 0 0 0; + width: 100%; + } + ha-icon-button { + --mdc-icon-button-size: 36px; + margin-top: -6px; + margin-left: -6px; + } + .card-header ha-icon-button { + position: absolute; + right: 6px; + top: 6px; + } + mwc-button.active { + background: var(--primary-color); + --mdc-theme-primary: var(--text-primary-color); + border-radius: 4px; + } + `}};o([ae({attribute:!1})],Wt.prototype,"hass",void 0),o([ae({attribute:!1})],Wt.prototype,"config",void 0),o([ae({attribute:!1})],Wt.prototype,"component_loaded",void 0),o([ae({attribute:!1})],Wt.prototype,"schedule_type",void 0),o([ae({attribute:!1})],Wt.prototype,"schedule_id",void 0),o([de()],Wt.prototype,"_newScheduleName",void 0),o([de()],Wt.prototype,"_schedule",void 0),o([de()],Wt.prototype,"_rename_in_progress",void 0),Wt=o([ne("wiser-schedule-rename-card")],Wt); +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var qt=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),Kt={ROOT:"mdc-form-field"},Zt={LABEL_SELECTOR:".mdc-form-field > label"},Qt=function(e){function o(t){var n=e.call(this,i(i({},o.defaultAdapter),t))||this;return n.click=function(){n.handleClick()},n}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return Kt},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return Zt},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),o.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},o.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},o.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){e.adapter.deactivateInputRipple()}))},o}(qt); +/** + * @license + * Copyright 2017 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const Jt=e=>e.nodeType===Node.ELEMENT_NODE;function ei(e){return{addClass:t=>{e.classList.add(t)},removeClass:t=>{e.classList.remove(t)},hasClass:t=>e.classList.contains(t)}}const ti=()=>{},ii={get passive(){return!1}};document.addEventListener("x",ti,ii),document.removeEventListener("x",ti);const oi=(e=window.document)=>{let t=e.activeElement;const i=[];if(!t)return i;for(;t&&(i.push(t),t.shadowRoot);)t=t.shadowRoot.activeElement;return i},ni=e=>{const t=oi();if(!t.length)return!1;const i=t[t.length-1],o=new Event("check-if-focused",{bubbles:!0,composed:!0});let n=[];const r=e=>{n=e.composedPath()};return document.body.addEventListener("check-if-focused",r),i.dispatchEvent(o),document.body.removeEventListener("check-if-focused",r),-1!==n.indexOf(e)}; +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class ri extends ie{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}} +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */var ai,di;const si=null!==(di=null===(ai=window.ShadyDOM)||void 0===ai?void 0:ai.inUse)&&void 0!==di&&di;class li extends ri{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=e=>{this.disabled||this.setFormData(e.formData)}}findFormElement(){if(!this.shadowRoot||si)return null;const e=this.getRootNode().querySelectorAll("form");for(const t of Array.from(e))if(t.contains(this))return t;return null}connectedCallback(){var e;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(e=this.containingForm)||void 0===e||e.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.containingForm)||void 0===e||e.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}}li.shadowRootOptions={mode:"open",delegatesFocus:!0},o([ae({type:Boolean})],li.prototype,"disabled",void 0); +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const ci=e=>(t,i)=>{if(t.constructor._observers){if(!t.constructor.hasOwnProperty("_observers")){const e=t.constructor._observers;t.constructor._observers=new Map,e.forEach(((e,i)=>t.constructor._observers.set(i,e)))}}else{t.constructor._observers=new Map;const e=t.updated;t.updated=function(t){e.call(this,t),t.forEach(((e,t)=>{const i=this.constructor._observers.get(t);void 0!==i&&i.call(this,this[t],e)}))}}t.constructor._observers.set(i,e)} +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */,hi=St(class extends Ct{constructor(e){var t;if(super(e),e.type!==yt||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var i,o;if(void 0===this.et){this.et=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(i=this.st)||void 0===i?void 0:i.has(e))&&this.et.add(e);return this.render(t)}const n=e.element.classList;this.et.forEach((e=>{e in t||(n.remove(e),this.et.delete(e))}));for(const e in t){const i=!!t[e];i===this.et.has(e)||(null===(o=this.st)||void 0===o?void 0:o.has(e))||(i?(n.add(e),this.et.add(e)):(n.remove(e),this.et.delete(e)))}return z}}); +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class pi extends ri{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=Qt}createAdapter(){return{registerInteractionHandler:(e,t)=>{this.labelEl.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.labelEl.removeEventListener(e,t)},activateInputRipple:async()=>{const e=this.input;if(e instanceof li){const t=await e.ripple;t&&t.startPress()}},deactivateInputRipple:async()=>{const e=this.input;if(e instanceof li){const t=await e.ripple;t&&t.endPress()}}}}get input(){var e,t;return null!==(t=null===(e=this.slottedInputs)||void 0===e?void 0:e[0])&&void 0!==t?t:null}render(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return N` +
+ + +
`}click(){this._labelClick()}_labelClick(){const e=this.input;e&&(e.focus(),e.click())}}o([ae({type:Boolean})],pi.prototype,"alignEnd",void 0),o([ae({type:Boolean})],pi.prototype,"spaceBetween",void 0),o([ae({type:Boolean})],pi.prototype,"nowrap",void 0),o([ae({type:String}),ci((async function(e){var t;null===(t=this.input)||void 0===t||t.setAttribute("aria-label",e)}))],pi.prototype,"label",void 0),o([ce(".mdc-form-field")],pi.prototype,"mdcRoot",void 0),o([ue("",!0,"*")],pi.prototype,"slottedInputs",void 0),o([ce("label")],pi.prototype,"labelEl",void 0); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */ +const mi=l`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`,ui={"mwc-formfield":class extends pi{static get styles(){return mi}}}; +/** + * @license + * Copyright 2020 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var fi="Unknown",gi="Backspace",bi="Enter",vi="Spacebar",xi="PageUp",_i="PageDown",yi="End",wi="Home",Ei="ArrowLeft",Si="ArrowUp",Ci="ArrowRight",Ii="ArrowDown",Ai="Delete",Ti="Escape",ki="Tab",Oi=new Set;Oi.add(gi),Oi.add(bi),Oi.add(vi),Oi.add(xi),Oi.add(_i),Oi.add(yi),Oi.add(wi),Oi.add(Ei),Oi.add(Si),Oi.add(Ci),Oi.add(Ii),Oi.add(Ai),Oi.add(Ti),Oi.add(ki);var $i=8,Li=13,Ri=32,Di=33,Fi=34,Mi=35,Ni=36,zi=37,Hi=38,Bi=39,Pi=40,Vi=46,Ui=27,ji=9,Yi=new Map;Yi.set($i,gi),Yi.set(Li,bi),Yi.set(Ri,vi),Yi.set(Di,xi),Yi.set(Fi,_i),Yi.set(Mi,yi),Yi.set(Ni,wi),Yi.set(zi,Ei),Yi.set(Hi,Si),Yi.set(Bi,Ci),Yi.set(Pi,Ii),Yi.set(Vi,Ai),Yi.set(Ui,Ti),Yi.set(ji,ki);var Xi,Gi,Wi=new Set;function qi(e){var t=e.key;if(Oi.has(t))return t;var i=Yi.get(e.keyCode);return i||fi} +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */Wi.add(xi),Wi.add(_i),Wi.add(yi),Wi.add(wi),Wi.add(Ei),Wi.add(Si),Wi.add(Ci),Wi.add(Ii);var Ki="mdc-list-item--activated",Zi="mdc-list-item",Qi="mdc-list-item--disabled",Ji="mdc-list-item--selected",eo="mdc-list-item__text",to="mdc-list-item__primary-text",io="mdc-list";(Xi={})[""+Ki]="mdc-list-item--activated",Xi[""+Zi]="mdc-list-item",Xi[""+Qi]="mdc-list-item--disabled",Xi[""+Ji]="mdc-list-item--selected",Xi[""+to]="mdc-list-item__primary-text",Xi[""+io]="mdc-list";var oo=((Gi={})[""+Ki]="mdc-deprecated-list-item--activated",Gi[""+Zi]="mdc-deprecated-list-item",Gi[""+Qi]="mdc-deprecated-list-item--disabled",Gi[""+Ji]="mdc-deprecated-list-item--selected",Gi[""+eo]="mdc-deprecated-list-item__text",Gi[""+to]="mdc-deprecated-list-item__primary-text",Gi[""+io]="mdc-deprecated-list",Gi),no={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+Zi+" button:not(:disabled),\n ."+Zi+" a,\n ."+oo[Zi]+" button:not(:disabled),\n ."+oo[Zi]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+Zi+" button:not(:disabled),\n ."+Zi+" a,\n ."+Zi+' input[type="radio"]:not(:disabled),\n .'+Zi+' input[type="checkbox"]:not(:disabled),\n .'+oo[Zi]+" button:not(:disabled),\n ."+oo[Zi]+" a,\n ."+oo[Zi]+' input[type="radio"]:not(:disabled),\n .'+oo[Zi]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},ro={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},ao=["input","button","textarea","select"],so=function(e){var t=e.target;if(t){var i=(""+t.tagName).toLowerCase();-1===ao.indexOf(i)&&e.preventDefault()}};function lo(e,t){for(var i=new Map,o=0;ot&&!i(r[d].index)){s=d;break}if(-1!==s)return o.sortedIndexCursor=s,r[o.sortedIndexCursor].index;return-1}(r,a,s,t):function(e,t,i){var o=i.typeaheadBuffer[0],n=e.get(o);if(!n)return-1;var r=n[i.sortedIndexCursor];if(0===r.text.lastIndexOf(i.typeaheadBuffer,0)&&!t(r.index))return r.index;var a=(i.sortedIndexCursor+1)%n.length,d=-1;for(;a!==i.sortedIndexCursor;){var s=n[a],l=0===s.text.lastIndexOf(i.typeaheadBuffer,0),c=!t(s.index);if(l&&c){d=a;break}a=(a+1)%n.length}if(-1!==d)return i.sortedIndexCursor=d,n[i.sortedIndexCursor].index;return-1}(r,s,t),-1===i||d||n(i),i}function ho(e){return e.typeaheadBuffer.length>0} +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var po={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},mo=function(e){function o(t){var n=e.call(this,i(i({},o.defaultAdapter),t))||this;return n.shakeAnimationEndHandler=function(){n.handleShakeAnimationEnd()},n}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return po},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),o.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},o.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},o.prototype.getWidth=function(){return this.adapter.getWidth()},o.prototype.shake=function(e){var t=o.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(t):this.adapter.removeClass(t)},o.prototype.float=function(e){var t=o.cssClasses,i=t.LABEL_FLOAT_ABOVE,n=t.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(n))},o.prototype.setRequired=function(e){var t=o.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},o.prototype.handleShakeAnimationEnd=function(){var e=o.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},o}(qt); +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */const uo=St(class extends Ct{constructor(e){switch(super(e),this.foundation=null,this.previousPart=null,e.type){case yt:case wt:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(e,[t]){if(e!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-floating-label");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),getWidth:()=>e.scrollWidth,registerInteractionHandler:(t,i)=>{e.addEventListener(t,i)},deregisterInteractionHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new mo(i),this.foundation.init()}return this.render(t)}render(e){return this.foundation}}); +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var fo={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},go=function(e){function o(t){var n=e.call(this,i(i({},o.defaultAdapter),t))||this;return n.transitionEndHandler=function(e){n.handleTransitionEnd(e)},n}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return fo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),o.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},o.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},o.prototype.activate=function(){this.adapter.removeClass(fo.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(fo.LINE_RIPPLE_ACTIVE)},o.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},o.prototype.deactivate=function(){this.adapter.addClass(fo.LINE_RIPPLE_DEACTIVATING)},o.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(fo.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(fo.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(fo.LINE_RIPPLE_DEACTIVATING))},o}(qt); +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */const bo=St(class extends Ct{constructor(e){switch(super(e),this.previousPart=null,this.foundation=null,e.type){case yt:case wt:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(e,t){if(this.previousPart!==e){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-line-ripple");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),hasClass:t=>e.classList.contains(t),setStyle:(t,i)=>e.style.setProperty(t,i),registerEventHandler:(t,i)=>{e.addEventListener(t,i)},deregisterEventHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new go(i),this.foundation.init()}return this.render()}render(){return this.foundation}}); +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var vo,xo,_o={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},yo={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},wo={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(vo||(vo={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}(xo||(xo={})); +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var Eo={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},So={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Co={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},Io=function(e){function o(t,n){void 0===n&&(n={});var r=e.call(this,i(i({},o.defaultAdapter),t))||this;return r.disabled=!1,r.isMenuOpen=!1,r.useDefaultValidation=!0,r.customValidity=!0,r.lastSelectedIndex=Co.UNSET_INDEX,r.clickDebounceTimeout=0,r.recentlyClicked=!1,r.leadingIcon=n.leadingIcon,r.helperText=n.helperText,r}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return Eo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return Co},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return So},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),o.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},o.prototype.setSelectedIndex=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),e>=this.adapter.getMenuItemCount()||(e===Co.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),i||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},o.prototype.setValue=function(e,t){void 0===t&&(t=!1);var i=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(i,!1,t)},o.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==Co.UNSET_INDEX?t[e]:""},o.prototype.getDisabled=function(){return this.disabled},o.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(Eo.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(Eo.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},o.prototype.openMenu=function(){this.adapter.addClass(Eo.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},o.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},o.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(Eo.FOCUSED),i=e||t,o=this.adapter.hasClass(Eo.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(o)}},o.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},o.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},o.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},o.prototype.handleMenuClosed=function(){this.adapter.removeClass(Eo.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},o.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(Eo.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},o.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},o.prototype.handleFocus=function(){this.adapter.addClass(Eo.FOCUSED),this.layout(),this.adapter.activateBottomLine()},o.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},o.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},o.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(Eo.FOCUSED)){var t=qi(e)===bi,i=qi(e)===vi,o=qi(e)===Si,n=qi(e)===Ii;if(!(e.ctrlKey||e.metaKey)&&(!i&&e.key&&1===e.key.length||i&&this.adapter.isTypeaheadInProgress())){var r=i?" ":e.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void e.preventDefault()}(t||i||o||n)&&(o&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):n&&this.getSelectedIndex()null!=e?e:H +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */,To=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class ko extends li{constructor(){super(...arguments),this.mdcFoundationClass=Io,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=To()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const e=this.menuElement;return e?e.selected:null}get index(){const e=this.menuElement;return e?e.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const e={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},t={"mdc-select__menu--invalid":!this.isUiValid},i=this.label?"label":void 0,o=this.shouldRenderHelperText?"helper-text":void 0;return N` +
+ + +
+ ${this.renderRipple()} + ${this.outlined?this.renderOutline():this.renderLabel()} + ${this.renderLeadingIcon()} + + ${this.selectedText} + + + + + + + + + + ${this.renderLineRipple()} +
+ + + +
+ ${this.renderHelperText()}`}renderRipple(){return this.outlined?H:N` + + `}renderOutline(){return this.outlined?N` + + ${this.renderLabel()} + `:H}renderLabel(){return this.label?N` + ${this.label} + `:H}renderLeadingIcon(){return this.icon?N`
${this.icon}
`:H}renderLineRipple(){return this.outlined?H:N` + + `}renderHelperText(){if(!this.shouldRenderHelperText)return H;const e=this.validationMessage&&!this.isUiValid;return N` +

${e?this.validationMessage:this.helper}

`}createAdapter(){return Object.assign(Object.assign({},ei(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(e)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)},hasOutline:()=>this.outlined,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:e=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}},notifyChange:async e=>{if(!this.valueSetDirectly&&e===this.value)return;this.valueSetDirectly=!1,this.value=e,await this.updateComplete;const t=new Event("change",{bubbles:!0});this.dispatchEvent(t)},setSelectedText:e=>this.selectedText=e,isSelectAnchorFocused:()=>{const e=this.anchorElement;if(!e)return!1;return e.getRootNode().activeElement===e},getSelectAnchorAttr:e=>{const t=this.anchorElement;return t?t.getAttribute(e):null},setSelectAnchorAttr:(e,t)=>{const i=this.anchorElement;i&&i.setAttribute(e,t)},removeSelectAnchorAttr:e=>{const t=this.anchorElement;t&&t.removeAttribute(e)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const e=this.menuElement;e&&(e.corner="BOTTOM_START")},setMenuWrapFocus:e=>{const t=this.menuElement;t&&(t.wrapFocus=e)},focusMenuItemAtIndex:e=>{const t=this.menuElement;if(!t)return;const i=t.items[e];i&&i.focus()},getMenuItemCount:()=>{const e=this.menuElement;return e?e.items.length:0},getMenuItemValues:()=>{const e=this.menuElement;if(!e)return[];return e.items.map((e=>e.value))},getMenuItemTextAtIndex:e=>{const t=this.menuElement;if(!t)return"";const i=t.items[e];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>ho(this.typeaheadState),typeaheadMatchItem:(e,t)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t||this.menuElement.getFocusedItemIndex(),nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:e=>this.items[e].disabled},o=co(i,this.typeaheadState);return-1!==o&&this.select(o),o}})}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=To(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t)}return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const e=this.menuElement;if(e&&(this._menuUpdateComplete=e.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((e=>requestAnimationFrame(e))),await this.layout());const e=this.items.length&&""===this.items[0].value;if(!this.value&&e)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=lo(this.items.length,(e=>this.items[e].text))}onItemsUpdated(){this.sortedIndexByFirstChar=lo(this.items.length,(e=>this.items[e].text))}select(e){const t=this.menuElement;t&&t.select(e)}selectByValue(e){let t=-1;for(let i=0;i0,n=i&&this.index{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:e=>this.items[e].disabled},this.typeaheadState)}async onSelected(e){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(e.detail.index);const t=this.items[e.detail.index];t&&(this.value=t.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(e){this.name&&null!==this.selected&&e.append(this.name,this.value)}async layout(e=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const t=this.menuElement;t&&t.layout(e);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const o=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(o),!this.outlined)return;this.outlineOpen=o,await this.updateComplete;const n=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=n)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}o([ce(".mdc-select")],ko.prototype,"mdcRoot",void 0),o([ce(".formElement")],ko.prototype,"formElement",void 0),o([ce("slot")],ko.prototype,"slotElement",void 0),o([ce("select")],ko.prototype,"nativeSelectElement",void 0),o([ce("input")],ko.prototype,"nativeInputElement",void 0),o([ce(".mdc-line-ripple")],ko.prototype,"lineRippleElement",void 0),o([ce(".mdc-floating-label")],ko.prototype,"labelElement",void 0),o([ce("mwc-notched-outline")],ko.prototype,"outlineElement",void 0),o([ce(".mdc-menu")],ko.prototype,"menuElement",void 0),o([ce(".mdc-select__anchor")],ko.prototype,"anchorElement",void 0),o([ae({type:Boolean,attribute:"disabled",reflect:!0}),ci((function(e){this.mdcFoundation&&this.mdcFoundation.setDisabled(e)}))],ko.prototype,"disabled",void 0),o([ae({type:Boolean}),ci((function(e,t){void 0!==t&&this.outlined!==t&&this.layout(!1)}))],ko.prototype,"outlined",void 0),o([ae({type:String}),ci((function(e,t){void 0!==t&&this.label!==t&&this.layout(!1)}))],ko.prototype,"label",void 0),o([de()],ko.prototype,"outlineOpen",void 0),o([de()],ko.prototype,"outlineWidth",void 0),o([ae({type:String}),ci((function(e){if(this.mdcFoundation){const t=null===this.selected&&!!e,i=this.selected&&this.selected.value!==e;(t||i)&&this.selectByValue(e),this.reportValidity()}}))],ko.prototype,"value",void 0),o([ae()],ko.prototype,"name",void 0),o([de()],ko.prototype,"selectedText",void 0),o([ae({type:String})],ko.prototype,"icon",void 0),o([de()],ko.prototype,"menuOpen",void 0),o([ae({type:String})],ko.prototype,"helper",void 0),o([ae({type:Boolean})],ko.prototype,"validateOnInitialRender",void 0),o([ae({type:String})],ko.prototype,"validationMessage",void 0),o([ae({type:Boolean})],ko.prototype,"required",void 0),o([ae({type:Boolean})],ko.prototype,"naturalMenuWidth",void 0),o([de()],ko.prototype,"isUiValid",void 0),o([ae({type:Boolean})],ko.prototype,"fixedMenuPosition",void 0),o([le({capture:!0})],ko.prototype,"handleTypeahead",null); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +const Oo=(e,t)=>e-t,$o=["input","button","textarea","select"];function Lo(e){return e instanceof Set}const Ro=e=>{const t=e===ro.UNSET_INDEX?new Set:e;return Lo(t)?new Set(t):new Set([t])};class Do extends qt{constructor(e){super(Object.assign(Object.assign({},Do.defaultAdapter),e)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=ro.UNSET_INDEX,this.focusedItemIndex_=ro.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return no}static get numbers(){return ro}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(e){this.wrapFocus_=e}setMulti(e){this.isMulti_=e;const t=this.selectedIndex_;if(e){if(!Lo(t)){const e=t===ro.UNSET_INDEX;this.selectedIndex_=e?new Set:new Set([t])}}else if(Lo(t))if(t.size){const e=Array.from(t).sort(Oo);this.selectedIndex_=e[0]}else this.selectedIndex_=ro.UNSET_INDEX}setVerticalOrientation(e){this.isVertical_=e}setUseActivatedClass(e){this.useActivatedClass_=e}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(e){this.isIndexValid_(e)&&(this.isMulti_?this.setMultiSelectionAtIndex_(Ro(e)):this.setSingleSelectionAtIndex_(e))}handleFocusIn(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,0)}handleFocusOut(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,-1),setTimeout((()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()}),0)}handleKeydown(e,t,i){const o="ArrowLeft"===qi(e),n="ArrowUp"===qi(e),r="ArrowRight"===qi(e),a="ArrowDown"===qi(e),d="Home"===qi(e),s="End"===qi(e),l="Enter"===qi(e),c="Spacebar"===qi(e);if(this.adapter.isRootFocused())return void(n||s?(e.preventDefault(),this.focusLastElement()):(a||d)&&(e.preventDefault(),this.focusFirstElement()));let h,p=this.adapter.getFocusedElementIndex();if(!(-1===p&&(p=i,p<0))){if(this.isVertical_&&a||!this.isVertical_&&r)this.preventDefaultEvent(e),h=this.focusNextElement(p);else if(this.isVertical_&&n||!this.isVertical_&&o)this.preventDefaultEvent(e),h=this.focusPrevElement(p);else if(d)this.preventDefaultEvent(e),h=this.focusFirstElement();else if(s)this.preventDefaultEvent(e),h=this.focusLastElement();else if((l||c)&&t){const t=e.target;if(t&&"A"===t.tagName&&l)return;this.preventDefaultEvent(e),this.setSelectedIndexOnAction_(p,!0)}this.focusedItemIndex_=p,void 0!==h&&(this.setTabindexAtIndex_(h),this.focusedItemIndex_=h)}}handleSingleSelection(e,t,i){e!==ro.UNSET_INDEX&&(this.setSelectedIndexOnAction_(e,t,i),this.setTabindexAtIndex_(e),this.focusedItemIndex_=e)}focusNextElement(e){let t=e+1;if(t>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return e;t=0}return this.adapter.focusItemAtIndex(t),t}focusPrevElement(e){let t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(t),t}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const e=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(e),e}setEnabled(e,t){this.isIndexValid_(e)&&this.adapter.setDisabledStateForElementIndex(e,!t)}preventDefaultEvent(e){const t=`${e.target.tagName}`.toLowerCase();-1===$o.indexOf(t)&&e.preventDefault()}setSingleSelectionAtIndex_(e,t=!0){this.selectedIndex_!==e&&(this.selectedIndex_!==ro.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0),this.setAriaForSingleSelectionAtIndex_(e),this.selectedIndex_=e,this.adapter.notifySelected(e))}setMultiSelectionAtIndex_(e,t=!0){const i=((e,t)=>{const i=Array.from(e),o=Array.from(t),n={added:[],removed:[]},r=i.sort(Oo),a=o.sort(Oo);let d=0,s=0;for(;d=0&&this.focusedItemIndex_!==e&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(e,0)}setTabindexToFirstSelectedItem_(){let e=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==ro.UNSET_INDEX?e=this.selectedIndex_:Lo(this.selectedIndex_)&&this.selectedIndex_.size>0&&(e=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(e)}isIndexValid_(e){if(e instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===e.size)return!0;{let t=!1;for(const i of e)if(t=this.isIndexInRange_(i),t)break;return t}}if("number"==typeof e){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return e===ro.UNSET_INDEX||this.isIndexInRange_(e)}return!1}isIndexInRange_(e){const t=this.adapter.getListItemCount();return e>=0&&ee.hasAttribute("mwc-list-item");function Mo(){const e=this.itemsReadyResolver;this.itemsReady=new Promise((e=>this.itemsReadyResolver=e)),e()}class No extends ri{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=Do,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const e=function(e,t=50){let i;return function(o=!0){clearTimeout(i),i=setTimeout((()=>{e(o)}),t)}}(this.layout.bind(this));this.debouncedLayout=(t=!0)=>{Mo.call(this),e(t)}}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.itemsReady,e}get items(){return this.items_}updateItems(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[],i=[];for(const e of t)Fo(e)&&(i.push(e),e._managingList=this),e.hasAttribute("divider")&&!e.hasAttribute("role")&&e.setAttribute("role","separator");this.items_=i;const o=new Set;if(this.items_.forEach(((e,t)=>{this.itemRoles?e.setAttribute("role",this.itemRoles):e.removeAttribute("role"),e.selected&&o.add(t)})),this.multi)this.select(o);else{const e=o.size?o.entries().next().value[1]:-1;this.select(e)}const n=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(n)}get selected(){const e=this.index;if(!Lo(e))return-1===e?null:this.items[e];const t=[];for(const i of e)t.push(this.items[i]);return t}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const e=null===this.innerRole?void 0:this.innerRole,t=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return N` + +
    + + ${this.renderPlaceholder()} +
+ `}renderPlaceholder(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[];return void 0!==this.emptyMessage&&0===t.length?N` + ${this.emptyMessage} + `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusIn(e,t)}}onFocusOut(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusOut(e,t)}}onKeydown(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e),i=e.target,o=Fo(i);this.mdcFoundation.handleKeydown(e,o,t)}}onRequestSelected(e){if(this.mdcFoundation){let t=this.getIndexOfTarget(e);if(-1===t&&(this.layout(),t=this.getIndexOfTarget(e),-1===t))return;if(this.items[t].disabled)return;const i=e.detail.selected,o=e.detail.source;this.mdcFoundation.handleSingleSelection(t,"interaction"===o,i),e.stopPropagation()}}getIndexOfTarget(e){const t=this.items,i=e.composedPath();for(const e of i){let i=-1;if(Jt(e)&&Fo(e)&&(i=t.indexOf(e)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(e,t)=>{if(!this.mdcRoot)return"";const i=this.items[e];return i?i.getAttribute(t):""},setAttributeForElementIndex:(e,t,i)=>{if(!this.mdcRoot)return;const o=this.items[e];o&&o.setAttribute(t,i)},focusItemAtIndex:e=>{const t=this.items[e];t&&t.focus()},setTabIndexForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.tabindex=t)},notifyAction:e=>{const t={bubbles:!0,composed:!0};t.detail={index:e};const i=new CustomEvent("action",t);this.dispatchEvent(i)},notifySelected:(e,t)=>{const i={bubbles:!0,composed:!0};i.detail={index:e,diff:t};const o=new CustomEvent("selected",i);this.dispatchEvent(o)},isFocusInsideList:()=>ni(this),isRootFocused:()=>{const e=this.mdcRoot;return e.getRootNode().activeElement===e},setDisabledStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.disabled=t)},getDisabledStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.disabled},setSelectedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.selected=t)},getSelectedStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.selected},setActivatedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.activated=t)}},this.mdcAdapter}selectUi(e,t=!1){const i=this.items[e];i&&(i.selected=!0,i.activated=t)}deselectUi(e){const t=this.items[e];t&&(t.selected=!1,t.activated=!1)}select(e){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(e)}toggle(e,t){this.multi&&this.mdcFoundation.toggleMultiAtIndex(e,t)}onListItemConnected(e){const t=e.target;this.layout(-1===this.items.indexOf(t))}layout(e=!0){e&&this.updateItems();const t=this.items[0];for(const e of this.items)e.tabindex=-1;t&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=t):t.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const e=oi();if(!e.length)return-1;for(let t=e.length-1;t>=0;t--){const i=e[t];if(Fo(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(e){for(const e of this.items)if(0===e.tabindex){e.tabindex=-1;break}this.items[e].tabindex=0,this.items[e].focus()}focus(){const e=this.mdcRoot;e&&e.focus()}blur(){const e=this.mdcRoot;e&&e.blur()}}o([ae({type:String})],No.prototype,"emptyMessage",void 0),o([ce(".mdc-deprecated-list")],No.prototype,"mdcRoot",void 0),o([ue("",!0,"*")],No.prototype,"assignedElements",void 0),o([ue("",!0,'[tabindex="0"]')],No.prototype,"tabbableElements",void 0),o([ae({type:Boolean}),ci((function(e){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(e)}))],No.prototype,"activatable",void 0),o([ae({type:Boolean}),ci((function(e,t){this.mdcFoundation&&this.mdcFoundation.setMulti(e),void 0!==t&&this.layout()}))],No.prototype,"multi",void 0),o([ae({type:Boolean}),ci((function(e){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(e)}))],No.prototype,"wrapFocus",void 0),o([ae({type:String}),ci((function(e,t){void 0!==t&&this.updateItems()}))],No.prototype,"itemRoles",void 0),o([ae({type:String})],No.prototype,"innerRole",void 0),o([ae({type:String})],No.prototype,"innerAriaLabel",void 0),o([ae({type:Boolean})],No.prototype,"rootTabbable",void 0),o([ae({type:Boolean,reflect:!0}),ci((function(e){var t,i;if(e){const e=null!==(i=null===(t=this.tabbableElements)||void 0===t?void 0:t[0])&&void 0!==i?i:null;this.previousTabindex=e,e&&e.setAttribute("tabindex","-1")}else!e&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)}))],No.prototype,"noninteractive",void 0); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class zo{constructor(e){this.startPress=t=>{e().then((e=>{e&&e.startPress(t)}))},this.endPress=()=>{e().then((e=>{e&&e.endPress()}))},this.startFocus=()=>{e().then((e=>{e&&e.startFocus()}))},this.endFocus=()=>{e().then((e=>{e&&e.endFocus()}))},this.startHover=()=>{e().then((e=>{e&&e.startHover()}))},this.endHover=()=>{e().then((e=>{e&&e.endHover()}))}}} +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Ho extends ie{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new zo((()=>(this.shouldRenderRipple=!0,this.ripple))),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:e=>{const t=e.type;this.onDown("mousedown"===t?"mouseup":"touchend",e)}}]}get text(){const e=this.textContent;return e?e.trim():""}render(){const e=this.renderText(),t=this.graphic?this.renderGraphic():N``,i=this.hasMeta?this.renderMeta():N``;return N` + ${this.renderRipple()} + ${t} + ${e} + ${i}`}renderRipple(){return this.shouldRenderRipple?N` + + `:this.activated?N`
`:""}renderGraphic(){const e={multi:this.multipleGraphics};return N` + + + `}renderMeta(){return N` + + + `}renderText(){const e=this.twoline?this.renderTwoline():this.renderSingleLine();return N` + + ${e} + `}renderSingleLine(){return N``}renderTwoline(){return N` + + + + + + + `}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(e,t){const i=()=>{window.removeEventListener(e,i),this.rippleHandlers.endPress()};window.addEventListener(e,i),this.rippleHandlers.startPress(t)}fireRequestSelected(e,t){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:t,selected:e}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const e of this.listeners)for(const t of e.eventNames)e.target.addEventListener(t,e.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)for(const t of e.eventNames)e.target.removeEventListener(t,e.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const e=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(e)}}o([ce("slot")],Ho.prototype,"slotElement",void 0),o([he("mwc-ripple")],Ho.prototype,"ripple",void 0),o([ae({type:String})],Ho.prototype,"value",void 0),o([ae({type:String,reflect:!0})],Ho.prototype,"group",void 0),o([ae({type:Number,reflect:!0})],Ho.prototype,"tabindex",void 0),o([ae({type:Boolean,reflect:!0}),ci((function(e){e?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}))],Ho.prototype,"disabled",void 0),o([ae({type:Boolean,reflect:!0})],Ho.prototype,"twoline",void 0),o([ae({type:Boolean,reflect:!0})],Ho.prototype,"activated",void 0),o([ae({type:String,reflect:!0})],Ho.prototype,"graphic",void 0),o([ae({type:Boolean})],Ho.prototype,"multipleGraphics",void 0),o([ae({type:Boolean})],Ho.prototype,"hasMeta",void 0),o([ae({type:Boolean,reflect:!0}),ci((function(e){e?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")}))],Ho.prototype,"noninteractive",void 0),o([ae({type:Boolean,reflect:!0}),ci((function(e){const t=this.getAttribute("role"),i="gridcell"===t||"option"===t||"row"===t||"tab"===t;i&&e?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(e,"property")}))],Ho.prototype,"selected",void 0),o([de()],Ho.prototype,"shouldRenderRipple",void 0),o([de()],Ho.prototype,"_managingList",void 0); +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var Bo,Po={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},Vo={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},Uo={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(Bo||(Bo={})); +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var jo=function(e){function o(t){var n=e.call(this,i(i({},o.defaultAdapter),t))||this;return n.isSurfaceOpen=!1,n.isQuickOpen=!1,n.isHoistedElement=!1,n.isFixedPosition=!1,n.isHorizontallyCenteredOnViewport=!1,n.maxHeight=0,n.openBottomBias=0,n.openAnimationEndTimerId=0,n.closeAnimationEndTimerId=0,n.animationRequestId=0,n.anchorCorner=xo.TOP_START,n.originCorner=xo.TOP_START,n.anchorMargin={top:0,right:0,bottom:0,left:0},n.position={x:0,y:0},n}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return _o},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return yo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return wo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"Corner",{get:function(){return xo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){},notifyClosing:function(){}}},enumerable:!1,configurable:!0}),o.prototype.init=function(){var e=o.cssClasses,t=e.ROOT,i=e.OPEN;if(!this.adapter.hasClass(t))throw new Error(t+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},o.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},o.prototype.setAnchorCorner=function(e){this.anchorCorner=e},o.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^vo.RIGHT},o.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},o.prototype.setIsHoisted=function(e){this.isHoistedElement=e},o.prototype.setFixedPosition=function(e){this.isFixedPosition=e},o.prototype.isFixed=function(){return this.isFixedPosition},o.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},o.prototype.setIsHorizontallyCenteredOnViewport=function(e){this.isHorizontallyCenteredOnViewport=e},o.prototype.setQuickOpen=function(e){this.isQuickOpen=e},o.prototype.setMaxHeight=function(e){this.maxHeight=e},o.prototype.setOpenBottomBias=function(e){this.openBottomBias=e},o.prototype.isOpen=function(){return this.isSurfaceOpen},o.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(o.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(o.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.adapter.addClass(o.cssClasses.OPEN),e.openAnimationEndTimerId=setTimeout((function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(o.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()}),wo.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},o.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(o.cssClasses.OPEN),this.adapter.removeClass(o.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(o.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){t.adapter.removeClass(o.cssClasses.OPEN),t.adapter.removeClass(o.cssClasses.IS_OPEN_BELOW),t.closeAnimationEndTimerId=setTimeout((function(){t.closeAnimationEndTimerId=0,t.adapter.removeClass(o.cssClasses.ANIMATING_CLOSED),t.adapter.notifyClose()}),wo.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()}},o.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},o.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},o.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var t=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(t),n=this.hasBit(t,vo.BOTTOM)?"bottom":"top",r=this.hasBit(t,vo.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(t),d=this.getVerticalOriginOffset(t),s=this.measurements,l=s.anchorSize,c=s.surfaceSize,h=((e={})[r]=a,e[n]=d,e);l.width/c.width>wo.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(h),this.adapter.setTransformOrigin(r+" "+n),this.adapter.setPosition(h),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(t,vo.BOTTOM)||this.adapter.addClass(o.cssClasses.IS_OPEN_BELOW)},o.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),i=this.adapter.getWindowDimensions(),o=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:i.width-e.right,bottom:i.height-e.bottom,left:e.left},viewportSize:i,windowScroll:o}},o.prototype.getoriginCorner=function(){var e,t,i=this.originCorner,n=this.measurements,r=n.viewportDistance,a=n.anchorSize,d=n.surfaceSize,s=o.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,vo.BOTTOM)?(e=r.top-s+this.anchorMargin.bottom,t=r.bottom-s-this.anchorMargin.bottom):(e=r.top-s+this.anchorMargin.top,t=r.bottom-s+a.height-this.anchorMargin.top),!(t-d.height>0)&&e>t+this.openBottomBias&&(i=this.setBit(i,vo.BOTTOM));var l,c,h=this.adapter.isRtl(),p=this.hasBit(this.anchorCorner,vo.FLIP_RTL),m=this.hasBit(this.anchorCorner,vo.RIGHT)||this.hasBit(i,vo.RIGHT),u=!1;(u=h&&p?!m:m)?(l=r.left+a.width+this.anchorMargin.right,c=r.right-this.anchorMargin.right):(l=r.left+this.anchorMargin.left,c=r.right+a.width-this.anchorMargin.left);var f=l-d.width>0,g=c-d.width>0,b=this.hasBit(i,vo.FLIP_RTL)&&this.hasBit(i,vo.RIGHT);return g&&b&&h||!f&&b?i=this.unsetBit(i,vo.RIGHT):(f&&u&&h||f&&!u&&m||!g&&l>=c)&&(i=this.setBit(i,vo.RIGHT)),i},o.prototype.getMenuSurfaceMaxHeight=function(e){if(this.maxHeight>0)return this.maxHeight;var t=this.measurements.viewportDistance,i=0,n=this.hasBit(e,vo.BOTTOM),r=this.hasBit(this.anchorCorner,vo.BOTTOM),a=o.numbers.MARGIN_TO_EDGE;return n?(i=t.top+this.anchorMargin.top-a,r||(i+=this.measurements.anchorSize.height)):(i=t.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,r&&(i-=this.measurements.anchorSize.height)),i},o.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,vo.RIGHT),o=this.hasBit(this.anchorCorner,vo.RIGHT);if(i){var n=o?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?n-(this.measurements.viewportSize.width-this.measurements.bodySize.width):n}return o?t.width-this.anchorMargin.right:this.anchorMargin.left},o.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,vo.BOTTOM),o=this.hasBit(this.anchorCorner,vo.BOTTOM);return i?o?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:o?t.height+this.anchorMargin.bottom:this.anchorMargin.top},o.prototype.adjustPositionForHoistedElement=function(e){var t,i,o=this.measurements,r=o.windowScroll,a=o.viewportDistance,d=o.surfaceSize,s=o.viewportSize,l=Object.keys(e);try{for(var c=n(l),h=c.next();!h.done;h=c.next()){var p=h.value,m=e[p]||0;!this.isHorizontallyCenteredOnViewport||"left"!==p&&"right"!==p?(m+=a[p],this.isFixedPosition||("top"===p?m+=r.y:"bottom"===p?m-=r.y:"left"===p?m+=r.x:m-=r.x),e[p]=m):e[p]=(s.width-d.width)/2}}catch(e){t={error:e}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}},o.prototype.maybeRestoreFocus=function(){var e=this,t=this.adapter.isFocused(),i=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(t||i)&&setTimeout((function(){e.adapter.restoreFocus()}),wo.TOUCH_EVENT_WAIT_MS)},o.prototype.hasBit=function(e,t){return Boolean(e&t)},o.prototype.setBit=function(e,t){return e|t},o.prototype.unsetBit=function(e,t){return e^t},o.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},o}(qt),Yo=jo,Xo=function(e){function o(t){var n=e.call(this,i(i({},o.defaultAdapter),t))||this;return n.closeAnimationEndTimerId=0,n.defaultFocusState=Bo.LIST_ROOT,n.selectedIndex=-1,n}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return Po},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return Vo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return Uo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),o.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},o.prototype.handleKeydown=function(e){var t=e.key,i=e.keyCode;("Tab"===t||9===i)&&this.adapter.closeSurface(!0)},o.prototype.handleItemAction=function(e){var t=this,i=this.adapter.getElementIndex(e);if(!(i<0)){this.adapter.notifySelected({index:i});var o="true"===this.adapter.getAttributeFromElementAtIndex(i,Vo.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(o),this.closeAnimationEndTimerId=setTimeout((function(){var i=t.adapter.getElementIndex(e);i>=0&&t.adapter.isSelectableItemAtIndex(i)&&t.setSelectedIndex(i)}),jo.numbers.TRANSITION_CLOSE_DURATION)}},o.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case Bo.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case Bo.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case Bo.NONE:break;default:this.adapter.focusListRoot()}},o.prototype.setDefaultFocusState=function(e){this.defaultFocusState=e},o.prototype.getSelectedIndex=function(){return this.selectedIndex},o.prototype.setSelectedIndex=function(e){if(this.validatedIndex(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,Vo.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,Po.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,Po.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,Vo.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=e},o.prototype.setEnabled=function(e,t){this.validatedIndex(e),t?(this.adapter.removeClassFromElementAtIndex(e,Qi),this.adapter.addAttributeToElementAtIndex(e,Vo.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,Qi),this.adapter.addAttributeToElementAtIndex(e,Vo.ARIA_DISABLED_ATTR,"true"))},o.prototype.validatedIndex=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e + + + + `}createAdapter(){return{addClassToElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&("mdc-menu-item--selected"===t?this.forceGroupSelection&&!o.selected&&i.toggle(e,!0):o.classList.add(t))},removeClassFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&("mdc-menu-item--selected"===t?o.selected&&i.toggle(e,!1):o.classList.remove(t))},addAttributeToElementAtIndex:(e,t,i)=>{const o=this.listElement;if(!o)return;const n=o.items[e];n&&n.setAttribute(t,i)},removeAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&o.removeAttribute(t)},getAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return null;const o=i.items[e];return o?o.getAttribute(t):null},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:()=>{this.open=!1},getElementIndex:e=>{const t=this.listElement;return t?t.items.indexOf(e):-1},notifySelected:()=>{},getMenuItemCount:()=>{const e=this.listElement;return e?e.items.length:0},focusItemAtIndex:e=>{const t=this.listElement;if(!t)return;const i=t.items[e];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:e=>{const t=this.listElement;if(!t)return-1;const i=t.items[e];if(!i||!i.group)return-1;for(let o=0;o{const t=this.listElement;if(!t)return!1;const i=t.items[e];return!!i&&i.hasAttribute("group")}}}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onAction(e){const t=this.listElement;if(this.mdcFoundation&&t){const i=e.detail.index,o=t.items[i];o&&this.mdcFoundation.handleItemAction(o)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){await this._listUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const e=this.listElement;e&&(this._listUpdateComplete=e.updateComplete,await this._listUpdateComplete)}select(e){const t=this.listElement;t&&t.select(e)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const e=this.listElement;return e?e.getFocusedItemIndex():-1}focusItemAtIndex(e){const t=this.listElement;t&&t.focusItemAtIndex(e)}layout(e=!0){const t=this.listElement;t&&t.layout(e)}}o([ce(".mdc-menu")],Go.prototype,"mdcRoot",void 0),o([ce("slot")],Go.prototype,"slotElement",void 0),o([ae({type:Object})],Go.prototype,"anchor",void 0),o([ae({type:Boolean,reflect:!0})],Go.prototype,"open",void 0),o([ae({type:Boolean})],Go.prototype,"quick",void 0),o([ae({type:Boolean})],Go.prototype,"wrapFocus",void 0),o([ae({type:String})],Go.prototype,"innerRole",void 0),o([ae({type:String})],Go.prototype,"innerAriaLabel",void 0),o([ae({type:String})],Go.prototype,"corner",void 0),o([ae({type:Number})],Go.prototype,"x",void 0),o([ae({type:Number})],Go.prototype,"y",void 0),o([ae({type:Boolean})],Go.prototype,"absolute",void 0),o([ae({type:Boolean})],Go.prototype,"multi",void 0),o([ae({type:Boolean})],Go.prototype,"activatable",void 0),o([ae({type:Boolean})],Go.prototype,"fixed",void 0),o([ae({type:Boolean})],Go.prototype,"forceGroupSelection",void 0),o([ae({type:Boolean})],Go.prototype,"fullwidth",void 0),o([ae({type:String})],Go.prototype,"menuCorner",void 0),o([ae({type:Boolean})],Go.prototype,"stayOpenOnBodyClick",void 0),o([ae({type:String}),ci((function(e){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(Bo[e])}))],Go.prototype,"defaultFocus",void 0); +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Wo=St(class extends Ct{constructor(e){var t;if(super(e),e.type!==yt||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ct){this.ct=new Set;for(const e in t)this.ct.add(e);return this.render(t)}this.ct.forEach((e=>{null==t[e]&&(this.ct.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const o=t[e];null!=o&&(this.ct.add(e),e.includes("-")?i.setProperty(e,o):i[e]=o)}return z}}),qo={TOP_LEFT:xo.TOP_LEFT,TOP_RIGHT:xo.TOP_RIGHT,BOTTOM_LEFT:xo.BOTTOM_LEFT,BOTTOM_RIGHT:xo.BOTTOM_RIGHT,TOP_START:xo.TOP_START,TOP_END:xo.TOP_END,BOTTOM_START:xo.BOTTOM_START,BOTTOM_END:xo.BOTTOM_END}; +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Ko extends ri{constructor(){super(...arguments),this.mdcFoundationClass=Yo,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=xo.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){const e={"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth},t={top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin};return N` +
+ +
`}createAdapter(){return Object.assign(Object.assign({},ei(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const e=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(e)},notifyClosing:()=>{const e=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(e)},notifyOpen:()=>{const e=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(e)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:e=>{this.mdcRoot&&(this.styleTransformOrigin=e)},isFocused:()=>ni(this),saveFocus:()=>{const e=oi(),t=e.length;t||(this.previouslyFocused=null),this.previouslyFocused=e[t-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const e=this.mdcRoot;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const e=this.anchor;return e?e.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:e=>{this.mdcRoot&&(this.styleLeft="left"in e?`${e.left}px`:"",this.styleRight="right"in e?`${e.right}px`:"",this.styleTop="top"in e?`${e.top}px`:"",this.styleBottom="bottom"in e?`${e.bottom}px`:"")},setMaxHeight:async e=>{this.mdcRoot&&(this.styleMaxHeight=e,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${e})`)}})}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onBodyClick(e){if(this.stayOpenOnBodyClick)return;-1===e.composedPath().indexOf(this)&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}close(){this.open=!1}show(){this.open=!0}}o([ce(".mdc-menu-surface")],Ko.prototype,"mdcRoot",void 0),o([ce("slot")],Ko.prototype,"slotElement",void 0),o([ae({type:Boolean}),ci((function(e){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(e)}))],Ko.prototype,"absolute",void 0),o([ae({type:Boolean})],Ko.prototype,"fullwidth",void 0),o([ae({type:Boolean}),ci((function(e){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(e)}))],Ko.prototype,"fixed",void 0),o([ae({type:Number}),ci((function(e){this.mdcFoundation&&null!==this.y&&null!==e&&(this.mdcFoundation.setAbsolutePosition(e,this.y),this.mdcFoundation.setAnchorMargin({left:e,top:this.y,right:-e,bottom:this.y}))}))],Ko.prototype,"x",void 0),o([ae({type:Number}),ci((function(e){this.mdcFoundation&&null!==this.x&&null!==e&&(this.mdcFoundation.setAbsolutePosition(this.x,e),this.mdcFoundation.setAnchorMargin({left:this.x,top:e,right:-this.x,bottom:e}))}))],Ko.prototype,"y",void 0),o([ae({type:Boolean}),ci((function(e){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(e)}))],Ko.prototype,"quick",void 0),o([ae({type:Boolean,reflect:!0}),ci((function(e,t){this.mdcFoundation&&(e?this.mdcFoundation.open():void 0!==t&&this.mdcFoundation.close())}))],Ko.prototype,"open",void 0),o([ae({type:Boolean})],Ko.prototype,"stayOpenOnBodyClick",void 0),o([de(),ci((function(e){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(e)}))],Ko.prototype,"bitwiseCorner",void 0),o([ae({type:String}),ci((function(e){if(this.mdcFoundation){const t="START"===e||"END"===e,i=null===this.previousMenuCorner,o=!i&&e!==this.previousMenuCorner,n=i&&"END"===e;t&&(o||n)&&(this.bitwiseCorner=this.bitwiseCorner^vo.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=e)}}))],Ko.prototype,"menuCorner",void 0),o([ae({type:String}),ci((function(e){if(this.mdcFoundation&&e){let t=qo[e];"END"===this.menuCorner&&(t^=vo.RIGHT),this.bitwiseCorner=t}}))],Ko.prototype,"corner",void 0),o([de()],Ko.prototype,"styleTop",void 0),o([de()],Ko.prototype,"styleLeft",void 0),o([de()],Ko.prototype,"styleRight",void 0),o([de()],Ko.prototype,"styleBottom",void 0),o([de()],Ko.prototype,"styleMaxHeight",void 0),o([de()],Ko.prototype,"styleTransformOrigin",void 0); +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var Zo={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},Qo={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},Jo={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300}; +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var en=["touchstart","pointerdown","mousedown","keydown"],tn=["touchend","pointerup","mouseup","contextmenu"],on=[],nn=function(e){function o(t){var n=e.call(this,i(i({},o.defaultAdapter),t))||this;return n.activationAnimationHasEnded=!1,n.activationTimer=0,n.fgDeactivationRemovalTimer=0,n.fgScale="0",n.frame={width:0,height:0},n.initialSize=0,n.layoutFrame=0,n.maxRadius=0,n.unboundedCoords={left:0,top:0},n.activationState=n.defaultActivationState(),n.activationTimerCallback=function(){n.activationAnimationHasEnded=!0,n.runDeactivationUXLogicIfReady()},n.activateHandler=function(e){n.activateImpl(e)},n.deactivateHandler=function(){n.deactivateImpl()},n.focusHandler=function(){n.handleFocus()},n.blurHandler=function(){n.handleBlur()},n.resizeHandler=function(){n.layout()},n}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return Zo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return Qo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return Jo},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),o.prototype.init=function(){var e=this,t=this.supportsPressRipple();if(this.registerRootHandlers(t),t){var i=o.cssClasses,n=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(n),e.adapter.isUnbounded()&&(e.adapter.addClass(r),e.layoutInternal())}))}},o.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(o.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(o.cssClasses.FG_DEACTIVATION));var t=o.cssClasses,i=t.ROOT,n=t.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(n),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},o.prototype.activate=function(e){this.activateImpl(e)},o.prototype.deactivate=function(){this.deactivateImpl()},o.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},o.prototype.setUnbounded=function(e){var t=o.cssClasses.UNBOUNDED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},o.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(o.cssClasses.BG_FOCUSED)}))},o.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(o.cssClasses.BG_FOCUSED)}))},o.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},o.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},o.prototype.registerRootHandlers=function(e){var t,i;if(e){try{for(var o=n(en),r=o.next();!r.done;r=o.next()){var a=r.value;this.adapter.registerInteractionHandler(a,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},o.prototype.registerDeactivationHandlers=function(e){var t,i;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var o=n(tn),r=o.next();!r.done;r=o.next()){var a=r.value;this.adapter.registerDocumentInteractionHandler(a,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}},o.prototype.deregisterRootHandlers=function(){var e,t;try{for(var i=n(en),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.deregisterInteractionHandler(r,this.activateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},o.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=n(tn),o=i.next();!o.done;o=i.next()){var r=o.value;this.adapter.deregisterDocumentInteractionHandler(r,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},o.prototype.removeCssVars=function(){var e=this,t=o.strings;Object.keys(t).forEach((function(i){0===i.indexOf("VAR_")&&e.adapter.updateCssVariable(t[i],null)}))},o.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var o=this.previousActivationEvent;if(!(o&&void 0!==e&&o.type!==e.type))i.isActivated=!0,i.isProgrammatic=void 0===e,i.activationEvent=e,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&on.length>0&&on.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&(on.push(e.target),this.registerDeactivationHandlers(e)),i.wasElementMadeActive=this.checkElementMadeActive(e),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){on=[],i.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(i.wasElementMadeActive=t.checkElementMadeActive(e),i.wasElementMadeActive&&t.animateActivation()),i.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}},o.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},o.prototype.animateActivation=function(){var e=this,t=o.strings,i=t.VAR_FG_TRANSLATE_START,n=t.VAR_FG_TRANSLATE_END,r=o.cssClasses,a=r.FG_DEACTIVATION,d=r.FG_ACTIVATION,s=o.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var l="",c="";if(!this.adapter.isUnbounded()){var h=this.getFgTranslationCoordinates(),p=h.startPoint,m=h.endPoint;l=p.x+"px, "+p.y+"px",c=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(i,l),this.adapter.updateCssVariable(n,c),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(d),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),s)},o.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,i=t.activationEvent;return e=t.wasActivatedByPointer?function(e,t,i){if(!e)return{x:0,y:0};var o,n,r=t.x,a=t.y,d=r+i.left,s=a+i.top;if("touchstart"===e.type){var l=e;o=l.changedTouches[0].pageX-d,n=l.changedTouches[0].pageY-s}else{var c=e;o=c.pageX-d,n=c.pageY-s}return{x:o,y:n}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:e={x:e.x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},o.prototype.runDeactivationUXLogicIfReady=function(){var e=this,t=o.cssClasses.FG_DEACTIVATION,i=this.activationState,n=i.hasDeactivationUXRun,r=i.isActivated;(n||!r)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(t),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(t)}),Jo.FG_DEACTIVATION_MS))},o.prototype.rmBoundedActivationClasses=function(){var e=o.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},o.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),o.numbers.TAP_DELAY_MS)},o.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var o=i({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(o)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(o),e.resetActivationState()})))}},o.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,i=e.wasElementMadeActive;(t||i)&&this.runDeactivationUXLogicIfReady()},o.prototype.layoutInternal=function(){var e=this;this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(e.frame.width,2)+Math.pow(e.frame.height,2))+o.numbers.PADDING;var i=Math.floor(t*o.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},o.prototype.updateLayoutCssVars=function(){var e=o.strings,t=e.VAR_FG_SIZE,i=e.VAR_LEFT,n=e.VAR_TOP,r=e.VAR_FG_SCALE;this.adapter.updateCssVariable(t,this.initialSize+"px"),this.adapter.updateCssVariable(r,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(n,this.unboundedCoords.top+"px"))},o}(qt),rn=nn; +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class an extends ri{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=rn}get isActive(){return e=this.parentElement||this,t=":active",(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t); +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var e,t}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(e,t)=>{switch(e){case"--mdc-ripple-fg-scale":this.fgScale=t;break;case"--mdc-ripple-fg-size":this.fgSize=t;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=t;break;case"--mdc-ripple-fg-translate-start":this.translateStart=t;break;case"--mdc-ripple-left":this.leftPos=t;break;case"--mdc-ripple-top":this.topPos=t}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(e){this.waitForFoundation((()=>{this.mdcFoundation.activate(e)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(e){this.mdcFoundation?e():this.updateComplete.then(e)}update(e){e.has("disabled")&&this.disabled&&this.endHover(),super.update(e)}render(){const e=this.activated&&(this.primary||!this.accent),t=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":e,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":t,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return N` +
`}}o([ce(".mdc-ripple-surface")],an.prototype,"mdcRoot",void 0),o([ae({type:Boolean})],an.prototype,"primary",void 0),o([ae({type:Boolean})],an.prototype,"accent",void 0),o([ae({type:Boolean})],an.prototype,"unbounded",void 0),o([ae({type:Boolean})],an.prototype,"disabled",void 0),o([ae({type:Boolean})],an.prototype,"activated",void 0),o([ae({type:Boolean})],an.prototype,"selected",void 0),o([ae({type:Boolean})],an.prototype,"internalUseStateLayerCustomProperties",void 0),o([de()],an.prototype,"hovering",void 0),o([de()],an.prototype,"bgFocused",void 0),o([de()],an.prototype,"fgActivation",void 0),o([de()],an.prototype,"fgDeactivation",void 0),o([de()],an.prototype,"fgScale",void 0),o([de()],an.prototype,"fgSize",void 0),o([de()],an.prototype,"translateStart",void 0),o([de()],an.prototype,"translateEnd",void 0),o([de()],an.prototype,"leftPos",void 0),o([de()],an.prototype,"topPos",void 0); +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var dn={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},sn={NOTCH_ELEMENT_PADDING:8},ln={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},cn=function(e){function o(t){return e.call(this,i(i({},o.defaultAdapter),t))||this}return t(o,e),Object.defineProperty(o,"strings",{get:function(){return dn},enumerable:!1,configurable:!0}),Object.defineProperty(o,"cssClasses",{get:function(){return ln},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return sn},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),o.prototype.notch=function(e){var t=o.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=sn.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(t)},o.prototype.closeNotch=function(){var e=o.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},o}(qt); +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class hn extends ri{constructor(){super(...arguments),this.mdcFoundationClass=cn,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:e=>this.mdcRoot.classList.add(e),removeClass:e=>this.mdcRoot.classList.remove(e),setNotchWidthProperty:e=>this.notchElement.style.setProperty("width",`${e}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(e,t){this.mdcFoundation&&(e&&void 0!==t?this.mdcFoundation.notch(t):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const e=hi({"mdc-notched-outline--notched":this.open});return N` + + + + + + + `}}o([ce(".mdc-notched-outline")],hn.prototype,"mdcRoot",void 0),o([ae({type:Number})],hn.prototype,"width",void 0),o([ae({type:Boolean,reflect:!0})],hn.prototype,"open",void 0),o([ce(".mdc-notched-outline__notch")],hn.prototype,"notchElement",void 0); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */ +const pn=l`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}` +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */,mn=l`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}` +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */,un=l`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}` +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */,fn=l`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}` +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */,gn=l`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}` +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */,bn=l`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}` +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */,vn=l`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`,xn={"mwc-select":class extends ko{static get styles(){return pn}},"mwc-list":class extends No{static get styles(){return mn}},"mwc-list-item":class extends Ho{static get styles(){return un}},"mwc-ripple":class extends an{static get styles(){return fn}},"mwc-menu":class extends Go{static get styles(){return gn}},"mwc-menu-surface":class extends Ko{static get styles(){return bn}},"mwc-notched-outline":class extends hn{static get styles(){return vn}}};function _n(e,t,i){if(void 0!==t) +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +return function(e,t,i){const o=e.constructor;if(!i){const e=`__${t}`;if(!(i=o.getPropertyDescriptor(t,e)))throw new Error("@ariaProperty must be used after a @property decorator")}const n=i;let r="";if(!n.set)throw new Error(`@ariaProperty requires a setter for ${t}`);if(e.dispatchWizEvent)return i;const a={configurable:!0,enumerable:!0,set(e){if(""===r){const e=o.getPropertyOptions(t);r="string"==typeof e.attribute?e.attribute:t}this.hasAttribute(r)&&this.removeAttribute(r),n.set.call(this,e)}};return n.get&&(a.get=function(){return n.get.call(this)}),a}(e,t,i);throw new Error("@ariaProperty only supports TypeScript Decorators")} +/** + * @license + * Copyright 2018 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */var yn={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},wn={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},En=function(e){function o(t){return e.call(this,i(i({},o.defaultAdapter),t))||this}return t(o,e),Object.defineProperty(o,"strings",{get:function(){return wn},enumerable:!1,configurable:!0}),Object.defineProperty(o,"cssClasses",{get:function(){return yn},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!1,configurable:!0}),o.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked(e),this.updateCheckedStyling(e)},o.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(yn.DISABLED):this.adapter.removeClass(yn.DISABLED)},o.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked(t.checked),this.updateCheckedStyling(t.checked)},o.prototype.updateCheckedStyling=function(e){e?this.adapter.addClass(yn.CHECKED):this.adapter.removeClass(yn.CHECKED)},o.prototype.updateAriaChecked=function(e){this.adapter.setNativeControlAttr(wn.ARIA_CHECKED_ATTR,""+!!e)},o}(qt); +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +class Sn extends ri{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.shouldRenderRipple=!1,this.mdcFoundationClass=En,this.rippleHandlers=new zo((()=>(this.shouldRenderRipple=!0,this.ripple)))}changeHandler(e){this.mdcFoundation.handleChange(e),this.checked=this.formElement.checked}createAdapter(){return Object.assign(Object.assign({},ei(this.mdcRoot)),{setNativeControlChecked:e=>{this.formElement.checked=e},setNativeControlDisabled:e=>{this.formElement.disabled=e},setNativeControlAttr:(e,t)=>{this.formElement.setAttribute(e,t)}})}renderRipple(){return this.shouldRenderRipple?N` + + `:""}focus(){const e=this.formElement;e&&(this.rippleHandlers.startFocus(),e.focus())}blur(){const e=this.formElement;e&&(this.rippleHandlers.endFocus(),e.blur())}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}render(){return N` +
+
+
+ ${this.renderRipple()} +
+ +
+
+
`}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}o([ae({type:Boolean}),ci((function(e){this.mdcFoundation.setChecked(e)}))],Sn.prototype,"checked",void 0),o([ae({type:Boolean}),ci((function(e){this.mdcFoundation.setDisabled(e)}))],Sn.prototype,"disabled",void 0),o([_n,ae({attribute:"aria-label"})],Sn.prototype,"ariaLabel",void 0),o([_n,ae({attribute:"aria-labelledby"})],Sn.prototype,"ariaLabelledBy",void 0),o([ce(".mdc-switch")],Sn.prototype,"mdcRoot",void 0),o([ce("input")],Sn.prototype,"formElement",void 0),o([he("mwc-ripple")],Sn.prototype,"ripple",void 0),o([de()],Sn.prototype,"shouldRenderRipple",void 0),o([le({passive:!0})],Sn.prototype,"handleRippleMouseDown",null),o([le({passive:!0})],Sn.prototype,"handleRippleTouchStart",null); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */ +const Cn=l`.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width:48px;height:48px}[dir=rtl] .mdc-switch__thumb-underlay,.mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-14px}.mdc-switch__native-control{width:64px;height:48px}.mdc-switch{display:inline-block;position:relative;outline:none;user-select:none}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000;background-color:var(--mdc-theme-on-surface, #000)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;background-color:var(--mdc-theme-surface, #fff);border-color:#fff;border-color:var(--mdc-theme-surface, #fff)}.mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;margin:0;opacity:0;cursor:pointer;pointer-events:auto;transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-switch__native-control,.mdc-switch__native-control[dir=rtl]{left:initial;right:0}.mdc-switch__track{box-sizing:border-box;width:36px;height:14px;border:1px solid transparent;border-radius:7px;opacity:.38;transition:opacity 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb-underlay{display:flex;position:absolute;align-items:center;justify-content:center;transform:translateX(0);transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1}.mdc-switch--checked .mdc-switch__track{opacity:.54}.mdc-switch--checked .mdc-switch__thumb-underlay{transform:translateX(16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__thumb-underlay,.mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{transform:translateX(-16px)}.mdc-switch--checked .mdc-switch__native-control{transform:translateX(-16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__native-control,.mdc-switch--checked .mdc-switch__native-control[dir=rtl]{transform:translateX(16px)}.mdc-switch--disabled{opacity:.38;pointer-events:none}.mdc-switch--disabled .mdc-switch__thumb{border-width:1px}.mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent}`,In={"mwc-switch":class extends Sn{static get styles(){return Cn}},"mwc-ripple":class extends an{static get styles(){return fn}}}; +/** + * @license + * Copyright 2016 Google Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +var An={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},Tn={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},kn={LABEL_SCALE:.75},On=["pattern","min","max","required","step","minlength","maxlength"],$n=["color","date","datetime-local","month","range","time","week"],Ln=["mousedown","touchstart"],Rn=["click","keydown"],Dn=function(e){function o(t,n){void 0===n&&(n={});var r=e.call(this,i(i({},o.defaultAdapter),t))||this;return r.isFocused=!1,r.receivedUserInput=!1,r.valid=!0,r.useNativeValidation=!0,r.validateOnValueChange=!0,r.helperText=n.helperText,r.characterCounter=n.characterCounter,r.leadingIcon=n.leadingIcon,r.trailingIcon=n.trailingIcon,r.inputFocusHandler=function(){r.activateFocus()},r.inputBlurHandler=function(){r.deactivateFocus()},r.inputInputHandler=function(){r.handleInput()},r.setPointerXOffset=function(e){r.setTransformOrigin(e)},r.textFieldInteractionHandler=function(){r.handleTextFieldInteraction()},r.validationAttributeChangeHandler=function(e){r.handleValidationAttributeChange(e)},r}return t(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return Tn},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return An},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return kn},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"shouldAlwaysFloat",{get:function(){var e=this.getNativeInput().type;return $n.indexOf(e)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),o.prototype.init=function(){var e,t,i,o;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var r=n(Ln),a=r.next();!a.done;a=r.next()){var d=a.value;this.adapter.registerInputInteractionHandler(d,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}try{for(var s=n(Rn),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.registerTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},o.prototype.destroy=function(){var e,t,i,o;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var r=n(Ln),a=r.next();!a.done;a=r.next()){var d=a.value;this.adapter.deregisterInputInteractionHandler(d,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}try{for(var s=n(Rn),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.deregisterTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},o.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput=!0)},o.prototype.handleValidationAttributeChange=function(e){var t=this;e.some((function(e){return On.indexOf(e)>-1&&(t.styleValidity(!0),t.adapter.setLabelRequired(t.getNativeInput().required),!0)})),e.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},o.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*kn.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},o.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},o.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,i=t?t[0]:e,o=i.target.getBoundingClientRect(),n=i.clientX-o.left;this.adapter.setLineRippleTransformOrigin(n)}},o.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},o.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},o.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity(e),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},o.prototype.getValue=function(){return this.getNativeInput().value},o.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput().value=e),this.setcharacterCounter(e.length),this.validateOnValueChange){var t=this.isValid();this.styleValidity(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},o.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},o.prototype.setValid=function(e){this.valid=e,this.styleValidity(e);var t=!e&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},o.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange=e},o.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},o.prototype.setUseNativeValidation=function(e){this.useNativeValidation=e},o.prototype.isDisabled=function(){return this.getNativeInput().disabled},o.prototype.setDisabled=function(e){this.getNativeInput().disabled=e,this.styleDisabled(e)},o.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},o.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},o.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},o.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon&&this.trailingIcon.setAriaLabel(e)},o.prototype.setTrailingIconContent=function(e){this.trailingIcon&&this.trailingIcon.setContent(e)},o.prototype.setcharacterCounter=function(e){if(this.characterCounter){var t=this.getNativeInput().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(e,t)}},o.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},o.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},o.prototype.styleValidity=function(e){var t=o.cssClasses.INVALID;if(e?this.adapter.removeClass(t):this.adapter.addClass(t),this.helperText){if(this.helperText.setValidity(e),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),n=this.helperText.getId();i&&n?this.adapter.setInputAttr(An.ARIA_DESCRIBEDBY,n):this.adapter.removeInputAttr(An.ARIA_DESCRIBEDBY)}},o.prototype.styleFocused=function(e){var t=o.cssClasses.FOCUSED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},o.prototype.styleDisabled=function(e){var t=o.cssClasses,i=t.DISABLED,n=t.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(n)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(e),this.trailingIcon&&this.trailingIcon.setDisabled(e)},o.prototype.styleFloating=function(e){var t=o.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(t):this.adapter.removeClass(t)},o.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},o}(qt),Fn=Dn; +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Mn=St(class extends Ct{constructor(e){if(super(e),e.type!==wt&&e.type!==yt&&e.type!==Et)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===z||t===H)return t;const i=e.element,o=e.name;if(e.type===wt){if(t===i[o])return z}else if(e.type===Et){if(!!t===i.hasAttribute(o))return z}else if(e.type===yt&&i.getAttribute(o)===t+"")return z;return((e,t=_t)=>{e._$AH=t})(e),t}}),Nn=["touchstart","touchmove","scroll","mousewheel"],zn=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)}; +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */class Hn extends li{constructor(){super(...arguments),this.mdcFoundationClass=Fn,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=zn(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&-1!==this.maxLength,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return N` + + ${this.renderHelperText(t,e)} + `}updated(e){e.has("value")&&void 0!==e.get("value")&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":N` + + `}renderOutline(){return this.outlined?N` + + ${this.renderLabel()} + `:""}renderLabel(){return this.label?N` + ${this.label} + `:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(e,t=!1){return N`${e}`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(e,t=!1){return N` + ${e}`}renderInput(e){const t=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,o=this.autocapitalize?this.autocapitalize:void 0,n=this.validationMessage&&!this.isUiValid,r=this.label?"label":void 0,a=e?"helper-text":void 0,d=this.focused||this.helperPersistent||n?"helper-text":void 0;return N` + `}renderLineRipple(){return this.outlined?"":N` + + `}renderHelperText(e,t){const i=this.validationMessage&&!this.isUiValid,o={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},n=this.focused||this.helperPersistent||i?void 0:"true",r=i?this.validationMessage:this.helper;return e?N` +
+
${r}
+ ${this.renderCharCounter(t)} +
`:""}renderCharCounter(e){const t=Math.min(this.value.length,this.maxLength);return e?N` + ${t} / ${this.maxLength}`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.mdcFoundation.setValid(e),this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=zn(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(e,t)=>this.addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>this.removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=new MutationObserver((t=>{e((e=>e.map((e=>e.attributeName)).filter((e=>e)))(t))}));return t.observe(this.formElement,{attributes:!0}),t},deregisterValidationAttributeChangeHandler:e=>e.disconnect()},ei(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(e,t)=>this.formElement.addEventListener(e,t,{passive:e in Nn}),deregisterInputInteractionHandler:(e,t)=>this.formElement.removeEventListener(e,t)}}getLabelAdapterMethods(){return{floatLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(e),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(e),setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:e=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}}}async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await(null===(e=this.outlineElement)||void 0===e?void 0:e.updateComplete),t}firstUpdated(){var e;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(e=this.outlineElement)||void 0===e||e.updateComplete.then((()=>{var e;this.outlineWidth=(null===(e=this.labelElement)||void 0===e?void 0:e.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const e=this.labelElement;if(!e)return void(this.outlineOpen=!1);const t=!!this.label&&!!this.value;if(e.floatingLabelFoundation.float(t),!this.outlined)return;this.outlineOpen=t,await this.updateComplete;const i=e.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}o([ce(".mdc-text-field")],Hn.prototype,"mdcRoot",void 0),o([ce("input")],Hn.prototype,"formElement",void 0),o([ce(".mdc-floating-label")],Hn.prototype,"labelElement",void 0),o([ce(".mdc-line-ripple")],Hn.prototype,"lineRippleElement",void 0),o([ce("mwc-notched-outline")],Hn.prototype,"outlineElement",void 0),o([ce(".mdc-notched-outline__notch")],Hn.prototype,"notchElement",void 0),o([ae({type:String})],Hn.prototype,"value",void 0),o([ae({type:String})],Hn.prototype,"type",void 0),o([ae({type:String})],Hn.prototype,"placeholder",void 0),o([ae({type:String}),ci((function(e,t){void 0!==t&&this.label!==t&&this.layout()}))],Hn.prototype,"label",void 0),o([ae({type:String})],Hn.prototype,"icon",void 0),o([ae({type:String})],Hn.prototype,"iconTrailing",void 0),o([ae({type:Boolean,reflect:!0})],Hn.prototype,"disabled",void 0),o([ae({type:Boolean})],Hn.prototype,"required",void 0),o([ae({type:Number})],Hn.prototype,"minLength",void 0),o([ae({type:Number})],Hn.prototype,"maxLength",void 0),o([ae({type:Boolean,reflect:!0}),ci((function(e,t){void 0!==t&&this.outlined!==t&&this.layout()}))],Hn.prototype,"outlined",void 0),o([ae({type:String})],Hn.prototype,"helper",void 0),o([ae({type:Boolean})],Hn.prototype,"validateOnInitialRender",void 0),o([ae({type:String})],Hn.prototype,"validationMessage",void 0),o([ae({type:Boolean})],Hn.prototype,"autoValidate",void 0),o([ae({type:String})],Hn.prototype,"pattern",void 0),o([ae({type:String})],Hn.prototype,"min",void 0),o([ae({type:String})],Hn.prototype,"max",void 0),o([ae({type:String})],Hn.prototype,"step",void 0),o([ae({type:Number})],Hn.prototype,"size",void 0),o([ae({type:Boolean})],Hn.prototype,"helperPersistent",void 0),o([ae({type:Boolean})],Hn.prototype,"charCounter",void 0),o([ae({type:Boolean})],Hn.prototype,"endAligned",void 0),o([ae({type:String})],Hn.prototype,"prefix",void 0),o([ae({type:String})],Hn.prototype,"suffix",void 0),o([ae({type:String})],Hn.prototype,"name",void 0),o([ae({type:String})],Hn.prototype,"inputMode",void 0),o([ae({type:Boolean})],Hn.prototype,"readOnly",void 0),o([ae({type:String})],Hn.prototype,"autocapitalize",void 0),o([de()],Hn.prototype,"outlineOpen",void 0),o([de()],Hn.prototype,"outlineWidth",void 0),o([de()],Hn.prototype,"isUiValid",void 0),o([de()],Hn.prototype,"focused",void 0),o([le({passive:!0})],Hn.prototype,"handleInputChange",null); +/** + * @license + * Copyright 2021 Google LLC + * SPDX-LIcense-Identifier: Apache-2.0 + */ +const Bn=l`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{content:none}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`,Pn={"mwc-textfield":class extends Hn{static get styles(){return Bn}},"mwc-notched-outline":class extends hn{static get styles(){return vn}}};let Vn=class extends( +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function(e){return class extends e{createRenderRoot(){const e=this.constructor,{registry:t,elementDefinitions:i,shadowRootOptions:o}=e;i&&!t&&(e.registry=new CustomElementRegistry,Object.entries(i).forEach((([t,i])=>e.registry.define(t,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:e.registry});return c(n,this.constructor.elementStyles),n}}}(ie)){constructor(){super(...arguments),this._initialized=!1}setConfig(e){this._config=e,this.loadCardHelpers()}shouldUpdate(){return this._initialized||this._initialize(),!0}get _name(){var e;return(null===(e=this._config)||void 0===e?void 0:e.name)||""}get _hub(){var e;return(null===(e=this._config)||void 0===e?void 0:e.hub)||""}get _selected_schedule(){var e;return(null===(e=this._config)||void 0===e?void 0:e.selected_schedule)||""}get _theme_colors(){var e;return(null===(e=this._config)||void 0===e?void 0:e.theme_colors)||!1}get _show_badges(){var e;return(null===(e=this._config)||void 0===e?void 0:e.show_badges)||!1}get _display_only(){var e;return(null===(e=this._config)||void 0===e?void 0:e.display_only)||!1}get _admin_only(){var e;return(null===(e=this._config)||void 0===e?void 0:e.admin_only)||!1}async loadData(){var e;this.hass&&(this._hubs=await(e=this.hass,e.callWS({type:"wiser/hubs"})),this._schedules=await rt(this.hass,this._hub?this._hub:this._hubs[0]))}render(){return this.hass&&this._helpers&&this._config&&this._hubs&&this._schedules?N` + ${this.hubSelector()} + e.stopPropagation()} + > + + ${this._schedules.map((e=>N`${e.Name}`))} + + + + + + + + +
+ + + + + + +
+
+ Version: ${"1.1.0"} +
+ `:N``}hubSelector(){var e;const t=this._hubs?this._hubs:[];return t.length>1?N` + e.stopPropagation()} + > + ${null===(e=this._hubs)||void 0===e?void 0:e.map((e=>N`${e}`))} + + `:N``}_initialize(){void 0!==this.hass&&void 0!==this._config&&void 0!==this._helpers&&(this._initialized=!0)}async loadCardHelpers(){this._helpers=await window.loadCardHelpers(),await this.loadData()}_valueChanged(e){if(!this._config||!this.hass)return;const t=e.target;if(this[`_${t.configValue}`]!==t.value){if(t.configValue)if(""===t.value){const e=Object.assign({},this._config);delete e[t.configValue],this._config=e}else this._config=Object.assign(Object.assign({},this._config),{[t.configValue]:void 0!==t.checked?t.checked:t.value});"hub"===t.configValue&&(this._config.selected_schedule=""),Ne(this,"config-changed",{config:this._config})}}};Vn.elementDefinitions=Object.assign(Object.assign(Object.assign(Object.assign({},Pn),xn),In),ui),Vn.styles=l` + mwc-select, + mwc-textfield { + margin-bottom: 16px; + display: block; + } + mwc-formfield { + padding-bottom: 20px; + display: flex; + } + mwc-switch { + --mdc-theme-secondary: var(--switch-checked-color); + } + `,o([ae({attribute:!1})],Vn.prototype,"hass",void 0),o([de()],Vn.prototype,"_config",void 0),o([de()],Vn.prototype,"_helpers",void 0),o([de()],Vn.prototype,"_hubs",void 0),o([de()],Vn.prototype,"_schedules",void 0),Vn=o([ne("wiser-schedule-card-editor")],Vn),console.info(`%c WISER-SCHEDULE-CARD \n%c ${it("common.version")} 1.1.0 `,"color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),window.customCards=window.customCards||[],window.customCards.push({type:"wiser-schedule-card",name:"Wiser Schedule Card",description:"A card to manage Wiser schedules"});let Un=class extends ie{constructor(){super(),this._view=Be.Overview,this.translationsLoaded=!0,this.component_loaded=!1,this._schedule_id=0,this._schedule_type="heating",this.initialise()}static async getConfigElement(){return document.createElement("wiser-schedule-card-editor")}static getStubConfig(){return{}}setConfig(e){if(!e)throw new Error(it("common.invalid_configuration"));e.test_gui&&function(){var e=document.querySelector("home-assistant");if(e=(e=(e=(e=(e=(e=(e=(e=e&&e.shadowRoot)&&e.querySelector("home-assistant-main"))&&e.shadowRoot)&&e.querySelector("app-drawer-layout partial-panel-resolver"))&&e.shadowRoot||e)&&e.querySelector("ha-panel-lovelace"))&&e.shadowRoot)&&e.querySelector("hui-root")){var t=e.lovelace;return t.current_view=e.___curView,t}return null}().setEditMode(!0),this.config=Object.assign({name:"Wiser Schedule"},e)}set hass(e){this._hass=e}async initialise(){return await this.isComponentLoaded()&&(this.component_loaded=!0),this.processConfigSchedule(),!0}async isComponentLoaded(){for(;!this._hass||!this._hass.config.components.includes("wiser");)await new Promise((e=>setTimeout(e,100)));return!0}processConfigSchedule(){this.config.selected_schedule?(this._schedule_type=this.config.selected_schedule.split("|")[0],this._schedule_id=parseInt(this.config.selected_schedule.split("|")[1]),this._view=Be.ScheduleEdit):(this._schedule_type="",this._schedule_id=0,this._view=Be.Overview)}getCardSize(){return 9}shouldUpdate(e){return!(!this.config||!this.component_loaded)&&(e.has("config")&&this.processConfigSchedule(),!!e.has("component_loaded")||(!!e.has("_view")||(!!e.has("_schedule_list")||ze(this,e,!1))))}async _handleEvent(e){if("wiser_update_received"===e.event_type){const e=new CustomEvent("wiser-update",{});this.dispatchEvent(e)}}render(){return this._hass&&this.config&&this.translationsLoaded?this._view==Be.Overview?N` + + `:this._view==Be.ScheduleEdit&&this._schedule_id?N` + + `:this._view==Be.ScheduleAdd?N` + + `:this._view==Be.ScheduleCopy?N` + + `:this._view==Be.ScheduleRename?N` + + `:N``:N``}_scheduleClick(e){this._schedule_type=e.detail.schedule_type,this._schedule_id=e.detail.schedule_id,this._view=Be.ScheduleEdit}_addScheduleClick(){this._view=Be.ScheduleAdd}_renameClick(){this._view=Be.ScheduleRename}_editClick(){this._view=Be.ScheduleEdit}_copyClick(){this._view=Be.ScheduleCopy}_backClick(e){e.detail?this._view=e.detail:this._view=Be.Overview}_scheduleDeleted(){this._view=Be.Overview}_scheduleAdded(){this._view=Be.Overview}_scheduleCopied(){this._view=Be.ScheduleEdit}_scheduleRenamed(){this._view=Be.ScheduleEdit}};o([ae({attribute:!1})],Un.prototype,"_hass",void 0),o([de()],Un.prototype,"config",void 0),o([de()],Un.prototype,"_view",void 0),o([de()],Un.prototype,"translationsLoaded",void 0),o([de()],Un.prototype,"component_loaded",void 0),o([de()],Un.prototype,"_schedule_id",void 0),o([de()],Un.prototype,"_schedule_type",void 0),Un=o([ne("wiser-schedule-card")],Un);export{Un as WiserScheduleCard}; diff --git a/custom_components/wiser/light.py b/custom_components/wiser/light.py index 13c3c85..d12aa07 100644 --- a/custom_components/wiser/light.py +++ b/custom_components/wiser/light.py @@ -1,5 +1,6 @@ """Support for Wiser lights via Wiser Hub""" +import asyncio import logging from homeassistant.components.light import ( @@ -42,37 +43,36 @@ class WiserLight(LightEntity, WiserScheduleEntity): def __init__(self, data, light_id): """Initialize the sensor.""" self._data = data - self._light_id = light_id - self._light = self._data.wiserhub.devices.lights.get_by_id(light_id) - self._device_id = self._light.id - self._device_type_id = self._light.device_type_id - self._schedule = self._light.schedule + self._device_id = light_id + self._device = self._data.wiserhub.devices.lights.get_by_id(self._device_id) + self._schedule = self._device.schedule _LOGGER.info(f"{self._data.wiserhub.system.name} {self.name} init") async def async_force_update(self): - _LOGGER.debug(f"{self._light.name} requested hub update") + _LOGGER.debug(f"{self._device.name} requested hub update") + await asyncio.sleep(2) await self._data.async_update(no_throttle=True) async def async_update(self): """Async Update method .""" _LOGGER.debug(f"Wiser {self.name} Light Update requested") - self._light = self._data.wiserhub.devices.lights.get_by_id(self._light_id) - self._schedule = self._light.schedule + self._device = self._data.wiserhub.devices.lights.get_by_id(self._device_id) + self._schedule = self._device.schedule @property def is_on(self): """Return the boolean response if the node is on.""" - return self._light.is_on + return self._device.is_on @property def name(self): """Return the name of the Device.""" - return f"{get_device_name(self._data, self._light.id)} Light" + return f"{get_device_name(self._data, self._device.id)} Light" @property def icon(self): """Return icon.""" - if self._light.mode == "Auto": + if self._device.mode == "Auto": return "mdi:lightbulb-auto" if self.is_on else "mdi:lightbulb-auto-outline" else: return "mdi:lightbulb" if self.is_on else "mdi:lightbulb-outline" @@ -90,14 +90,14 @@ def should_poll(self): def device_info(self): """Return device specific attributes.""" return { - "name": get_device_name(self._data, self._light.id), - "identifiers": {(DOMAIN, get_identifier(self._data, self._light.id))}, + "name": get_device_name(self._data, self._device_id), + "identifiers": {(DOMAIN, get_identifier(self._data, self._device_id))}, "manufacturer": MANUFACTURER, - "model": self._data.wiserhub.devices.get_by_id(self._light_id).model, - "sw_version": self._light.firmware_version, - "serial_number" : self._data.wiserhub.devices.get_by_id(self._light_id).serial_number, - "product_type": self._light.product_type, - "product_identifier": self._light.product_identifier, + "model": self._data.wiserhub.devices.get_by_id(self._device_id).model, + "sw_version": self._device.firmware_version, + "serial_number" : self._data.wiserhub.devices.get_by_id(self._device_id).serial_number, + "product_type": self._device.product_type, + "product_identifier": self._device.product_identifier, "via_device": (DOMAIN, self._data.wiserhub.system.name), } @@ -106,39 +106,39 @@ def extra_state_attributes(self): """Return state attributes.""" attrs = {} # Room - if self._data.wiserhub.rooms.get_by_id(self._light.room_id) is not None: - attrs["room"] = self._data.wiserhub.rooms.get_by_id(self._light.room_id).name + if self._data.wiserhub.rooms.get_by_id(self._device.room_id) is not None: + attrs["room"] = self._data.wiserhub.rooms.get_by_id(self._device.room_id).name else: attrs["room"] = "Unassigned" # Identification - attrs["name"] = self._light.name - attrs["model"] = self._light.model - attrs["product_type"] = self._light.product_type - attrs["product_identifier"] = self._light.product_identifier - attrs["product_model"] = self._light.product_model - attrs["serial_number"] = self._light.serial_number - attrs["firmware"] = self._light.firmware_version + attrs["name"] = self._device.name + attrs["model"] = self._device.model + attrs["product_type"] = self._device.product_type + attrs["product_identifier"] = self._device.product_identifier + attrs["product_model"] = self._device.product_model + attrs["serial_number"] = self._device.serial_number + attrs["firmware"] = self._device.firmware_version # Settings - attrs["is_dimmable"] = self._light.is_dimmable - attrs["mode"] = self._light.mode - attrs["away_mode_action"] = self._light.away_mode_action + attrs["is_dimmable"] = self._device.is_dimmable + attrs["mode"] = self._device.mode + attrs["away_mode_action"] = self._device.away_mode_action #Command State - attrs["control_source"] = self._light.control_source + attrs["control_source"] = self._device.control_source #Status - attrs["current_state"] = self._light.current_state - attrs["target_state"] = self._light.target_state + attrs["current_state"] = self._device.current_state + attrs["target_state"] = self._device.target_state #Schedule - attrs["schedule_id"] = self._light.schedule_id - if self._light.schedule: - attrs["schedule_name"] = self._light.schedule.name - attrs["next_day_change"] = str(self._light.schedule.next.day) - attrs["next_schedule_change"] = str(self._light.schedule.next.time) - attrs["next_schedule_state"] = self._light.schedule.next.setting + attrs["schedule_id"] = self._device.schedule_id + if self._device.schedule: + attrs["schedule_name"] = self._device.schedule.name + attrs["next_day_change"] = str(self._device.schedule.next.day) + attrs["next_schedule_change"] = str(self._device.schedule.next.time) + attrs["next_schedule_state"] = self._device.schedule.next.setting return attrs @@ -148,11 +148,11 @@ async def async_turn_on(self, **kwargs): if ATTR_BRIGHTNESS in kwargs: brightness = int(kwargs[ATTR_BRIGHTNESS]) await self.hass.async_add_executor_job( - setattr, self._light, "current_percentage", round((brightness / 255) * 100) + setattr, self._device, "current_percentage", round((brightness / 255) * 100) ) else: await self.hass.async_add_executor_job( - self._light.turn_on + self._device.turn_on ) await self.async_force_update() return True @@ -160,7 +160,7 @@ async def async_turn_on(self, **kwargs): async def async_turn_off(self, **kwargs): """Turn light off.""" await self.hass.async_add_executor_job( - self._light.turn_off + self._device.turn_off ) await self.async_force_update() return True @@ -193,7 +193,7 @@ def supported_features(self): @property def brightness(self): """Return the brightness of this light between 0..100.""" - return round((self._light.current_percentage / 100) * 255) + return round((self._device.current_percentage / 100) * 255) @property def extra_state_attributes(self): @@ -201,19 +201,19 @@ def extra_state_attributes(self): attrs = super().extra_state_attributes # Settings - attrs["output_range_min"] = self._light.output_range.minimum - attrs["output_range_max"] = self._light.output_range.maximum + attrs["output_range_min"] = self._device.output_range.minimum + attrs["output_range_max"] = self._device.output_range.maximum #Status - attrs["current_percentage"] = self._light.current_percentage - attrs["current_level"] = self._light.current_level - attrs["target_percentage"] = self._light.target_percentage - attrs["manual_level"] = self._light.manual_level - attrs["override_level"] = self._light.override_level + attrs["current_percentage"] = self._device.current_percentage + attrs["current_level"] = self._device.current_level + attrs["target_percentage"] = self._device.target_percentage + attrs["manual_level"] = self._device.manual_level + attrs["override_level"] = self._device.override_level #Schedule - if self._light.schedule: + if self._device.schedule: del attrs["next_schedule_state"] - attrs["next_schedule_percentage"] = self._light.schedule.next.setting + attrs["next_schedule_percentage"] = self._device.schedule.next.setting return attrs \ No newline at end of file diff --git a/custom_components/wiser/manifest.json b/custom_components/wiser/manifest.json index 139c747..7f129a0 100755 --- a/custom_components/wiser/manifest.json +++ b/custom_components/wiser/manifest.json @@ -5,9 +5,16 @@ "config_flow": true, "documentation": "https://github.com/asantaga/wiserHomeAssistantPlatform/blob/master/Readme.Md", "issue_tracker": "https://github.com/asantaga/wiserHomeAssistantPlatform/issues", - "dependencies": [], + "dependencies": [ + "http", + "websocket_api", + "frontend", + "persistent_notification", + "lovelace", + "hacs" + ], "codeowners": ["@asantaga", "@msp1974"], - "version": "3.0.24", - "requirements": ["wiserHeatAPIv2==0.0.32"], + "version": "3.1.0", + "requirements": ["wiserHeatAPIv2==0.0.37"], "zeroconf": [{"type":"_http._tcp.local.","name":"wiser*"}] } diff --git a/custom_components/wiser/number.py b/custom_components/wiser/number.py index 6b9540f..98e9872 100644 --- a/custom_components/wiser/number.py +++ b/custom_components/wiser/number.py @@ -30,23 +30,15 @@ def __init__(self, data, name): """Initialize the sensor.""" self._data = data self._name = name + self._attr_native_min_value = TEMP_MINIMUM + self._attr_native_max_value = TEMP_MAXIMUM _LOGGER.info(f"Away Mode target temperature initalise") async def async_force_update(self): await self._data.async_update(no_throttle=True) @property - def min_value(self) -> float: - """Return the minimum value.""" - return TEMP_MINIMUM - - @property - def max_value(self) -> float: - """Return the maximum value.""" - return TEMP_MAXIMUM - - @property - def step(self) -> float: + def native_step(self) -> float: return 0.5 @property @@ -82,7 +74,7 @@ def device_info(self): } @property - def value(self) -> float: + def native_value(self) -> float: """Return the entity value to represent the entity state.""" return self._data.wiserhub.system.away_mode_target_temperature @@ -92,7 +84,7 @@ def set_value(self, value: float) -> None: self._data.wiserhub.system.away_mode_target_temperature = value self.hass.async_create_task(self.async_force_update()) - async def async_set_value(self, value: float) -> None: + async def async_set_native_value(self, value: float) -> None: """Set new value.""" await self.hass.async_add_executor_job(self.set_value, value) diff --git a/custom_components/wiser/schedules.py b/custom_components/wiser/schedules.py index 3c5ad46..ca32d59 100644 --- a/custom_components/wiser/schedules.py +++ b/custom_components/wiser/schedules.py @@ -1,4 +1,6 @@ import logging +import enum +import json from homeassistant.core import callback from wiserHeatAPIv2.schedule import WiserScheduleTypeEnum @@ -69,7 +71,7 @@ def assign_schedule_to_another_entity(self, to_entity)-> None: else: to_entity_name = to_entity._data.wiserhub.devices.get_by_id(to_entity._device_id).name entity_name = self._data.wiserhub.devices.get_by_id(self._device_id).name - to_id = to_entity._device_type_id + to_id = to_entity._device.device_type_id _LOGGER.info(f"Assigning {entity_name} schedule to {to_entity_name}") self.hass.async_add_executor_job( @@ -191,3 +193,5 @@ async def async_advance_schedule(self) -> None: self._room.schedule_advance ) await self.async_force_update() + + diff --git a/custom_components/wiser/select.py b/custom_components/wiser/select.py index b9ef616..c35d2b0 100644 --- a/custom_components/wiser/select.py +++ b/custom_components/wiser/select.py @@ -187,32 +187,31 @@ class WiserSmartPlugModeSelect(WiserSelectEntity,WiserScheduleEntity ): def __init__(self, data, smartplug_id): """Initialize the sensor.""" - self._smartplug_id = smartplug_id + self._device_id = smartplug_id super().__init__(data) - self._device_id = self._smartplug_id - self._smartplug = self._data.wiserhub.devices.smartplugs.get_by_id(self._smartplug_id) - self._options = self._smartplug.available_modes - self._schedule = self._smartplug.schedule + self._device = self._data.wiserhub.devices.smartplugs.get_by_id(self._device_id) + self._options = self._device.available_modes + self._schedule = self._device.schedule async def async_update(self): """Async update method.""" - self._smartplug = self._data.wiserhub.devices.smartplugs.get_by_id(self._smartplug_id) - self._schedule = self._smartplug.schedule + self._device = self._data.wiserhub.devices.smartplugs.get_by_id(self._device_id) + self._schedule = self._device.schedule @property def name(self): """Return Name of device.""" - return f"{get_device_name(self._data, self._smartplug_id)} Mode" + return f"{get_device_name(self._data, self._device_id)} Mode" @property def current_option(self) -> str: - return self._smartplug.mode + return self._device.mode def select_option(self, option: str) -> None: if option and option in self._options: _LOGGER.debug("Setting smartplug mode to {option}") - self._smartplug.mode = option + self._device.mode = option self.hass.async_create_task(self.async_force_update()) else: _LOGGER.error(f"{option} is not a valid Smart Plug mode. Please choose from {self._options}") @@ -220,23 +219,23 @@ def select_option(self, option: str) -> None: @property def unique_id(self): """Return unique ID for the plug.""" - return get_unique_id(self._data, self._smartplug.product_type, "mode-select", self._smartplug_id) + return get_unique_id(self._data, self._device.product_type, "mode-select", self._device_id) @property def device_info(self): """Return device specific attributes.""" return { - "name": get_device_name(self._data, self._smartplug_id), - "identifiers": {(DOMAIN, get_identifier(self._data, self._smartplug_id))}, + "name": get_device_name(self._data, self._device_id), + "identifiers": {(DOMAIN, get_identifier(self._data, self._device_id))}, "manufacturer": MANUFACTURER, - "model": self._smartplug.product_type, - "sw_version": self._smartplug.firmware_version, + "model": self._device.product_type, + "sw_version": self._device.firmware_version, "via_device": (DOMAIN, self._data.wiserhub.system.name), } @callback async def async_set_mode(self, mode): - _LOGGER.info(f"Setting {self._smartplug.name} to {mode} mode") + _LOGGER.info(f"Setting {self._device.name} to {mode} mode") await self.hass.async_add_executor_job( self.select_option, mode ) @@ -247,56 +246,54 @@ class WiserLightModeSelect(WiserSelectEntity,WiserScheduleEntity ): def __init__(self, data, light_id): """Initialize the sensor.""" - self._light_id = light_id + self._device_id = light_id super().__init__(data) - self._light = self._data.wiserhub.devices.lights.get_by_id(self._light_id) - self._device_id = self._light.id - self._device_type_id = self._light.device_type_id - self._options = self._light.available_modes - self._schedule = self._light.schedule + self._device = self._data.wiserhub.devices.lights.get_by_id(self._device_id) + self._options = self._device.available_modes + self._schedule = self._device.schedule _LOGGER.info(f"{self._data.wiserhub.system.name} {self.name} init") async def async_update(self): """Async update method.""" - self._light = self._data.wiserhub.devices.lights.get_by_id(self._light_id) - self._schedule = self._light.schedule + self._device = self._data.wiserhub.devices.lights.get_by_id(self._device_id) + self._schedule = self._device.schedule @property def name(self): """Return Name of device.""" - return f"{get_device_name(self._data, self._light_id)} Mode" + return f"{get_device_name(self._data, self._device_id)} Mode" @property def current_option(self) -> str: - return self._light.mode + return self._device.mode def select_option(self, option: str) -> None: _LOGGER.debug("Setting light mode to {option}") - self._light.mode = option + self._device.mode = option self.hass.async_create_task(self.async_force_update()) @property def unique_id(self): """Return unique ID for the plug.""" - return get_unique_id(self._data, self._light.product_type, "mode-select", self._light_id) + return get_unique_id(self._data, self._device.product_type, "mode-select", self._device_id) @property def device_info(self): """Return device specific attributes.""" return { - "name": get_device_name(self._data, self._light_id), - "identifiers": {(DOMAIN, get_identifier(self._data, self._light_id))}, + "name": get_device_name(self._data, self._device_id), + "identifiers": {(DOMAIN, get_identifier(self._data, self._device_id))}, "manufacturer": MANUFACTURER, - "model": self._light.product_type, - "sw_version": self._light.firmware_version, + "model": self._device.product_type, + "sw_version": self._device.firmware_version, "via_device": (DOMAIN, self._data.wiserhub.system.name), } @callback async def async_set_mode(self, mode): - _LOGGER.info(f"Setting {self._light.name} to {mode} mode") + _LOGGER.info(f"Setting {self._device.name} to {mode} mode") await self.hass.async_add_executor_job( self.select_option, mode ) @@ -308,56 +305,54 @@ class WiserShutterModeSelect(WiserSelectEntity,WiserScheduleEntity ): def __init__(self, data, shutter_id): """Initialize the sensor.""" - self._shutter_id = shutter_id + self._device_id = shutter_id super().__init__(data) - self._shutter = self._data.wiserhub.devices.shutters.get_by_id(self._shutter_id) - self._device_id = self._shutter.id - self._device_type_id = self._shutter.device_type_id - self._options = self._shutter.available_modes - self._schedule = self._shutter.schedule + self._device = self._data.wiserhub.devices.shutters.get_by_id(self._device_id) + self._options = self._device.available_modes + self._schedule = self._device.schedule _LOGGER.info(f"{self._data.wiserhub.system.name} {self.name} init") async def async_update(self): """Async update method.""" - self._shutter = self._data.wiserhub.devices.shutters.get_by_id(self._shutter_id) - self._schedule = self._shutter.schedule + self._device = self._data.wiserhub.devices.shutters.get_by_id(self._device_id) + self._schedule = self._device.schedule @property def name(self): """Return Name of device.""" - return f"{get_device_name(self._data, self._shutter_id)} Mode" + return f"{get_device_name(self._data, self._device_id)} Mode" @property def current_option(self) -> str: - return self._shutter.mode + return self._device.mode def select_option(self, option: str) -> None: _LOGGER.debug("Setting shutter mode to {option}") - self._shutter.mode = option + self._device.mode = option self.hass.async_create_task(self.async_force_update()) @property def unique_id(self): """Return unique ID for the plug.""" - return get_unique_id(self._data, self._shutter.product_type, "mode-select", self._shutter_id) + return get_unique_id(self._data, self._device.product_type, "mode-select", self._device_id) @property def device_info(self): """Return device specific attributes.""" return { - "name": get_device_name(self._data, self._shutter_id), - "identifiers": {(DOMAIN, get_identifier(self._data, self._shutter_id))}, + "name": get_device_name(self._data, self._device_id), + "identifiers": {(DOMAIN, get_identifier(self._data, self._device_id))}, "manufacturer": MANUFACTURER, - "model": self._shutter.product_type, - "sw_version": self._shutter.firmware_version, + "model": self._device.product_type, + "sw_version": self._device.firmware_version, "via_device": (DOMAIN, self._data.wiserhub.system.name), } @callback async def async_set_mode(self, mode): - _LOGGER.info(f"Setting {self._shutter.name} to {mode} mode") + _LOGGER.info(f"Setting {self._device.name} to {mode} mode") await self.hass.async_add_executor_job( self.select_option, mode ) diff --git a/custom_components/wiser/switch.py b/custom_components/wiser/switch.py index 1bf5b2a..af2fa37 100755 --- a/custom_components/wiser/switch.py +++ b/custom_components/wiser/switch.py @@ -380,11 +380,11 @@ class WiserSmartPlugSwitch(WiserSwitch, WiserScheduleEntity): def __init__(self, data, plugId, name): """Initialize the sensor.""" self._name = name - self._smart_plug_id = plugId + self._device_id = plugId super().__init__(data, name, "", "smartplug", "mdi:power-socket-uk") - self._smartplug = self._data.wiserhub.devices.get_by_id(self._smart_plug_id) - self._schedule = self._smartplug.schedule - self._is_on = self._smartplug.is_on + self._device = self._data.wiserhub.devices.get_by_id(self._device_id) + self._schedule = self._device.schedule + self._is_on = self._device.is_on async def async_force_update(self): await asyncio.sleep(2) @@ -393,34 +393,34 @@ async def async_force_update(self): async def async_update(self): """Async Update to HA.""" _LOGGER.debug(f"Wiser {self.name} Switch Update requested") - self._smartplug = self._data.wiserhub.devices.get_by_id(self._smart_plug_id) - self._schedule = self._smartplug.schedule - self._is_on = self._smartplug.is_on + self._device = self._data.wiserhub.devices.get_by_id(self._device_id) + self._schedule = self._device.schedule + self._is_on = self._device.is_on @property def name(self): """Return the name of the Device.""" - return f"{get_device_name(self._data, self._smart_plug_id)} Switch" + return f"{get_device_name(self._data, self._device_id)} Switch" @property def unique_id(self): """Return unique Id.""" return get_unique_id( self._data, - self._smartplug.product_type, + self._device.product_type, self.name, - self._smart_plug_id + self._device_id ) @property def device_info(self): """Return device specific attributes.""" return { - "name": get_device_name(self._data, self._smart_plug_id), - "identifiers": {(DOMAIN, get_identifier(self._data, self._smart_plug_id))}, + "name": get_device_name(self._data, self._device_id), + "identifiers": {(DOMAIN, get_identifier(self._data, self._device_id))}, "manufacturer": MANUFACTURER, - "model": self._smartplug.product_type, - "sw_version": self._smartplug.firmware_version, + "model": self._device.product_type, + "sw_version": self._device.firmware_version, "via_device": (DOMAIN, self._data.wiserhub.system.name), } @@ -428,30 +428,30 @@ def device_info(self): def extra_state_attributes(self): """Return set of device state attributes.""" attrs = {} - attrs["control_source"] = self._smartplug.control_source - attrs["manual_state"] = self._smartplug.manual_state - attrs["mode"] = self._smartplug.mode - attrs["name"] = self._smartplug.name - attrs["output_state"] = "On" if self._smartplug.is_on else "Off" + attrs["control_source"] = self._device.control_source + attrs["manual_state"] = self._device.manual_state + attrs["mode"] = self._device.mode + attrs["name"] = self._device.name + attrs["output_state"] = "On" if self._device.is_on else "Off" # Switches could be not allocated to room (issue:209) - if self._data.wiserhub.rooms.get_by_id(self._smartplug.room_id) is not None: - attrs["room"] = self._data.wiserhub.rooms.get_by_id(self._smartplug.room_id).name + if self._data.wiserhub.rooms.get_by_id(self._device.room_id) is not None: + attrs["room"] = self._data.wiserhub.rooms.get_by_id(self._device.room_id).name else: attrs["room"] = "Unassigned" - attrs["away_mode_action"] = self._smartplug.away_mode_action - attrs["scheduled_state"] = self._smartplug.scheduled_state - attrs["schedule_id"] = self._smartplug.schedule_id - if self._smartplug.schedule: - attrs["schedule_name"] = self._smartplug.schedule.name - attrs["next_day_change"] = str(self._smartplug.schedule.next.day) - attrs["next_schedule_change"] = str(self._smartplug.schedule.next.time) - attrs["next_schedule_state"] = self._smartplug.schedule.next.setting + attrs["away_mode_action"] = self._device.away_mode_action + attrs["scheduled_state"] = self._device.scheduled_state + attrs["schedule_id"] = self._device.schedule_id + if self._device.schedule: + attrs["schedule_name"] = self._device.schedule.name + attrs["next_day_change"] = str(self._device.schedule.next.day) + attrs["next_schedule_change"] = str(self._device.schedule.next.time) + attrs["next_schedule_state"] = self._device.schedule.next.setting return attrs async def async_turn_on(self, **kwargs): """Turn the device on.""" await self.hass.async_add_executor_job( - self._smartplug.turn_on + self._device.turn_on ) await self.async_force_update() return True @@ -459,7 +459,7 @@ async def async_turn_on(self, **kwargs): async def async_turn_off(self, **kwargs): """Turn the device off.""" await self.hass.async_add_executor_job( - self._smartplug.turn_off + self._device.turn_off ) await self.async_force_update() return True diff --git a/custom_components/wiser/websockets.py b/custom_components/wiser/websockets.py new file mode 100644 index 0000000..d06fe38 --- /dev/null +++ b/custom_components/wiser/websockets.py @@ -0,0 +1,501 @@ +import enum +import logging +import voluptuous as vol +from homeassistant.helpers import config_validation as cv +from homeassistant.components import websocket_api +from homeassistant.core import callback +from homeassistant.components.websocket_api import async_register_command, ActiveConnection, decorators +from wiserHeatAPIv2.schedule import WiserScheduleTypeEnum +from homeassistant.helpers.dispatcher import async_dispatcher_connect +from homeassistant.components.http import HomeAssistantView +from . import const + +_LOGGER = logging.getLogger(__name__) + +@callback +@websocket_api.websocket_command( + { + vol.Required("type"): "wiser_updated", + } +) +@websocket_api.async_response +async def handle_subscribe_updates(hass, connection, msg): + """subscribe listeners when frontend connection is opened""" + + listeners = [] + + @callback + def async_handle_event_wiser_update(): + """pass data to frontend when backend changes""" + connection.send_message( + { + "id": msg["id"], + "type": "event", + "event": { # data to pass with event + "event": 'wiser_updated' + }, + } + ) + + listeners.append( + async_dispatcher_connect( + hass, 'wiser_update_received', async_handle_event_wiser_update + ) + ) + + def unsubscribe_listeners(): + """unsubscribe listeners when frontend connection closes""" + while len(listeners): + listeners.pop()() + + connection.subscriptions[msg["id"]] = unsubscribe_listeners + connection.send_result(msg["id"]) + + +async def async_register_websockets(hass, data): + def get_hub_name(config_entry_id): + try: + api = hass.data[const.DOMAIN][config_entry_id]["data"] + return api.wiserhub.system.name + except: + return None + + def get_api_for_hub(hub: str): + if hub: + for entry_id in hass.data[const.DOMAIN]: + if hass.data[const.DOMAIN][entry_id]["data"].wiserhub.system.name == hub: + return hass.data[const.DOMAIN][entry_id]["data"] + return None + else: + for entry_id in hass.data[const.DOMAIN]: + return hass.data[const.DOMAIN][entry_id]["data"] + + def get_entity_from_entity_id(entity: str): + """Get wiser entity from entity_id""" + domain = entity.split(".", 1)[0] + entity_comp = hass.data.get("entity_components", {}).get(domain) + if entity_comp: + return entity_comp.get_entity(entity) + return None + + + # Get Hubs + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/hubs".format(const.DOMAIN), + } + ) + @websocket_api.async_response + async def websocket_get_hubs( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Publish schedules list data.""" + output = [] + for entry in hass.data[const.DOMAIN]: + output.append(get_hub_name(entry)) + + #output = output.sort() + connection.send_result(msg["id"], output) + + + # Get sunrise and sunset times + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/suntimes".format(const.DOMAIN), + vol.Optional("hub"): str, + } + ) + @websocket_api.async_response + async def websocket_get_suntimes( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Publish schedules list data.""" + d = get_api_for_hub(msg.get("hub")) + if d: + sunrises = [] + for key, value in d.wiserhub.system.sunrise_times.items(): + sunrises.append({"day": key, "time": value}) + sunsets = [] + for key, value in d.wiserhub.system.sunset_times.items(): + sunsets.append({"day": key, "time": value}) + + output = {"Sunrises": sunrises, "Sunsets": sunsets} + connection.send_result(msg["id"], output) + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + # Get schedules list + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedules".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Optional("schedule_type"): str, + } + ) + @websocket_api.async_response + async def websocket_get_schedules( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Publish schedules list data.""" + output = [] + schedule_type = msg.get("schedule_type","") + d = get_api_for_hub(msg.get("hub")) + if d: + schedules = d.wiserhub.schedules.all + for schedule in schedules: + if schedule.schedule_type == schedule_type or not schedule_type: + output.append({"Id": schedule.id, "Type": schedule.schedule_type, "Name": schedule.name, "Assignments": len(schedule.assignment_ids)}) + + connection.send_result(msg["id"], sorted(output, key=lambda n: n['Name'])) + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + # Get schedules types for hub + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedules/types".format(const.DOMAIN), + vol.Optional("hub"): str, + } + ) + @websocket_api.async_response + async def websocket_get_schedule_types( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Publish supported schedule type list data.""" + output = ["Heating"] + d = get_api_for_hub(msg.get("hub")) + if d: + for cap, value in d.wiserhub.system.capabilities.all.items(): + if cap == 'SmartPlug' and value == True: + output.append("OnOff") + if cap == 'Light' and value == True: + output.append("Lighting") + if cap == 'Shutter' and value == True: + output.append("Shutters") + + connection.send_result(msg["id"], output) + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + #Get schedule by id + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedule/id".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Required("schedule_type"): str, + vol.Required("schedule_id"): vol.Coerce(int), + } + ) + @websocket_api.async_response + async def websocket_get_schedule_by_id( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Publish schedule data.""" + schedule_type = str(msg.get("schedule_type")).lower() + schedule_id = msg.get("schedule_id") + d = get_api_for_hub(msg.get("hub")) + if d: + schedule_type_enum = WiserScheduleTypeEnum[schedule_type] + schedule = d.wiserhub.schedules.get_by_id(schedule_type_enum, schedule_id) + if schedule: + schedule = schedule.ws_schedule_data + connection.send_result(msg["id"], schedule) + else: + connection.send_error(msg["id"], "wiser error", f"Unable to get schedule. Schedule with id {schedule_id} of type {schedule_type} not found") + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + + #Get list of rooms + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/rooms".format(const.DOMAIN), + vol.Optional("hub"): str + } + ) + @websocket_api.async_response + async def websocket_get_rooms( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Publish room list""" + d = get_api_for_hub(msg.get("hub")) + if d: + rooms = d.wiserhub.rooms.all + room_list = [] + for room in rooms: + room_list.append({"Id": room.id, "Name":room.name}) + connection.send_result(msg["id"], sorted(room_list, key=lambda n: n['Name'])) + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + # Get list of devices + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/devices".format(const.DOMAIN), + vol.Required("device_type"): str, + vol.Optional("hub"): str + } + ) + @websocket_api.async_response + async def websocket_get_devices( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Publish device list""" + d = get_api_for_hub(msg.get("hub")) + devices = None + if d: + if msg["device_type"].lower() == 'onoff': + devices = d.wiserhub.devices.smartplugs.all + if msg["device_type"].lower() == 'shutters': + devices = d.wiserhub.devices.shutters.all + if msg["device_type"].lower() == 'lighting': + devices = d.wiserhub.devices.lights.all + + device_list = [] + if devices: + for device in devices: + device_list.append({"Id": device.device_type_id, "Name":device.name}) + connection.send_result(msg["id"], sorted(device_list, key=lambda n: n['Name'])) + else: + connection.send_result(msg["id"], []) + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + + # Assign schedule + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedule/assign".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Required("schedule_type"): str, + vol.Required("schedule_id"): int, + vol.Required("entity_id"): str, + vol.Optional("remove"): bool + } + ) + @websocket_api.async_response + async def websocket_assign_schedule( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Assign schedule to room/device""" + remove = msg.get("remove", False) + schedule_type = str(msg.get("schedule_type")).lower() + if schedule_type in ['lighting','shutters']: schedule_type = 'level' + schedule_id = msg.get("schedule_id") + d = get_api_for_hub(msg.get("hub")) + if d: + schedule_type_enum = WiserScheduleTypeEnum[schedule_type] + schedule = d.wiserhub.schedules.get_by_id(schedule_type_enum, schedule_id) + if schedule: + if not remove: + await hass.async_add_executor_job( + schedule.assign_schedule, int(msg["entity_id"]) + ) + else: + await hass.async_add_executor_job( + schedule.unassign_schedule, int(msg["entity_id"]) + ) + await hass.async_create_task( + d.async_update(True) + ) + connection.send_result(msg["id"], "success") + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + # Create schedule + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedule/create".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Required("schedule_type"): str, + vol.Required("name"):str + } + ) + @websocket_api.async_response + async def websocket_create_schedule( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Create default schedule""" + schedule_type = str(msg.get("schedule_type")).lower() + name = msg["name"] + d = get_api_for_hub(msg.get("hub")) + if d: + schedule_type_enum = WiserScheduleTypeEnum[schedule_type] + await hass.async_add_executor_job( + d.wiserhub.schedules.create_schedule, schedule_type_enum, name + ) + await hass.async_create_task( + d.async_update(True) + ) + connection.send_result(msg["id"], "success") + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + + # Rename schedule + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedule/rename".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Required("schedule_type"): str, + vol.Required("schedule_id"): int, + vol.Required("schedule_name"):str + } + ) + @websocket_api.async_response + async def websocket_rename_schedule( + hass, connection: ActiveConnection, msg: dict + ) -> None: + schedule_type = str(msg.get("schedule_type")).lower() + schedule_id = msg.get("schedule_id") + name = msg["schedule_name"] + d = get_api_for_hub(msg.get("hub")) + if d: + schedule_type_enum = WiserScheduleTypeEnum[schedule_type] + schedule = d.wiserhub.schedules.get_by_id(schedule_type_enum, schedule_id) + if schedule: + await hass.async_add_executor_job( + setattr, schedule, "name", name + ) + await hass.async_create_task( + d.async_update(True) + ) + connection.send_result(msg["id"], "success") + else: + connection.send_error(msg["id"], "wiser error", f"Unable to rename schedule. Schedule with id {schedule_id} of type {schedule_type} not found") + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + + # Delete schedule + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedule/delete".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Required("schedule_type"): str, + vol.Required("schedule_id"):int + } + ) + @websocket_api.async_response + async def websocket_delete_schedule( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Create default schedule""" + schedule_type = str(msg.get("schedule_type")).lower() + schedule_id = msg["schedule_id"] + d = get_api_for_hub(msg.get("hub")) + if d: + schedule_type_enum = WiserScheduleTypeEnum[schedule_type] + schedule = d.wiserhub.schedules.get_by_id(schedule_type_enum, schedule_id) + if schedule: + await hass.async_add_executor_job( + schedule.delete_schedule + ) + await hass.async_create_task( + d.async_update(True) + ) + connection.send_result(msg["id"], "success") + else: + connection.send_error(msg["id"], "wiser error", f"Unable to delete schedule. Schedule with id {schedule_id} of type {schedule_type} not found") + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + + # Save schedule + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedule/save".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Required("schedule_type"): str, + vol.Required("schedule_id"):int, + vol.Required("schedule"): dict + } + ) + @websocket_api.async_response + async def websocket_save_schedule( + hass, connection: ActiveConnection, msg: dict + ) -> None: + """Save schedule""" + schedule_type = str(msg.get("schedule_type")).lower() + schedule_id = msg["schedule_id"] + new_schedule = msg["schedule"] + d = get_api_for_hub(msg.get("hub")) + if d: + schedule_type_enum = WiserScheduleTypeEnum[schedule_type] + schedule = d.wiserhub.schedules.get_by_id(schedule_type_enum, schedule_id) + if schedule: + await hass.async_add_executor_job( + schedule.set_schedule_from_ws_data, new_schedule + ) + await hass.async_create_task( + d.async_update(True) + ) + connection.send_result(msg["id"], "success") + else: + connection.send_error(msg["id"], "wiser error", f"Unable to delete schedule. Schedule with id {schedule_id} of type {schedule_type} not found") + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + + + # Copy schedule + @websocket_api.websocket_command( + { + vol.Required("type"): "{}/schedule/copy".format(const.DOMAIN), + vol.Optional("hub"): str, + vol.Required("schedule_type"): str, + vol.Required("schedule_id"):int, + vol.Required("to_schedule_id"): int + } + ) + @websocket_api.async_response + async def websocket_copy_schedule( + hass, connection: ActiveConnection, msg: dict + ) -> None: + schedule_type = str(msg.get("schedule_type")).lower() + schedule_id = msg["schedule_id"] + to_schedule_id = msg["to_schedule_id"] + d = get_api_for_hub(msg.get("hub")) + if d: + schedule_type_enum = WiserScheduleTypeEnum[schedule_type] + schedule = d.wiserhub.schedules.get_by_id(schedule_type_enum, schedule_id) + if schedule: + await hass.async_add_executor_job( + schedule.copy_schedule, to_schedule_id + ) + await hass.async_create_task( + d.async_update(True) + ) + connection.send_result(msg["id"], "success") + else: + connection.send_error(msg["id"], "wiser error", f"Unable to copy schedule. Schedule with id {schedule_id} of type {schedule_type} not found") + else: + connection.send_error(msg["id"], "wiser error", "hub not recognised") + + hass.components.websocket_api.async_register_command(websocket_get_hubs) + hass.components.websocket_api.async_register_command(websocket_get_suntimes) + hass.components.websocket_api.async_register_command(websocket_get_schedules) + hass.components.websocket_api.async_register_command(websocket_get_schedule_types) + hass.components.websocket_api.async_register_command(websocket_get_schedule_by_id) + hass.components.websocket_api.async_register_command(websocket_get_rooms) + hass.components.websocket_api.async_register_command(websocket_get_devices) + hass.components.websocket_api.async_register_command(websocket_assign_schedule) + hass.components.websocket_api.async_register_command(websocket_create_schedule) + hass.components.websocket_api.async_register_command(websocket_rename_schedule) + hass.components.websocket_api.async_register_command(websocket_delete_schedule) + hass.components.websocket_api.async_register_command(websocket_save_schedule) + hass.components.websocket_api.async_register_command(websocket_copy_schedule) + + async_register_command(hass, handle_subscribe_updates) + + + \ No newline at end of file diff --git a/docs/schedule-card.PNG b/docs/schedule-card.PNG new file mode 100644 index 0000000..16ec09d Binary files /dev/null and b/docs/schedule-card.PNG differ diff --git a/hacs.json b/hacs.json index bd42e7d..bdbd819 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Drayton Wiser Integration for Home Assistant", - "homeassistant": "2021.12", - "render_readme": false + "homeassistant": "2022.06", + "render_readme": true } \ No newline at end of file diff --git a/info.md b/info.md deleted file mode 100755 index 8da8d4a..0000000 --- a/info.md +++ /dev/null @@ -1,96 +0,0 @@ -[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/hacs/integration) - -{% if prerelease %} -### Please note: This is a Beta version and may have some instabilities. -{% endif %} - -{% if installed and version_installed.replace("v", "").0 | int < 3 %} - ## v3 Upgrade Warning - This upgrade contains a high number of breaking changes from v2.x. Please read the [Updating to v3.0](https://github.com/asantaga/wiserHomeAssistantPlatform/tree/master#updating-to-v30---important-please-read) documentation before proceeding. - -{% endif %} - -This integration allows visibility and control of the Drayton Wiser system in Home Assistant. For information about how to configure and the features included in the integration, please see the [Readme.md](https://github.com/asantaga/wiserHomeAssistantPlatform/blob/master/Readme.Md) - - -## Functionality - -- Support for [Home Assistant Component Store](https://community.home-assistant.io/t/custom-component-hacs/121727) - -- Support for hub discovery and UI config. No YAML editing. - -- Support for multiple hubs -- Support for Wiser Hub, iTRVs, Roomstats, Heating Actuators and SmartPlugs -- Basic sensor support for Dimmable Lights and Shutters - -- **Hub (System) Device** - - Various switches to control hub settings (Away Mode, Comfort Mode, Daylight Saving, Eco Mode, Valve Protection) - - Button to boost all rooms (time and temp in config) - - Button to cancel all overrides - - Slider to set Away Mode target temperature - - Sensors for Cloud status, Heating on/off, Heating mode (Normal, Away), Wifi signal. - - Long Term Statistics sensor for Heating Channel demand % - - Many attributes available - - Heating Operation Mode sensor has attributes to monitor update status - -- **Climate Devices** - - Climate entities for each Room - - Supports iTRVs, Roomstats and Heating Actuators (for electric heating) - - Animated icons for the Rooms to let you know which rooms are actually being heated (credit @msp1974) - - Allows setting of heat mode (Auto, Heat/Manual, Off) - - Allows setting of temperatures from HA - - Allows setting of boost temperature using Home Assistant Presets - - Climate card shows countdown of boost time - - Allows advancing schedule - - Allows setting Window Detection - - Long Term Stats sensors for Target Temp, Current Temp and Demand - - Many attributes available - - Fires wiser_room_heating_status_changed event when room starts or stops heating - -- **Hot Water** - - Sensor to show if hot water is on or off - - Sensor to show operation mode (Auto, Manual, Boost, Override etc) - - Selector to set hot water mode (Auto, Manual) - - Button to Boost hot water - - Button to override hot water - - Button to cancel hot water overrides - -- **iTRV, Roomstat, Heating Actuator, UnderFloorHeating, Smart Plug, Lights & Shutter Devices** - - Devices for the HeatHub, each iTRV, Roomstat, Heating Actuator, Under Floor Heating Controller, Smart Plug, Light & Shutter - - Switches for Device Lock and Identify - - Sensor for battery (if device is battery powered) - - Sensor for Zigbee signal - - Switches to set Away Mode action and On/Off for Smart Plug - - Selector to set mode (Auto, Manual) for Smart Plug - - Many attributes available - -- **Moments** - - Buttons to activate Moments configured in the Wiser App - -- **Services** - - Supports standard services for entity types - - i.e. climate.set_temperature, climate.set_preset, climate.set_hvac_mode, button.press, select.option, switch.turn_on, light.turn_on, cover.set_position etc - - The following custom services are available for use with automation - - Service `boost_heating` : Provides ability to boost the heating in a particular room - - Service `boost_hotwater` : Provides ability to boost the heating in a particular room - - Service `get_schedule/set_schedule/copy_schedule/assign_schedule`: Provides ability to get/set/copy/assign schedules for rooms, hotwater, lights and shutters - - Service `set_device_mode`: Provides ability to set the mode of a specific smartplug, hot water, light or shutter. It can be set to either `manual` or `auto` , the latter means it follows any schedule set. - - Service `remove_orphaned_entries`: Provides ability to remove HA devices for rooms/devices that have been removed from your hub. Must have no entities. - - Service `output_hub_json`: Provides ability to output hub json to 3 anonymised files to enable easier debugging - - -## Sample Images - -![](https://github.com/asantaga/wiserHomeAssistantPlatform/raw/master/docs/screenshot.PNG) - -![](https://github.com/asantaga/wiserHomeAssistantPlatform/raw/master/docs/hub.PNG) - -![](https://github.com/asantaga/wiserHomeAssistantPlatform/raw/master/docs/room.PNG) - -![](https://github.com/asantaga/wiserHomeAssistantPlatform/raw/master/docs/trv.PNG) - -![](https://github.com/asantaga/wiserHomeAssistantPlatform/raw/master/docs/roomstat.PNG) - -![](https://github.com/asantaga/wiserHomeAssistantPlatform/raw/master/docs/smartplug.PNG) - -![](https://github.com/asantaga/wiserHomeAssistantPlatform/raw/master/docs/heatingactuator.PNG)