diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py
index 87ccbf550755ba7867746197c782a02b0c6cbd4b..b5edb751d50cbeb7989aec63f7ee71e7fdf24495 100644
--- a/homeassistant/components/frontend/version.py
+++ b/homeassistant/components/frontend/version.py
@@ -3,10 +3,10 @@
 FINGERPRINTS = {
     "compatibility.js": "1686167ff210e001f063f5c606b2e74b",
     "core.js": "2a7d01e45187c7d4635da05065b5e54e",
-    "frontend.html": "6b0a95408d9ee869d0fe20c374077ed4",
+    "frontend.html": "7e13ce36d3141182a62a5b061e87e77a",
     "mdi.html": "89074face5529f5fe6fbae49ecb3e88b",
     "micromarkdown-js.html": "93b5ec4016f0bba585521cf4d18dec1a",
-    "panels/ha-panel-config.html": "0b985cbf668b16bca9f34727036c7139",
+    "panels/ha-panel-config.html": "61f65e75e39368e07441d7d6a4e36ae3",
     "panels/ha-panel-dev-event.html": "d409e7ab537d9fe629126d122345279c",
     "panels/ha-panel-dev-info.html": "b0e55eb657fd75f21aba2426ac0cedc0",
     "panels/ha-panel-dev-mqtt.html": "94b222b013a98583842de3e72d5888c6",
diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html
index 2dc0bb5f156d8f823694074c87afc51696c4033c..60713690c4477955f3baa977a54c5c6098c7edc9 100644
--- a/homeassistant/components/frontend/www_static/frontend.html
+++ b/homeassistant/components/frontend/www_static/frontend.html
@@ -70,7 +70,7 @@
       /* Silent scrolling should not run CSS transitions */
       :host([silent-scroll]) ::slotted(app-toolbar:first-of-type),
       :host([silent-scroll]) ::slotted([sticky]){transition:none !important;}</style><div id="contentContainer"><slot id="slot"></slot></div></template><script>Polymer({is:"app-header",behaviors:[Polymer.AppScrollEffectsBehavior,Polymer.AppLayoutBehavior],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var t,i=Polymer.dom(this.$.slot).getDistributedNodes(),e=0;t=i[e];e++)if(t.nodeType===Node.ELEMENT_NODE){if(t.hasAttribute("sticky")){this._stickyElRef=t;break}this._stickyElRef||(this._stickyElRef=t)}return this._stickyElRef},_configChanged:function(){this.resetLayout(),this._notifyLayoutChanged()},_updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var t=this._clampedScrollTop,i=0===this._height||0===t,e=this.disabled;this._height=this.offsetHeight,this._stickyElRef=null,this.disabled=!0,i||this._updateScrollState(0,!0),this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0,this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0,this._setUpEffect(),i?this._updateScrollState(t,!0):(this._updateScrollState(this._lastScrollTop,!0),this._layoutIfDirty()),this.disabled=e}},_updateScrollState:function(t,i){if(0!==this._height){var e=0,s=0,h=this._top,o=(this._lastScrollTop,this._maxHeaderTop),r=t-this._lastScrollTop,n=Math.abs(r),a=t>this._lastScrollTop,l=performance.now();if(this._mayMove()&&(s=this._clamp(this.reveals?h+r:t,0,o)),t>=this._dHeight&&(s=this.condenses&&!this.fixed?Math.max(this._dHeight,s):s,this.style.transitionDuration="0ms"),this.reveals&&!this.disabled&&n<100&&((l-this._initTimestamp>300||this._wasScrollingDown!==a)&&(this._initScrollTop=t,this._initTimestamp=l),t>=o))if(Math.abs(this._initScrollTop-t)>30||n>10){a&&t>=o?s=o:!a&&t>=this._dHeight&&(s=this.condenses&&!this.fixed?this._dHeight:0);var _=r/(l-this._lastTimestamp);this.style.transitionDuration=this._clamp((s-h)/_,0,300)+"ms"}else s=this._top;e=0===this._dHeight?t>0?1:0:s/this._dHeight,i||(this._lastScrollTop=t,this._top=s,this._wasScrollingDown=a,this._lastTimestamp=l),(i||e!==this._progress||h!==s||0===t)&&(this._progress=e,this._runEffects(e,s),this._transformHeader(s))}},_mayMove:function(){return this.condenses||!this.fixed},willCondense:function(){return this._dHeight>0&&this.condenses},isOnScreen:function(){return 0!==this._height&&this._top<this._height},isContentBelow:function(){return 0===this._top?this._clampedScrollTop>0:this._clampedScrollTop-this._maxHeaderTop>=0},_transformHeader:function(t){this.translate3d(0,-t+"px",0),this._stickyEl&&this.translate3d(0,this.condenses&&t>=this._stickyElTop?Math.min(t,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},_clamp:function(t,i,e){return Math.min(e,Math.max(i,t))},_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),Polymer.dom(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},_getDOMRef:function(t){switch(t){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return Polymer.dom(this).querySelector("[main-title]");case"condensedTitle":return Polymer.dom(this).querySelector("[condensed-title]")}return null},getScrollState:function(){return{progress:this._progress,top:this._top}}});</script></dom-module><dom-module id="app-toolbar" assetpath="../bower_components/app-layout/app-toolbar/"><template><style>:host{@apply --layout-horizontal;@apply --layout-center;position:relative;height:64px;padding:0 16px;pointer-events:none;font-size:var(--app-toolbar-font-size, 20px);}:host ::slotted(*){pointer-events:auto;}:host ::slotted(paper-icon-button){font-size:0;}:host ::slotted([main-title]),
-      :host ::slotted([condensed-title]){pointer-events:none;@apply --layout-flex;}:host ::slotted([bottom-item]){position:absolute;right:0;bottom:0;left:0;}:host ::slotted([top-item]){position:absolute;top:0;right:0;left:0;}:host ::slotted([spacer]){margin-left:64px;}</style><slot></slot></template><script>Polymer({is:"app-toolbar"});</script></dom-module><dom-module id="ha-menu-button" assetpath="components/"><template><style>.invisible{visibility:hidden;}</style><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-menu-button",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}},computeMenuButtonClass:function(e,n){return!e&&n?"invisible":""},toggleMenu:function(e){e.stopPropagation(),this.fire("hass-open-menu")}});</script><dom-module id="ha-start-voice-button" assetpath="components/"><template><paper-icon-button icon="mdi:microphone" hidden$="[[!canListen]]" on-tap="handleListenClick"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-start-voice-button",properties:{hass:{type:Object,value:null},canListen:{type:Boolean,computed:"computeCanListen(hass)"}},computeCanListen:function(e){return"webkitSpeechRecognition"in window&&window.hassUtil.isComponentLoaded(e,"conversation")},handleListenClick:function(){this.fire("hass-start-voice")}});</script><dom-module id="ha-label-badge" assetpath="components/"><template><style>.badge-container{display:inline-block;text-align:center;vertical-align:top;}.label-badge{position:relative;display:block;margin:0 auto;width:var(--ha-label-badge-size, 2.5em);text-align:center;height:var(--ha-label-badge-size, 2.5em);line-height:var(--ha-label-badge-size, 2.5em);font-size:var(--ha-label-badge-font-size, 1.5em);border-radius:50%;border:0.1em solid var(--ha-label-badge-color, --primary-color);color:var(--label-badge-text-color, rgb(76, 76, 76));white-space:nowrap;background-color:var(--label-badge-background-color, white);background-size:cover;transition:border .3s ease-in-out;}.label-badge .value{font-size:90%;overflow:hidden;text-overflow:ellipsis;}.label-badge .value.big{font-size:70%;}.label-badge .label{position:absolute;bottom:-1em;left:0;right:0;line-height:1em;font-size:0.5em;}.label-badge .label span{max-width:80%;display:inline-block;background-color:var(--ha-label-badge-color, --primary-color);color:white;border-radius:1em;padding:4px 8px;font-weight:500;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;transition:background-color .3s ease-in-out;}.badge-container .title{margin-top:1em;font-size:.9em;width:5em;font-weight:300;overflow:hidden;text-overflow:ellipsis;line-height:normal;}[hidden]{display:none !important;}</style><div class="badge-container"><div class="label-badge" id="badge"><div class$="[[computeClasses(value)]]"><iron-icon icon="[[icon]]" hidden$="[[computeHideIcon(icon, value, image)]]"></iron-icon><span hidden$="[[computeHideValue(value, image)]]">[[value]]</span></div><div class="label" hidden$="[[!label]]"><span>[[label]]</span></div></div><div class="title" hidden$="[[!description]]">[[description]]</div></div></template></dom-module><script>Polymer({is:"ha-label-badge",properties:{value:{type:String,value:null},icon:{type:String,value:null},label:{type:String,value:null},description:{type:String},image:{type:String,value:null,observer:"imageChanged"}},computeClasses:function(e){return e&&e.length>4?"value big":"value"},computeHideIcon:function(e,n,l){return!e||n||l},computeHideValue:function(e,n){return!e||n},imageChanged:function(e){this.$.badge.style.backgroundImage=e?"url("+e+")":""}});</script><dom-module id="ha-demo-badge" assetpath="components/"><template><style>:host{--ha-label-badge-color:#dac90d;}</style><ha-label-badge icon="mdi:emoticon" label="Demo" description=""></ha-label-badge></template></dom-module><script>Polymer({is:"ha-demo-badge"});</script><dom-module id="ha-state-label-badge" assetpath="components/entity/"><template><style>:host{cursor:pointer;}ha-label-badge{--ha-label-badge-color:var(--label-badge-red, #DF4C1E);}.red{--ha-label-badge-color:var(--label-badge-red, #DF4C1E);}.blue{--ha-label-badge-color:var(--label-badge-blue, #039be5);}.green{--ha-label-badge-color:var(--label-badge-green, #0DA035);}.yellow{--ha-label-badge-color:var(--label-badge-yellow, #f4b400);}.grey{--ha-label-badge-color:var(--label-badge-grey, --paper-grey-500);}</style><ha-label-badge class$="[[computeClasses(state)]]" value="[[computeValue(state)]]" icon="[[computeIcon(state)]]" image="[[computeImage(state)]]" label="[[computeLabel(state)]]" description="[[computeDescription(state)]]"></ha-label-badge></template></dom-module><script>Polymer({is:"ha-state-label-badge",properties:{hass:{type:Object},state:{type:Object,observer:"stateChanged"}},listeners:{tap:"badgeTap"},badgeTap:function(e){e.stopPropagation(),this.fire("hass-more-info",{entityId:this.state.entity_id})},computeClasses:function(e){switch(window.hassUtil.computeDomain(e)){case"binary_sensor":case"updater":return"blue";default:return""}},computeValue:function(e){switch(window.hassUtil.computeDomain(e)){case"binary_sensor":case"device_tracker":case"updater":case"sun":case"alarm_control_panel":return null;case"sensor":default:return"unknown"===e.state?"-":e.state}},computeIcon:function(e){if("unavailable"===e.state)return null;var t=window.hassUtil.computeDomain(e);switch(t){case"alarm_control_panel":return"pending"===e.state?"mdi:clock-fast":"armed_away"===e.state?"mdi:nature":"armed_home"===e.state?"mdi:home-variant":"triggered"===e.state?"mdi:alert-circle":window.hassUtil.domainIcon(t,e.state);case"binary_sensor":case"device_tracker":case"updater":return window.hassUtil.stateIcon(e);case"sun":return"above_horizon"===e.state?window.hassUtil.domainIcon(t):"mdi:brightness-3";default:return null}},computeImage:function(e){return e.attributes.entity_picture||null},computeLabel:function(e){if("unavailable"===e.state)return"unavai";switch(window.hassUtil.computeDomain(e)){case"device_tracker":return"not_home"===e.state?"Away":e.state;case"alarm_control_panel":return"pending"===e.state?"pend":"armed_away"===e.state||"armed_home"===e.state?"armed":"triggered"===e.state?"trig":"disarm";default:return e.attributes.unit_of_measurement||null}},computeDescription:function(e){return window.hassUtil.computeStateName(e)},stateChanged:function(){this.updateStyles()}});</script><dom-module id="ha-badges-card" assetpath="cards/"><template><style>ha-state-label-badge{display:inline-block;margin-bottom:var(--ha-state-label-badge-margin-bottom, 16px);}</style><template is="dom-repeat" items="[[states]]"><ha-state-label-badge hass="[[hass]]" state="[[item]]"></ha-state-label-badge></template></template></dom-module><script>Polymer({is:"ha-badges-card",properties:{hass:{type:Object},states:{type:Array}}});</script><dom-module id="paper-material-shared-styles" assetpath="../bower_components/paper-material/"><template><style>:host{display:block;position:relative;}:host([elevation="1"]){@apply --shadow-elevation-2dp;}:host([elevation="2"]){@apply --shadow-elevation-4dp;}:host([elevation="3"]){@apply --shadow-elevation-6dp;}:host([elevation="4"]){@apply --shadow-elevation-8dp;}:host([elevation="5"]){@apply --shadow-elevation-16dp;}</style></template></dom-module><dom-module id="paper-material" assetpath="../bower_components/paper-material/"><template><style include="paper-material-shared-styles"></style><style>:host([animated]){@apply --shadow-transition;}:host{@apply --paper-material;}</style><slot></slot></template></dom-module><script>Polymer({is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});</script><dom-module id="ha-camera-card" assetpath="cards/"><template><style include="paper-material">:host{display:block;position:relative;font-size:0px;border-radius:2px;cursor:pointer;min-height:48px;line-height:0;}.camera-feed{width:100%;height:auto;border-radius:2px;}.caption{@apply (--paper-font-common-nowrap);position:absolute;left:0px;right:0px;bottom:0px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:rgba(0, 0, 0, 0.3);padding:16px;font-size:16px;font-weight:500;line-height:16px;color:white;}</style><img src="[[cameraFeedSrc]]" class="camera-feed" hidden$="[[!imageLoaded]]" on-load="imageLoadSuccess" on-error="imageLoadFail" alt="[[computeStateName(stateObj)]]"><div class="caption">[[computeStateName(stateObj)]]<template is="dom-if" if="[[!imageLoaded]]">(Image not available)</template></div></template></dom-module><script>Polymer({is:"ha-camera-card",UPDATE_INTERVAL:1e4,properties:{hass:{type:Object},stateObj:{type:Object,observer:"updateCameraFeedSrc"},cameraFeedSrc:{type:String},imageLoaded:{type:Boolean,value:!0},elevation:{type:Number,value:1,reflectToAttribute:!0}},listeners:{tap:"cardTapped"},attached:function(){this.timer=setInterval(function(){this.updateCameraFeedSrc(this.stateObj)}.bind(this),this.UPDATE_INTERVAL)},detached:function(){clearInterval(this.timer)},cardTapped:function(){this.fire("hass-more-info",{entityId:this.stateObj.entity_id})},updateCameraFeedSrc:function(e){var t=e.attributes,a=(new Date).getTime();this.cameraFeedSrc=t.entity_picture+"&time="+a},imageLoadSuccess:function(){this.imageLoaded=!0},imageLoadFail:function(){this.imageLoaded=!1},computeStateName:function(e){return window.hassUtil.computeStateName(e)}});</script><dom-module id="ha-card" assetpath="components/"><template><style include="paper-material">:host{display:block;border-radius:2px;transition:all 0.30s ease-out;background-color:var(--paper-card-background-color, white);}.header{@apply (--paper-font-headline);@apply (--paper-font-common-expensive-kerning);opacity:var(--dark-primary-opacity);padding:24px 16px 16px;text-transform:capitalize;}</style><template is="dom-if" if="[[header]]"><div class="header">[[header]]</div></template><slot></slot></template></dom-module><script>Polymer({is:"ha-card",properties:{header:{type:String},elevation:{type:Number,value:1,reflectToAttribute:!0}}});</script><dom-module id="paper-toggle-button" assetpath="../bower_components/paper-toggle-button/"><template strip-whitespace=""><style>:host{display:inline-block;@apply --layout-horizontal;@apply --layout-center;@apply --paper-font-common-base;}:host([disabled]){pointer-events:none;}:host(:focus){outline:none;}.toggle-bar{position:absolute;height:100%;width:100%;border-radius:8px;pointer-events:none;opacity:0.4;transition:background-color linear .08s;background-color:var(--paper-toggle-button-unchecked-bar-color, #000000);@apply --paper-toggle-button-unchecked-bar;}.toggle-button{position:absolute;top:-3px;left:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.6);transition:-webkit-transform linear .08s, background-color linear .08s;transition:transform linear .08s, background-color linear .08s;will-change:transform;background-color:var(--paper-toggle-button-unchecked-button-color, var(--paper-grey-50));@apply --paper-toggle-button-unchecked-button;}.toggle-button.dragging{-webkit-transition:none;transition:none;}:host([checked]:not([disabled])) .toggle-bar{opacity:0.5;background-color:var(--paper-toggle-button-checked-bar-color, var(--primary-color));@apply --paper-toggle-button-checked-bar;}:host([disabled]) .toggle-bar{background-color:#000;opacity:0.12;}:host([checked]) .toggle-button{-webkit-transform:translate(16px, 0);transform:translate(16px, 0);}:host([checked]:not([disabled])) .toggle-button{background-color:var(--paper-toggle-button-checked-button-color, var(--primary-color));@apply --paper-toggle-button-checked-button;}:host([disabled]) .toggle-button{background-color:#bdbdbd;opacity:1;}.toggle-ink{position:absolute;top:-14px;left:-14px;right:auto;bottom:auto;width:48px;height:48px;opacity:0.5;pointer-events:none;color:var(--paper-toggle-button-unchecked-ink-color, var(--primary-text-color));@apply --paper-toggle-button-unchecked-ink;}:host([checked]) .toggle-ink{color:var(--paper-toggle-button-checked-ink-color, var(--primary-color));@apply --paper-toggle-button-checked-ink;}.toggle-container{display:inline-block;position:relative;width:36px;height:14px;margin:4px 1px;}.toggle-label{position:relative;display:inline-block;vertical-align:middle;padding-left:var(--paper-toggle-button-label-spacing, 8px);pointer-events:none;color:var(--paper-toggle-button-label-color, var(--primary-text-color));}:host([invalid]) .toggle-bar{background-color:var(--paper-toggle-button-invalid-bar-color, var(--error-color));}:host([invalid]) .toggle-button{background-color:var(--paper-toggle-button-invalid-button-color, var(--error-color));}:host([invalid]) .toggle-ink{color:var(--paper-toggle-button-invalid-ink-color, var(--error-color));}</style><div class="toggle-container"><div id="toggleBar" class="toggle-bar"></div><div id="toggleButton" class="toggle-button"></div></div><div class="toggle-label"><slot></slot></div></template><script>Polymer({is:"paper-toggle-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){Polymer.Gestures.setTouchAction(this,"pan-y")})},_ontrack:function(t){var e=t.detail;"start"===e.state?this._trackStart(e):"track"===e.state?this._trackMove(e):"end"===e.state&&this._trackEnd(e)},_trackStart:function(t){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(t){var e=t.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+e:e)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(t){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var t=Polymer.PaperRippleBehavior._createRipple();return t.id="ink",t.setAttribute("recenters",""),t.classList.add("circle","toggle-ink"),t}});</script></dom-module><dom-module id="ha-entity-toggle" assetpath="components/entity/"><template><style>:host{white-space:nowrap;}paper-icon-button{color:var(--primary-text-color);transition:color .5s;}paper-icon-button[state-active]{color:var(--primary-color);}paper-toggle-button{cursor:pointer;--paper-toggle-button-label-spacing:0;padding:13px 5px;margin:-4px -5px;}</style><template is="dom-if" if="[[stateObj.attributes.assumed_state]]"><paper-icon-button icon="mdi:flash-off" on-tap="turnOff" state-active$="[[!isOn]]"></paper-icon-button><paper-icon-button icon="mdi:flash" on-tap="turnOn" state-active$="[[isOn]]"></paper-icon-button></template><template is="dom-if" if="[[!stateObj.attributes.assumed_state]]"><paper-toggle-button checked="[[toggleChecked]]" on-change="toggleChanged"></paper-toggle-button></template></template></dom-module><script>Polymer({is:"ha-entity-toggle",properties:{hass:{type:Object},stateObj:{type:Object},toggleChecked:{type:Boolean,value:!1},isOn:{type:Boolean,computed:"computeIsOn(stateObj)",observer:"isOnChanged"}},listeners:{tap:"onTap"},onTap:function(t){t.stopPropagation()},ready:function(){this.forceStateChange()},toggleChanged:function(t){var e=t.target.checked;setTimeout(function(){var t=document.activeElement;t.blur(),t.focus()},0),e&&!this.isOn?this.callService(!0):!e&&this.isOn&&this.callService(!1)},isOnChanged:function(t){this.toggleChecked=t;var e=this.shadowRoot.querySelector("paper-toggle-button");e&&(e.focus(),e.blur())},forceStateChange:function(){this.toggleChecked===this.isOn&&(this.toggleChecked=!this.toggleChecked),this.toggleChecked=this.isOn},turnOn:function(){this.callService(!0)},turnOff:function(){this.callService(!1)},computeIsOn:function(t){return t&&-1===window.hassUtil.OFF_STATES.indexOf(t.state)},callService:function(t){var e,i,n,o=window.hassUtil.computeDomain(this.stateObj);"lock"===o?(e="lock",i=t?"lock":"unlock"):"cover"===o?(e="cover",i=t?"open":"close"):(e="homeassistant",i=t?"turn_on":"turn_off"),n=this.stateObj,this.hass.callService(e,i,{entity_id:this.stateObj.entity_id}).then(function(){setTimeout(function(){this.stateObj===n&&this.forceStateChange()}.bind(this),2e3)}.bind(this))}});</script><dom-module id="ha-state-icon" assetpath="components/entity/"><template><iron-icon icon="[[computeIcon(stateObj)]]"></iron-icon></template></dom-module><script>Polymer({is:"ha-state-icon",properties:{stateObj:{type:Object}},computeIcon:function(t){return window.hassUtil.stateIcon(t)}});</script><dom-module id="state-badge" assetpath="components/entity/"><template><style>:host{position:relative;display:inline-block;width:40px;color:var(--paper-item-icon-color, #44739e);border-radius:50%;height:40px;text-align:center;background-size:cover;line-height:40px;}ha-state-icon{transition:color .3s ease-in-out;}ha-state-icon[data-domain=light][data-state=on],
+      :host ::slotted([condensed-title]){pointer-events:none;@apply --layout-flex;}:host ::slotted([bottom-item]){position:absolute;right:0;bottom:0;left:0;}:host ::slotted([top-item]){position:absolute;top:0;right:0;left:0;}:host ::slotted([spacer]){margin-left:64px;}</style><slot></slot></template><script>Polymer({is:"app-toolbar"});</script></dom-module><dom-module id="ha-menu-button" assetpath="components/"><template><style>.invisible{visibility:hidden;}</style><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-menu-button",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}},computeMenuButtonClass:function(e,n){return!e&&n?"invisible":""},toggleMenu:function(e){e.stopPropagation(),this.fire("hass-open-menu")}});</script><dom-module id="ha-start-voice-button" assetpath="components/"><template><paper-icon-button icon="mdi:microphone" hidden$="[[!canListen]]" on-tap="handleListenClick"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-start-voice-button",properties:{hass:{type:Object,value:null},canListen:{type:Boolean,computed:"computeCanListen(hass)"}},computeCanListen:function(e){return"webkitSpeechRecognition"in window&&window.hassUtil.isComponentLoaded(e,"conversation")},handleListenClick:function(){this.fire("hass-start-voice")}});</script><dom-module id="ha-label-badge" assetpath="components/"><template><style>.badge-container{display:inline-block;text-align:center;vertical-align:top;}.label-badge{position:relative;display:block;margin:0 auto;width:var(--ha-label-badge-size, 2.5em);text-align:center;height:var(--ha-label-badge-size, 2.5em);line-height:var(--ha-label-badge-size, 2.5em);font-size:var(--ha-label-badge-font-size, 1.5em);border-radius:50%;border:0.1em solid var(--ha-label-badge-color, --primary-color);color:var(--label-badge-text-color, rgb(76, 76, 76));white-space:nowrap;background-color:var(--label-badge-background-color, white);background-size:cover;transition:border .3s ease-in-out;}.label-badge .value{font-size:90%;overflow:hidden;text-overflow:ellipsis;}.label-badge .value.big{font-size:70%;}.label-badge .label{position:absolute;bottom:-1em;left:0;right:0;line-height:1em;font-size:0.5em;}.label-badge .label span{max-width:80%;display:inline-block;background-color:var(--ha-label-badge-color, --primary-color);color:white;border-radius:1em;padding:4px 8px;font-weight:500;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;transition:background-color .3s ease-in-out;}.badge-container .title{margin-top:1em;font-size:var(--ha-label-badge-title-font-size, .9em);width:var(--ha-label-badge-title-width, 5em);font-weight:300;overflow:hidden;text-overflow:ellipsis;line-height:normal;}[hidden]{display:none !important;}</style><div class="badge-container"><div class="label-badge" id="badge"><div class$="[[computeClasses(value)]]"><iron-icon icon="[[icon]]" hidden$="[[computeHideIcon(icon, value, image)]]"></iron-icon><span hidden$="[[computeHideValue(value, image)]]">[[value]]</span></div><div class="label" hidden$="[[!label]]"><span>[[label]]</span></div></div><div class="title" hidden$="[[!description]]">[[description]]</div></div></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),HaLabelBadge=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"computeClasses",value:function(e){return e&&e.length>4?"value big":"value"}},{key:"computeHideIcon",value:function(e,t,n){return!e||t||n}},{key:"computeHideValue",value:function(e,t){return!e||t}},{key:"imageChanged",value:function(e){this.$.badge.style.backgroundImage=e?"url("+e+")":""}}],[{key:"is",get:function(){return"ha-label-badge"}},{key:"properties",get:function(){return{value:String,icon:String,label:String,description:String,image:{type:String,observer:"imageChanged"}}}}]),t}();customElements.define(HaLabelBadge.is,HaLabelBadge);</script><dom-module id="ha-demo-badge" assetpath="components/"><template><style>:host{--ha-label-badge-color:#dac90d;}</style><ha-label-badge icon="mdi:emoticon" label="Demo" description=""></ha-label-badge></template></dom-module><script>Polymer({is:"ha-demo-badge"});</script><dom-module id="ha-state-label-badge" assetpath="components/entity/"><template><style>:host{cursor:pointer;}ha-label-badge{--ha-label-badge-color:var(--label-badge-red, #DF4C1E);}.red{--ha-label-badge-color:var(--label-badge-red, #DF4C1E);}.blue{--ha-label-badge-color:var(--label-badge-blue, #039be5);}.green{--ha-label-badge-color:var(--label-badge-green, #0DA035);}.yellow{--ha-label-badge-color:var(--label-badge-yellow, #f4b400);}.grey{--ha-label-badge-color:var(--label-badge-grey, --paper-grey-500);}</style><ha-label-badge class$="[[computeClasses(state)]]" value="[[computeValue(state)]]" icon="[[computeIcon(state)]]" image="[[computeImage(state)]]" label="[[computeLabel(state)]]" description="[[computeDescription(state)]]"></ha-label-badge></template></dom-module><script>Polymer({is:"ha-state-label-badge",properties:{hass:{type:Object},state:{type:Object,observer:"stateChanged"}},listeners:{tap:"badgeTap"},badgeTap:function(e){e.stopPropagation(),this.fire("hass-more-info",{entityId:this.state.entity_id})},computeClasses:function(e){switch(window.hassUtil.computeDomain(e)){case"binary_sensor":case"updater":return"blue";default:return""}},computeValue:function(e){switch(window.hassUtil.computeDomain(e)){case"binary_sensor":case"device_tracker":case"updater":case"sun":case"alarm_control_panel":return null;case"sensor":default:return"unknown"===e.state?"-":e.state}},computeIcon:function(e){if("unavailable"===e.state)return null;var t=window.hassUtil.computeDomain(e);switch(t){case"alarm_control_panel":return"pending"===e.state?"mdi:clock-fast":"armed_away"===e.state?"mdi:nature":"armed_home"===e.state?"mdi:home-variant":"triggered"===e.state?"mdi:alert-circle":window.hassUtil.domainIcon(t,e.state);case"binary_sensor":case"device_tracker":case"updater":return window.hassUtil.stateIcon(e);case"sun":return"above_horizon"===e.state?window.hassUtil.domainIcon(t):"mdi:brightness-3";default:return null}},computeImage:function(e){return e.attributes.entity_picture||null},computeLabel:function(e){if("unavailable"===e.state)return"unavai";switch(window.hassUtil.computeDomain(e)){case"device_tracker":return"not_home"===e.state?"Away":e.state;case"alarm_control_panel":return"pending"===e.state?"pend":"armed_away"===e.state||"armed_home"===e.state?"armed":"triggered"===e.state?"trig":"disarm";default:return e.attributes.unit_of_measurement||null}},computeDescription:function(e){return window.hassUtil.computeStateName(e)},stateChanged:function(){this.updateStyles()}});</script><dom-module id="ha-badges-card" assetpath="cards/"><template><style>ha-state-label-badge{display:inline-block;margin-bottom:var(--ha-state-label-badge-margin-bottom, 16px);}</style><template is="dom-repeat" items="[[states]]"><ha-state-label-badge hass="[[hass]]" state="[[item]]"></ha-state-label-badge></template></template></dom-module><script>Polymer({is:"ha-badges-card",properties:{hass:{type:Object},states:{type:Array}}});</script><dom-module id="paper-material-shared-styles" assetpath="../bower_components/paper-material/"><template><style>:host{display:block;position:relative;}:host([elevation="1"]){@apply --shadow-elevation-2dp;}:host([elevation="2"]){@apply --shadow-elevation-4dp;}:host([elevation="3"]){@apply --shadow-elevation-6dp;}:host([elevation="4"]){@apply --shadow-elevation-8dp;}:host([elevation="5"]){@apply --shadow-elevation-16dp;}</style></template></dom-module><dom-module id="paper-material" assetpath="../bower_components/paper-material/"><template><style include="paper-material-shared-styles"></style><style>:host([animated]){@apply --shadow-transition;}:host{@apply --paper-material;}</style><slot></slot></template></dom-module><script>Polymer({is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});</script><dom-module id="ha-camera-card" assetpath="cards/"><template><style include="paper-material">:host{display:block;position:relative;font-size:0px;border-radius:2px;cursor:pointer;min-height:48px;line-height:0;}.camera-feed{width:100%;height:auto;border-radius:2px;}.caption{@apply (--paper-font-common-nowrap);position:absolute;left:0px;right:0px;bottom:0px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:rgba(0, 0, 0, 0.3);padding:16px;font-size:16px;font-weight:500;line-height:16px;color:white;}</style><img src="[[cameraFeedSrc]]" class="camera-feed" hidden$="[[!imageLoaded]]" on-load="imageLoadSuccess" on-error="imageLoadFail" alt="[[computeStateName(stateObj)]]"><div class="caption">[[computeStateName(stateObj)]]<template is="dom-if" if="[[!imageLoaded]]">(Image not available)</template></div></template></dom-module><script>Polymer({is:"ha-camera-card",UPDATE_INTERVAL:1e4,properties:{hass:{type:Object},stateObj:{type:Object,observer:"updateCameraFeedSrc"},cameraFeedSrc:{type:String},imageLoaded:{type:Boolean,value:!0},elevation:{type:Number,value:1,reflectToAttribute:!0}},listeners:{tap:"cardTapped"},attached:function(){this.timer=setInterval(function(){this.updateCameraFeedSrc(this.stateObj)}.bind(this),this.UPDATE_INTERVAL)},detached:function(){clearInterval(this.timer)},cardTapped:function(){this.fire("hass-more-info",{entityId:this.stateObj.entity_id})},updateCameraFeedSrc:function(e){var t=e.attributes,a=(new Date).getTime();this.cameraFeedSrc=t.entity_picture+"&time="+a},imageLoadSuccess:function(){this.imageLoaded=!0},imageLoadFail:function(){this.imageLoaded=!1},computeStateName:function(e){return window.hassUtil.computeStateName(e)}});</script><dom-module id="ha-card" assetpath="components/"><template><style include="paper-material">:host{display:block;border-radius:2px;transition:all 0.30s ease-out;background-color:var(--paper-card-background-color, white);}.header{@apply (--paper-font-headline);@apply (--paper-font-common-expensive-kerning);opacity:var(--dark-primary-opacity);padding:24px 16px 16px;text-transform:capitalize;}</style><template is="dom-if" if="[[header]]"><div class="header">[[header]]</div></template><slot></slot></template></dom-module><script>Polymer({is:"ha-card",properties:{header:{type:String},elevation:{type:Number,value:1,reflectToAttribute:!0}}});</script><dom-module id="paper-toggle-button" assetpath="../bower_components/paper-toggle-button/"><template strip-whitespace=""><style>:host{display:inline-block;@apply --layout-horizontal;@apply --layout-center;@apply --paper-font-common-base;}:host([disabled]){pointer-events:none;}:host(:focus){outline:none;}.toggle-bar{position:absolute;height:100%;width:100%;border-radius:8px;pointer-events:none;opacity:0.4;transition:background-color linear .08s;background-color:var(--paper-toggle-button-unchecked-bar-color, #000000);@apply --paper-toggle-button-unchecked-bar;}.toggle-button{position:absolute;top:-3px;left:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.6);transition:-webkit-transform linear .08s, background-color linear .08s;transition:transform linear .08s, background-color linear .08s;will-change:transform;background-color:var(--paper-toggle-button-unchecked-button-color, var(--paper-grey-50));@apply --paper-toggle-button-unchecked-button;}.toggle-button.dragging{-webkit-transition:none;transition:none;}:host([checked]:not([disabled])) .toggle-bar{opacity:0.5;background-color:var(--paper-toggle-button-checked-bar-color, var(--primary-color));@apply --paper-toggle-button-checked-bar;}:host([disabled]) .toggle-bar{background-color:#000;opacity:0.12;}:host([checked]) .toggle-button{-webkit-transform:translate(16px, 0);transform:translate(16px, 0);}:host([checked]:not([disabled])) .toggle-button{background-color:var(--paper-toggle-button-checked-button-color, var(--primary-color));@apply --paper-toggle-button-checked-button;}:host([disabled]) .toggle-button{background-color:#bdbdbd;opacity:1;}.toggle-ink{position:absolute;top:-14px;left:-14px;right:auto;bottom:auto;width:48px;height:48px;opacity:0.5;pointer-events:none;color:var(--paper-toggle-button-unchecked-ink-color, var(--primary-text-color));@apply --paper-toggle-button-unchecked-ink;}:host([checked]) .toggle-ink{color:var(--paper-toggle-button-checked-ink-color, var(--primary-color));@apply --paper-toggle-button-checked-ink;}.toggle-container{display:inline-block;position:relative;width:36px;height:14px;margin:4px 1px;}.toggle-label{position:relative;display:inline-block;vertical-align:middle;padding-left:var(--paper-toggle-button-label-spacing, 8px);pointer-events:none;color:var(--paper-toggle-button-label-color, var(--primary-text-color));}:host([invalid]) .toggle-bar{background-color:var(--paper-toggle-button-invalid-bar-color, var(--error-color));}:host([invalid]) .toggle-button{background-color:var(--paper-toggle-button-invalid-button-color, var(--error-color));}:host([invalid]) .toggle-ink{color:var(--paper-toggle-button-invalid-ink-color, var(--error-color));}</style><div class="toggle-container"><div id="toggleBar" class="toggle-bar"></div><div id="toggleButton" class="toggle-button"></div></div><div class="toggle-label"><slot></slot></div></template><script>Polymer({is:"paper-toggle-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){Polymer.Gestures.setTouchAction(this,"pan-y")})},_ontrack:function(t){var e=t.detail;"start"===e.state?this._trackStart(e):"track"===e.state?this._trackMove(e):"end"===e.state&&this._trackEnd(e)},_trackStart:function(t){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(t){var e=t.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+e:e)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(t){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var t=Polymer.PaperRippleBehavior._createRipple();return t.id="ink",t.setAttribute("recenters",""),t.classList.add("circle","toggle-ink"),t}});</script></dom-module><dom-module id="ha-entity-toggle" assetpath="components/entity/"><template><style>:host{white-space:nowrap;}paper-icon-button{color:var(--primary-text-color);transition:color .5s;}paper-icon-button[state-active]{color:var(--primary-color);}paper-toggle-button{cursor:pointer;--paper-toggle-button-label-spacing:0;padding:13px 5px;margin:-4px -5px;}</style><template is="dom-if" if="[[stateObj.attributes.assumed_state]]"><paper-icon-button icon="mdi:flash-off" on-tap="turnOff" state-active$="[[!isOn]]"></paper-icon-button><paper-icon-button icon="mdi:flash" on-tap="turnOn" state-active$="[[isOn]]"></paper-icon-button></template><template is="dom-if" if="[[!stateObj.attributes.assumed_state]]"><paper-toggle-button checked="[[toggleChecked]]" on-change="toggleChanged"></paper-toggle-button></template></template></dom-module><script>Polymer({is:"ha-entity-toggle",properties:{hass:{type:Object},stateObj:{type:Object},toggleChecked:{type:Boolean,value:!1},isOn:{type:Boolean,computed:"computeIsOn(stateObj)",observer:"isOnChanged"}},listeners:{tap:"onTap"},onTap:function(t){t.stopPropagation()},ready:function(){this.forceStateChange()},toggleChanged:function(t){var e=t.target.checked;setTimeout(function(){var t=document.activeElement;t.blur(),t.focus()},0),e&&!this.isOn?this.callService(!0):!e&&this.isOn&&this.callService(!1)},isOnChanged:function(t){this.toggleChecked=t;var e=this.shadowRoot.querySelector("paper-toggle-button");e&&(e.focus(),e.blur())},forceStateChange:function(){this.toggleChecked===this.isOn&&(this.toggleChecked=!this.toggleChecked),this.toggleChecked=this.isOn},turnOn:function(){this.callService(!0)},turnOff:function(){this.callService(!1)},computeIsOn:function(t){return t&&-1===window.hassUtil.OFF_STATES.indexOf(t.state)},callService:function(t){var e,i,n,o=window.hassUtil.computeDomain(this.stateObj);"lock"===o?(e="lock",i=t?"lock":"unlock"):"cover"===o?(e="cover",i=t?"open":"close"):(e="homeassistant",i=t?"turn_on":"turn_off"),n=this.stateObj,this.hass.callService(e,i,{entity_id:this.stateObj.entity_id}).then(function(){setTimeout(function(){this.stateObj===n&&this.forceStateChange()}.bind(this),2e3)}.bind(this))}});</script><dom-module id="ha-state-icon" assetpath="components/entity/"><template><iron-icon icon="[[computeIcon(stateObj)]]"></iron-icon></template></dom-module><script>Polymer({is:"ha-state-icon",properties:{stateObj:{type:Object}},computeIcon:function(t){return window.hassUtil.stateIcon(t)}});</script><dom-module id="state-badge" assetpath="components/entity/"><template><style>:host{position:relative;display:inline-block;width:40px;color:var(--paper-item-icon-color, #44739e);border-radius:50%;height:40px;text-align:center;background-size:cover;line-height:40px;}ha-state-icon{transition:color .3s ease-in-out;}ha-state-icon[data-domain=light][data-state=on],
     ha-state-icon[data-domain=switch][data-state=on],
     ha-state-icon[data-domain=binary_sensor][data-state=on],
     ha-state-icon[data-domain=sun][data-state=above_horizon]{color:var(--paper-item-icon-active-color, #FDD835);}ha-state-icon[data-state=unavailable]{color:var(--disabled-text-color);}</style><ha-state-icon id="icon" state-obj="[[stateObj]]" data-domain$="[[computeDomain(stateObj)]]" data-state$="[[stateObj.state]]"></ha-state-icon></template></dom-module><script>Polymer({is:"state-badge",properties:{stateObj:{type:Object,observer:"updateIconColor"}},computeDomain:function(t){return window.hassUtil.computeDomain(t)},updateIconColor:function(t){if(t.attributes.entity_picture)return this.style.backgroundImage="url("+t.attributes.entity_picture+")",void(this.$.icon.style.display="none");this.style.backgroundImage="",this.$.icon.style.display="inline","light"===window.hassUtil.computeDomain(t)&&"on"===t.state&&t.attributes.rgb_color&&t.attributes.rgb_color.reduce(function(t,e){return t+e},0)<730?this.$.icon.style.color="rgb("+t.attributes.rgb_color.join(",")+")":this.$.icon.style.color=null}});</script><script>Polymer({is:"ha-relative-time",properties:{datetime:{type:String,observer:"datetimeChanged"},datetimeObj:{type:Object,observer:"datetimeObjChanged"},parsedDateTime:{type:Object}},created:function(){this.updateRelative=this.updateRelative.bind(this)},attached:function(){this.updateInterval=setInterval(this.updateRelative,6e4)},detached:function(){clearInterval(this.updateInterval)},datetimeChanged:function(e){this.parsedDateTime=e?new Date(e):null,this.updateRelative()},datetimeObjChanged:function(e){this.parsedDateTime=e,this.updateRelative()},updateRelative:function(){Polymer.dom(this).innerHTML=this.parsedDateTime?window.hassUtil.relativeTime(this.parsedDateTime):"never"}});</script><dom-module id="state-info" assetpath="components/entity/"><template><style>:host{@apply (--paper-font-body1);min-width:150px;white-space:nowrap;}state-badge{float:left;}.info{margin-left:56px;}.name{@apply (--paper-font-common-nowrap);color:var(--primary-text-color);line-height:40px;}.name[in-dialog], :host([secondary-line]) .name{line-height:20px;}.time-ago, ::slotted(*){@apply (--paper-font-common-nowrap);color:var(--secondary-text-color);}</style><div><state-badge state-obj="[[stateObj]]"></state-badge><div class="info"><div class="name" in-dialog$="[[inDialog]]">[[computeStateName(stateObj)]]</div><template is="dom-if" if="[[inDialog]]"><div class="time-ago"><ha-relative-time datetime="[[stateObj.last_changed]]"></ha-relative-time></div></template><template is="dom-if" if="[[!inDialog]]"><slot></slot></template></div></div></template></dom-module><script>Polymer({is:"state-info",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object},inDialog:{type:Boolean}},computeStateName:function(e){return window.hassUtil.computeStateName(e)}});</script><dom-module id="state-card-climate" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{@apply (--paper-font-body1);line-height:1.5;}.state{margin-left:16px;text-align:right;}.target{color:var(--primary-text-color);}.current{color:var(--secondary-text-color);}.operation-mode{font-weight:bold;text-transform:capitalize;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state"><div class="target"><span class="operation-mode">[[stateObj.attributes.operation_mode]] </span><span>[[computeTargetTemperature(stateObj)]]</span></div><div class="current"><span>Currently: </span><span>[[stateObj.attributes.current_temperature]]</span> <span></span> <span>[[stateObj.attributes.unit_of_measurement]]</span></div></div></div></template></dom-module><script>Polymer({is:"state-card-climate",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},computeTargetTemperature:function(t){var e="";return t.attributes.target_temp_low&&t.attributes.target_temp_high?e=t.attributes.target_temp_low+" - "+t.attributes.target_temp_high+" "+t.attributes.unit_of_measurement:t.attributes.temperature&&(e=t.attributes.temperature+" "+t.attributes.unit_of_measurement),e}});</script><dom-module id="state-card-configurator" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-button{color:var(--primary-color);font-weight:500;top:3px;height:37px;margin-right:-.57em;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-button hidden$="[[inDialog]]">[[stateObj.state]]</paper-button></div><template is="dom-if" if="[[stateObj.attributes.description_image]]"><img hidden="" src="[[stateObj.attributes.description_image]]"></template></template></dom-module><script>Polymer({is:"state-card-configurator",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}});</script><script>!function(){function t(t,s){Object.defineProperty(window.CoverEntity.prototype,t,{get:s})}window.CoverEntity=function(t,s){this.hass=t,this.stateObj=s},t("isFullyOpen",function(){return void 0!==this.stateObj.attributes.current_position?100===this.stateObj.attributes.current_position:"open"===this.stateObj.state}),t("isFullyClosed",function(){return void 0!==this.stateObj.attributes.current_position?0===this.stateObj.attributes.current_position:"closed"===this.stateObj.state}),t("isFullyOpenTilt",function(){return 100===this.stateObj.attributes.current_tilt_position}),t("isFullyClosedTilt",function(){return 0===this.stateObj.attributes.current_tilt_position}),t("supportsOpen",function(){return 0!=(1&this.stateObj.attributes.supported_features)}),t("supportsClose",function(){return 0!=(2&this.stateObj.attributes.supported_features)}),t("supportsSetPosition",function(){return 0!=(4&this.stateObj.attributes.supported_features)}),t("supportsStop",function(){return 0!=(8&this.stateObj.attributes.supported_features)}),t("supportsOpenTilt",function(){return 0!=(16&this.stateObj.attributes.supported_features)}),t("supportsCloseTilt",function(){return 0!=(32&this.stateObj.attributes.supported_features)}),t("supportsStopTilt",function(){return 0!=(64&this.stateObj.attributes.supported_features)}),t("supportsSetTiltPosition",function(){return 0!=(128&this.stateObj.attributes.supported_features)}),t("isTiltOnly",function(){var t=this.supportsOpen||this.supportsClose||this.supportsStop;return(this.supportsOpenTilt||this.supportsCloseTilt||this.supportsStopTilt)&&!t}),Object.assign(window.CoverEntity.prototype,{openCover:function(){this.callService("open_cover")},closeCover:function(){this.callService("close_cover")},stopCover:function(){this.callService("stop_cover")},openCoverTilt:function(){this.callService("open_cover_tilt")},closeCoverTilt:function(){this.callService("close_cover_tilt")},stopCoverTilt:function(){this.callService("stop_cover_tilt")},setCoverPosition:function(t){this.callService("set_cover_position",{position:t})},setCoverTiltPosition:function(t){this.callService("set_cover_tilt_position",{tilt_position:t})},callService:function(t,s){var e=s||{};e.entity_id=this.stateObj.entity_id,this.hass.callService("cover",t,e)}})}();</script><dom-module id="ha-cover-controls" assetpath="components/"><template><style>.state{white-space:nowrap;}[invisible]{visibility:hidden !important;}</style><div class="state"><paper-icon-button icon="mdi:arrow-up" on-tap="onOpenTap" invisible$="[[!entityObj.supportsOpen]]" disabled="[[computeOpenDisabled(stateObj, entityObj)]]"></paper-icon-button><paper-icon-button icon="mdi:stop" on-tap="onStopTap" invisible$="[[!entityObj.supportsStop]]"></paper-icon-button><paper-icon-button icon="mdi:arrow-down" on-tap="onCloseTap" invisible$="[[!entityObj.supportsClose]]" disabled="[[computeClosedDisabled(stateObj, entityObj)]]"></paper-icon-button></div></template></dom-module><script>Polymer({is:"ha-cover-controls",properties:{hass:{type:Object},stateObj:{type:Object},entityObj:{type:Object,computed:"computeEntityObj(hass, stateObj)"}},computeEntityObj:function(t,e){return new window.CoverEntity(t,e)},computeOpenDisabled:function(t,e){var o=!0===t.attributes.assumed_state;return e.isFullyOpen&&!o},computeClosedDisabled:function(t,e){var o=!0===t.attributes.assumed_state;return e.isFullyClosed&&!o},onOpenTap:function(t){t.stopPropagation(),this.entityObj.openCover()},onCloseTap:function(t){t.stopPropagation(),this.entityObj.closeCover()},onStopTap:function(t){t.stopPropagation(),this.entityObj.stopCover()}});</script><script>Polymer.IronRangeBehavior={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(t){return(this._clampValue(t)-this.min)/(this.max-this.min)},_clampValue:function(t){return Math.min(this.max,Math.max(this.min,this._calcStep(t)))},_calcStep:function(t){if(t=parseFloat(t),!this.step)return t;var e=Math.round((t-this.min)/this.step);return this.step<1?e/(1/this.step)+this.min:e*this.step+this.min},_validateValue:function(){var t=this._clampValue(this.value);return this.value=this.oldValue=isNaN(t)?this.oldValue:t,this.value!==t},_update:function(){this._validateValue(),this._setRatio(100*this._calcRatio(this.value))}};</script><dom-module id="paper-progress" assetpath="../bower_components/paper-progress/"><template><style>:host{display:block;width:200px;position:relative;overflow:hidden;}:host([hidden]), [hidden]{display:none !important;}#progressContainer{@apply --paper-progress-container;position:relative;}#progressContainer,
diff --git a/homeassistant/components/frontend/www_static/frontend.html.gz b/homeassistant/components/frontend/www_static/frontend.html.gz
index 3f276617078925ed87353c7d1a8bebd1c3c55dc4..0a33f1ddefd7e15433f52b38b45a0e71c47398f3 100644
Binary files a/homeassistant/components/frontend/www_static/frontend.html.gz and b/homeassistant/components/frontend/www_static/frontend.html.gz differ
diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer
index 73289bca6d4e326de4484e991019e10f69a351ed..a46e6b4cfa24d99011a9755e2588d761d78af152 160000
--- a/homeassistant/components/frontend/www_static/home-assistant-polymer
+++ b/homeassistant/components/frontend/www_static/home-assistant-polymer
@@ -1 +1 @@
-Subproject commit 73289bca6d4e326de4484e991019e10f69a351ed
+Subproject commit a46e6b4cfa24d99011a9755e2588d761d78af152
diff --git a/homeassistant/components/frontend/www_static/panels/ha-panel-config.html b/homeassistant/components/frontend/www_static/panels/ha-panel-config.html
index 8310c6e46edffd7d91425b0e44857e217f89bf58..c052fca2dc9851ee83fb7468afaf5675a34d72ae 100644
--- a/homeassistant/components/frontend/www_static/panels/ha-panel-config.html
+++ b/homeassistant/components/frontend/www_static/panels/ha-panel-config.html
@@ -1,4 +1,4 @@
-<html><head></head><body><div hidden="" by-polymer-bundler=""><dom-module id="ha-config-section"><template><style include="iron-flex ha-style">.content{padding:28px 20px 0;max-width:1040px;margin:0 auto;}.header{@apply (--paper-font-display1);opacity:var(--dark-primary-opacity);}.together{margin-top:32px;}.intro{@apply (--paper-font-subhead);width:100%;max-width:400px;margin-right:40px;opacity:var(--dark-primary-opacity);}.panel{margin-top:-24px;}.panel ::slotted(*){margin-top:24px;display:block;}.narrow.content{max-width:640px;}.narrow .together{margin-top:20px;}.narrow .header{@apply (--paper-font-headline);}.narrow .intro{font-size:14px;padding-bottom:20px;margin-right:0;max-width:500px;}</style><div class$="[[computeContentClasses(isWide)]]"><div class="header"><slot name="header"></slot></div><div class$="[[computeClasses(isWide)]]"><div class="intro"><slot name="introduction"></slot></div><div class="flex panel"><slot></slot></div></div></div></template></dom-module><script>Polymer({is:"ha-config-section",properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},isWide:{type:Boolean,value:!1}},computeContentClasses:function(e){return e?"content ":"content narrow"},computeClasses:function(e){return"together layout "+(e?"horizontal":"vertical narrow")}});</script><dom-module id="ha-config-navigation" assetpath="dashboard/"><template><style include="iron-flex">paper-card{display:block;}paper-item{cursor:pointer;}</style><paper-card><template is="dom-repeat" items="[[pages]]"><template is="dom-if" if="[[_computeLoaded(hass, item)]]"><paper-item on-tap="_navigate"><paper-item-body two-line="">[[_computeCaption(item)]]<div secondary="">[[_computeDescription(item)]]</div></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></template></template></paper-card></template></dom-module><script>Polymer({is:"ha-config-navigation",properties:{hass:{type:Object},pages:{type:Array,value:[{domain:"core",caption:"General",description:"Validate your configuration file and control the server.",loaded:!0},{domain:"customize",caption:"Customization",description:"Customize you entities.",loaded:!0},{domain:"automation",caption:"Automation",description:"Create and edit automations."},{domain:"script",caption:"Script",description:"Create and edit scripts."},{domain:"zwave",caption:"Z-Wave",description:"Manage your Z-Wave network."}]}},_computeLoaded:function(i,o){return o.loaded||window.hassUtil.isComponentLoaded(i,o.domain)},_computeCaption:function(i){return i.caption},_computeDescription:function(i){return i.description},_navigate:function(i){history.pushState(null,null,"/config/"+i.model.item.domain),this.fire("location-changed")}});</script><dom-module id="ha-config-cloud-menu" assetpath="dashboard/"><template><style include="iron-flex">paper-card{display:block;}paper-item{cursor:pointer;}</style><paper-card><paper-item on-tap="_navigate"><paper-item-body two-line="">Home Assistant Cloud<template is="dom-if" if="[[account]]"><div secondary="">Logged in as [[account.email]]</div></template><template is="dom-if" if="[[!account]]"><div secondary="">Not logged in</div></template></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></paper-card></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),HaConfigCloudMenu=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.NavigateMixin(Polymer.Element)),_createClass(t,[{key:"_navigate",value:function(){this.navigate("/config/cloud")}}],[{key:"is",get:function(){return"ha-config-cloud-menu"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,account:Object}}}]),t}();customElements.define(HaConfigCloudMenu.is,HaConfigCloudMenu);</script><dom-module id="ha-config-dashboard" assetpath="dashboard/"><template><style include="iron-flex ha-style">.content{padding-bottom:32px;}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><ha-menu-button narrow="[[narrow]]" show-menu="[[showMenu]]"></ha-menu-button><div main-title="">Configuration</div></app-toolbar></app-header><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Configure Home Assistant</span> <span slot="introduction">Here it is possible to configure your components and Home Assistant. Not everything is possible to configure from the UI yet, but we're working on it.</span><template is="dom-if" if="[[computeIsCloudLoaded(hass)]]"><ha-config-cloud-menu hass="[[hass]]" account="[[account]]"></ha-config-cloud-menu></template><ha-config-navigation hass="[[hass]]"></ha-config-navigation></ha-config-section></div></app-header-layout></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),HaConfigDashboard=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"computeIsCloudLoaded",value:function(e){return window.hassUtil.isComponentLoaded(e,"cloud")}}],[{key:"is",get:function(){return"ha-config-dashboard"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,account:Object,narrow:Boolean,showMenu:Boolean}}}]),t}();customElements.define(HaConfigDashboard.is,HaConfigDashboard);</script><dom-module id="ha-config-section-core" assetpath="core/"><template><style include="iron-flex ha-style">.validate-container{@apply (--layout-vertical);@apply (--layout-center-center);height:140px;}.validate-result{color:var(--google-green-500);font-weight:500;margin-bottom:1em;}.config-invalid{margin:1em 0;}.config-invalid .text{color:var(--google-red-500);font-weight:500;}.config-invalid paper-button{float:right;}.validate-log{white-space:pre-wrap;}</style><ha-config-section is-wide="[[isWide]]"><span slot="header">Server Management</span> <span slot="introduction">Changing your configuration can be a tiresome process. We know. This section will try to make your life a little bit easier.</span><paper-card heading="Configuration Validation"><div class="card-content">Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid.<template is="dom-if" if="[[!validateLog]]"><div class="validate-container"><template is="dom-if" if="[[!validating]]"><div class="validate-result" id="result">[[validateResult]]</div><paper-button raised="" on-tap="validateConfig">check config</paper-button></template><template is="dom-if" if="[[validating]]"><paper-spinner active=""></paper-spinner></template></div></template><template is="dom-if" if="[[validateLog]]"><div class="config-invalid"><span class="text">Configuration invalid.</span><paper-button raised="" on-tap="validateConfig">check config</paper-button></div><div id="configLog" class="validate-log">[[validateLog]]</div></template></div></paper-card><paper-card heading="Configuration Reloading"><div class="card-content">Some parts of Home Assistant can reload without requiring a restart. Hitting reload will unload their current configuration and load the new one.</div><div class="card-actions"><ha-call-service-button hass="[[hass]]" domain="homeassistant" service="reload_core_config">Reload Core</ha-call-service-button><ha-call-service-button hass="[[hass]]" domain="group" service="reload" hidden$="[[!groupLoaded(hass)]]">Reload Groups</ha-call-service-button><ha-call-service-button hass="[[hass]]" domain="automation" service="reload" hidden$="[[!automationLoaded(hass)]]">Reload Automation</ha-call-service-button><ha-call-service-button hass="[[hass]]" domain="script" service="reload" hidden$="[[!scriptLoaded(hass)]]">Reload Scripts</ha-call-service-button></div></paper-card><paper-card heading="Server Management"><div class="card-content">Control your Home Assistant server… from Home Assistant.</div><div class="card-actions warning"><ha-call-service-button class="warning" hass="[[hass]]" domain="homeassistant" service="restart">Restart</ha-call-service-button><ha-call-service-button class="warning" hass="[[hass]]" domain="homeassistant" service="stop">Stop</ha-call-service-button></div></paper-card></ha-config-section></template></dom-module><script>Polymer({is:"ha-config-section-core",properties:{hass:{type:Object},isWide:{type:Boolean,value:!1},validating:{type:Boolean,value:!1},validateResult:{type:String,value:""},validateLog:{type:String,value:""}},groupLoaded:function(i){return window.hassUtil.isComponentLoaded(i,"group")},automationLoaded:function(i){return window.hassUtil.isComponentLoaded(i,"automation")},scriptLoaded:function(i){return window.hassUtil.isComponentLoaded(i,"script")},validateConfig:function(){this.validating=!0,this.validateLog="",this.validateResult="";var i=this;this.hass.callApi("POST","config/core/check_config").then(function(t){i.validating=!1,(i.configValid="valid"===t.result)?i.validateResult="Valid!":i.validateLog=t.errors})}});</script><dom-module id="ha-config-section-hassbian" assetpath="core/"><template><style include="iron-flex ha-style">.header{font-size:16px;margin-bottom:1em;}.header .status{font-size:14px;float:right;}.card-actions paper-button{color:var(--default-primary-color);font-weight:500;}</style><ha-config-section is-wide="[[isWide]]"><span slot="header">Bring Hassbian to the next level</span> <span slot="introduction">Discover exciting add-ons to enhance your Home Assistant installation. Add an MQTT server or control a connected TV via HDMI-CEC.</span><template is="dom-if" if="[[suiteStatus]]"><template is="dom-repeat" items="[[computeSuiteKeys(suiteStatus)]]" as="suiteKey"><paper-card><div class="card-content"><div class="header">[[computeTitle(suiteKey)]] <span class="status">[[computeSuiteStatus(suiteStatus, suiteKey)]]</span></div>[[computeSuiteDescription(suiteStatus, suiteKey)]]</div><div class="card-actions"><paper-button on-tap="suiteMoreInfoTapped">LEARN MORE</paper-button><template is="dom-if" if="[[computeShowInstall(suiteStatus, suiteKey)]]"><paper-button on-tap="suiteActionTapped">INSTALL</paper-button></template></div></paper-card></template></template></ha-config-section></template></dom-module><script>Polymer({is:"ha-config-section-hassbian",properties:{hass:{type:Object},isWide:{type:Boolean},suiteStatus:{type:Object,value:null}},updateStatus:function(){this.hass.callApi("GET","config/hassbian/suites").then(function(t){this.suiteStatus=t;for(var e=!1,s=Object.keys(t),i=0;i<s.length;i++)if("installing"===t[s[i]].state){e=!0;break}e&&this.async(this.updateStatus,5e3)}.bind(this))},attached:function(){this.updateStatus=this.updateStatus.bind(this),this.updateStatus()},computeSuiteKeys:function(t){return Object.keys(t).sort(function(e,s){var i="installing"===t[e].state,n="installing"===t[s].state;if(i&&n);else{if(i)return-1;if(n)return 1}return e<s?-1:e>s?1:0})},computeSuiteDescription:function(t,e){return t[e].description},computeTitle:function(t){return t.substr(0,1).toUpperCase()+t.substr(1)},computeSuiteStatus:function(t,e){var s=t[e].state.replace(/_/," ");return s.substr(0,1).toUpperCase()+s.substr(1)},computeShowStatus:function(t,e){var s=t[e].state;return"installing"!==s&&"not_installed"!==s},computeShowInstall:function(t,e){return"not_installed"===t[e].state},suiteMoreInfoTapped:function(){},suiteActionTapped:function(){this.hass.callApi("POST","config/hassbian/suites/openzwave/install").then(this.updateStatus)}});</script><dom-module id="ha-config-section-themes" assetpath="core/"><template><ha-config-section is-wide="[[isWide]]"><span slot="header">Set a theme</span> <span slot="introduction">Choose 'Backend-selected' to use whatever theme the backend chooses or pick a theme for this device.</span><paper-card><div class="card-content"><paper-dropdown-menu label="Theme" vertical-align="bottom"><paper-listbox slot="dropdown-content" selected="{{selectedTheme}}"><template is="dom-repeat" items="[[themes]]" as="theme"><paper-item>[[theme]]</paper-item></template></paper-listbox></paper-dropdown-menu></div></paper-card></ha-config-section></template></dom-module><script>Polymer({is:"ha-config-section-themes",properties:{hass:{type:Object},isWide:{type:Boolean},themes:{type:Array,computed:"computeThemes(hass)"},selectedTheme:{type:Number}},ready:function(){this.hass.selectedTheme&&this.themes.indexOf(this.hass.selectedTheme)>0?this.selectedTheme=this.themes.indexOf(this.hass.selectedTheme):this.hass.selectedTheme||(this.selectedTheme=0)},observers:["selectionChanged(hass, selectedTheme)"],computeThemes:function(e){return e?["Backend-selected","default"].concat(Object.keys(e.themes.themes).sort()):[]},selectionChanged:function(e,s){s>0&&s<this.themes.length?e.selectedTheme!==this.themes[s]&&this.fire("settheme",this.themes[s]):0===s&&""!==e.selectedTheme&&this.fire("settheme","")}});</script><dom-module id="ha-config-core" assetpath="core/"><template><style include="iron-flex ha-style">.content{padding-bottom:32px;}.border{margin:32px auto 0;border-bottom:1px solid rgba(0, 0, 0, 0.12);max-width:1040px;}.narrow .border{max-width:640px;}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="_backTapped"></paper-icon-button><div main-title="">Core</div></app-toolbar></app-header><div class$="[[computeClasses(isWide)]]"><ha-config-section-core is-wide="[[isWide]]" hass="[[hass]]"></ha-config-section-core><template is="dom-if" if="[[computeIsThemesLoaded(hass)]]"><div class="border"></div><ha-config-section-themes is-wide="[[isWide]]" hass="[[hass]]"></ha-config-section-themes></template><template is="dom-if" if="[[computeIsHassbianLoaded(hass)]]"><div class="border"></div><ha-config-section-hassbian is-wide="[[isWide]]" hass="[[hass]]"></ha-config-section-hassbian></template></div></app-header-layout></template></dom-module><script>Polymer({is:"ha-config-core",properties:{hass:Object,isWide:Boolean},computeClasses:function(e){return e?"content":"content narrow"},computeIsHassbianLoaded:function(e){return window.hassUtil.isComponentLoaded(e,"config.hassbian")},computeIsZwaveLoaded:function(e){return window.hassUtil.isComponentLoaded(e,"config.zwave")},computeIsThemesLoaded:function(e){return e.themes&&e.themes.themes&&Object.keys(e.themes.themes).length},_backTapped:function(){history.back()}});</script><dom-module id="hass-subpage" assetpath="../../src/layouts/"><template><style include="ha-style"></style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="_backTapped"></paper-icon-button><div main-title="">[[title]]</div></app-toolbar></app-header><slot></slot></app-header-layout></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),HassSubpage=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"_backTapped",value:function(){history.back()}}],[{key:"is",get:function(){return"hass-subpage"}},{key:"properties",get:function(){return{title:String}}}]),t}();customElements.define(HassSubpage.is,HassSubpage);</script><dom-module id="ha-config-cloud-login" assetpath="cloud/"><template><style include="iron-flex ha-style">.content{padding-bottom:24px;}paper-card{display:block;}paper-item{cursor:pointer;}paper-card:last-child{margin-top:24px;}h1{@apply (--paper-font-headline);margin:0;}.error{color:var(--google-red-500);}.card-actions{display:flex;justify-content:space-between;align-items:center;}[hidden]{display:none;}</style><hass-subpage title="Cloud Login"><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Home Assistant Cloud</span> <span slot="introduction">The Home Assistant Cloud allows you to opt-in to functions that will bring your Home Assistant experience to the next level.<p><i>Home Assistant will never share information with our cloud without your prior permission. </i></p></span><paper-card><div class="card-content"><h1>Sign In</h1><paper-input label="Email" id="emailInput" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input><paper-input label="Password" value="{{_password}}" type="password" on-keydown="_keyDown"></paper-input><div class="error" hidden$="[[!error]]">[[error]]</div></div><div class="card-actions"><ha-progress-button on-tap="_handleLogin" progress="[[_requestInProgress]]">Sign in</ha-progress-button><button class="link" hidden="[[_requestInProgress]]" on-click="_handleForgotPassword">forgot password?</button></div></paper-card><paper-card><paper-item on-tap="_handleRegister"><paper-item-body two-line="">Create Account<div secondary="">It is free and allows easy integration with voice assistants.</div></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></paper-card></ha-config-section></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function _inherits(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}var _createClass=function(){function e(e,o){for(var n=0;n<o.length;n++){var r=o[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(o,n,r){return n&&e(o.prototype,n),r&&e(o,r),o}}(),HaConfigCloudLogin=function(e){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,window.hassMixins.NavigateMixin(window.hassMixins.EventsMixin(Polymer.Element))),_createClass(o,[{key:"_inputChanged",value:function(){this.error=!1}},{key:"_keyDown",value:function(e){13===e.keyCode&&(this._handleLogin(),e.preventDefault())}},{key:"_handleLogin",value:function(){var e=this;this.email?this._password||(this.error="Password is required."):this.error="Email is required.",this.error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/login",{email:this.email,password:this._password}).then(function(o){e.fire("ha-account-refreshed",{account:o}),e.email="",e._password=""},function(o){if(e._password="",e._requestInProgress=!1,o&&o.body&&o.body.message){if("UserNotConfirmed"===o.body.code)return alert("You need to confirm your email before logging in."),void e.navigate("/config/cloud/register#confirm");"PasswordChangeRequired"===o.body.code&&(alert("You need to change your password before logging in."),e.navigate("/config/cloud/forgot-password")),e.error=o.body.message}else e.error="Unknown error"}))}},{key:"_handleRegister",value:function(){this.navigate("/config/cloud/register")}},{key:"_handleForgotPassword",value:function(){this.navigate("/config/cloud/forgot-password")}}],[{key:"is",get:function(){return"ha-config-cloud-login"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,email:{type:String,notify:!0},_password:{type:String,value:""},_requestInProgress:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["_inputChanged(email, _password)"]}}]),o}();customElements.define(HaConfigCloudLogin.is,HaConfigCloudLogin);</script><dom-module id="ha-config-cloud-register" assetpath="cloud/"><template><style include="iron-flex ha-style">paper-card{display:block;}paper-item{cursor:pointer;}paper-card:last-child{margin-top:24px;}h1{@apply (--paper-font-headline);margin:0;}.error{color:var(--google-red-500);}.card-actions{display:flex;justify-content:space-between;align-items:center;}[hidden]{display:none;}</style><hass-subpage title="Register Account"><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Register with the Home Assistant Cloud</span> <span slot="introduction">Register today to easily connect your Home Assistant to cloud-only services.<p>By registering an account you agree to the following terms and conditions.</p><ul><li><a href="#">Terms and Conditions</a></li><li><a href="#">Privacy Policy</a></li></ul><p></p><p><i>Home Assistant will never share information with our cloud without your prior permission. </i></p></span><template is="dom-if" if="[[!_hasConfirmationCode]]"><paper-card><div class="card-content"><div class="header"><h1>Register</h1><div class="error" hidden$="[[!_error]]">[[_error]]</div></div><paper-input autofocus="" label="Email address" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input><paper-input label="Password" value="{{_password}}" type="password" on-keydown="_keyDown"></paper-input></div><div class="card-actions"><ha-progress-button on-tap="_handleRegister" progress="[[_requestInProgress]]">Create Account</ha-progress-button><button class="link" hidden="[[_requestInProgress]]" on-click="_handleShowVerifyAccount">have confirmation code?</button></div></paper-card></template><template is="dom-if" if="[[_hasConfirmationCode]]"><paper-card><div class="card-content"><div class="header"><h1>Verify email</h1><div class="error" hidden$="[[!_error]]">[[_error]]</div></div><p>Check your email address, we've emailed you a verification code to activate your account.</p><template is="dom-if" if="[[_showEmailInputForConfirmation]]"><paper-input label="Email address" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input></template><paper-input label="Confirmation code" value="{{_confirmationCode}}" on-keydown="_keyDown" type="number"></paper-input></div><div class="card-actions"><ha-progress-button on-tap="_handleVerifyEmail" progress="[[_requestInProgress]]">Verify Email</ha-progress-button></div></paper-card></template></ha-config-section></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function _inherits(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}var _createClass=function(){function e(e,o){for(var r=0;r<o.length;r++){var t=o[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(o,r,t){return r&&e(o.prototype,r),t&&e(o,t),o}}(),HaConfigCloudRegister=function(e){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,window.hassMixins.NavigateMixin(window.hassMixins.EventsMixin(Polymer.Element))),_createClass(o,[{key:"_inputChanged",value:function(){this._error=!1}},{key:"_keyDown",value:function(e){13===e.keyCode&&(this._hasConfirmationCode?this._handleVerifyEmail():this._handleRegister(),e.preventDefault())}},{key:"_handleRegister",value:function(){var e=this;this.email?this._password||(this._error="Password is required."):this._error="Email is required.",this._error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/register",{email:this.email,password:this._password}).then(function(){e._requestInProgress=!1,e._hasConfirmationCode=!0},function(o){e._password="",e._requestInProgress=!1,e._error=o&&o.body&&o.body.message?o.body.message:"Unknown error"}))}},{key:"_handleShowVerifyAccount",value:function(){this._error="",this._showEmailInputForConfirmation=!0,this._hasConfirmationCode=!0}},{key:"_handleVerifyEmail",value:function(){var e=this;this.email?this._confirmationCode||(this._error="Confirmation code is required."):this._error="Email is required.",this._error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/confirm_register",{email:this.email,confirmation_code:this._confirmationCode}).then(function(){alert("Confirmation successful. You can now login."),e.navigate("config/cloud/login")},function(o){e._confirmationCode="",e._error=o&&o.body&&o.body.message?o.body.message:"Unknown error",e._requestInProgress=!1}))}}],[{key:"is",get:function(){return"ha-config-cloud-register"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,email:{type:String,notify:!0},_requestInProgress:{type:Boolean,value:!1},_password:{type:String,value:""},_showEmailInputForConfirmation:{type:Boolean,value:!1},_hasConfirmationCode:{type:Boolean,value:function(){return"#confirm"===document.location.hash}}}}},{key:"observers",get:function(){return["_inputChanged(email, _password)"]}}]),o}();customElements.define(HaConfigCloudRegister.is,HaConfigCloudRegister);</script><dom-module id="ha-config-cloud-forgot-password" assetpath="cloud/"><template><style include="iron-flex ha-style">.content{padding-bottom:24px;}paper-card{display:block;max-width:600px;margin:0 auto;margin-top:24px;}h1{@apply (--paper-font-headline);margin:0;}.error{color:var(--google-red-500);}.card-actions{display:flex;justify-content:space-between;align-items:center;}.card-actions a{color:var(--primary-text-color);}[hidden]{display:none;}</style><hass-subpage title="Forgot Password"><div class="content"><template is="dom-if" if="[[!_hasToken]]"><paper-card><div class="card-content"><h1>Forgot Password</h1><p>Enter your email address and we will send you a link to reset your password.</p><paper-input autofocus="" label="E-mail" value="{{email}}" type="email" on-keydown="_keyDown"></paper-input><div class="error" hidden$="[[!error]]">[[error]]</div></div><div class="card-actions"><ha-progress-button on-tap="_handleEmailPasswordReset" progress="[[_requestInProgress]]">Send reset email</ha-progress-button><button class="link" hidden="[[_requestInProgress]]" on-click="_handleHaveToken">have a token?</button></div></paper-card></template><template is="dom-if" if="[[_hasToken]]"><paper-card><div class="card-content"><h1>Confirm new password</h1><template is="dom-if" if="[[_showEmailInputForConfirmation]]"><paper-input label="E-mail" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input></template><paper-input label="Confirmation code" value="{{_confirmationCode}}" on-keydown="_keyDown" type="number"></paper-input><paper-input label="New password" value="{{_newPassword}}" on-keydown="_keyDown" type="password"></paper-input><div class="error" hidden$="[[!error]]">[[error]]</div></div><div class="card-actions"><ha-progress-button on-tap="_handleConfirmPasswordReset" progress="[[_requestInProgress]]">Reset Password</ha-progress-button></div></paper-card></template></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function _inherits(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}var _createClass=function(){function e(e,o){for(var r=0;r<o.length;r++){var t=o[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(o,r,t){return r&&e(o.prototype,r),t&&e(o,t),o}}(),HaConfigCloudForgotPassword=function(e){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,window.hassMixins.NavigateMixin(window.hassMixins.EventsMixin(Polymer.Element))),_createClass(o,[{key:"_inputChanged",value:function(){this.error=!1}},{key:"_keyDown",value:function(e){13===e.keyCode&&(this._hasToken?this._handleConfirmPasswordReset():this._handleEmailPasswordReset(),e.preventDefault())}},{key:"_handleEmailPasswordReset",value:function(){var e=this;this.email||(this.error="Email is required."),this.error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/forgot_password",{email:this.email}).then(function(){e._hasToken=!0,e._requestInProgress=!1},function(o){e._requestInProgress=!1,e.error=o&&o.body&&o.body.message?o.body.message:"Unknown error"}))}},{key:"_handleHaveToken",value:function(){this._error="",this._showEmailInputForConfirmation=!0,this._hasToken=!0}},{key:"_handleConfirmPasswordReset",value:function(){var e=this;this.error="",this.email||(this.error+="Email is required. "),this._confirmationCode||(this.error+="Confirmation code is required. "),this._newPassword?this._newPassword.length<6&&(this.error+="New password should be at least 6 characters."):this.error+="New password is required. ",this.error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/confirm_forgot_password",{email:this.email,confirmation_code:this._confirmationCode,new_password:this._newPassword}).then(function(){alert("Password reset successful! You can now login."),e.navigate("config/cloud/login")},function(o){e._requestInProgress=!1,e.error=o&&o.body&&o.body.message?o.body.message:"Unknown error"}))}}],[{key:"is",get:function(){return"ha-config-cloud-forgot-password"}},{key:"properties",get:function(){return{hass:Object,email:{type:String,notify:!0},_hasToken:{type:Boolean,value:!1},_newPassword:{type:String,value:""},_confirmationCode:{type:String,value:""},_showEmailInputForConfirmation:{type:Boolean,value:!1},_requestInProgress:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["_inputChanged(email, _newPassword)"]}}]),o}();customElements.define(HaConfigCloudForgotPassword.is,HaConfigCloudForgotPassword);</script><dom-module id="ha-config-cloud-account" assetpath="cloud/"><template><style include="iron-flex ha-style">.content{padding-bottom:24px;}paper-card{display:block;}.account{display:flex;padding:0 16px;}paper-button{align-self:center;}.soon{font-style:italic;margin-top:24px;text-align:center;}</style><hass-subpage title="Cloud Account"><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Home Assistant Cloud</span> <span slot="introduction">The Home Assistant Cloud allows you to opt-in to functions that will bring your Home Assistant experience to the next level.<p><i>Home Assistant will never share information with our cloud without your prior permission. </i></p></span><paper-card><div class="account"><paper-item-body>[[account.email]]</paper-item-body><paper-button class="warning" on-tap="handleLogout">Sign out</paper-button></div></paper-card><div class="soon">More configuration options coming soon.</div></ha-config-section></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),HaConfigCloudAccount=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.EventsMixin(Polymer.Element)),_createClass(t,[{key:"handleLogout",value:function(){var e=this;this.hass.callApi("post","cloud/logout").then(function(){return e.fire("ha-account-refreshed",{account:null})})}}],[{key:"is",get:function(){return"ha-config-cloud-account"}},{key:"properties",get:function(){return{hass:Object,account:Object}}}]),t}();customElements.define(HaConfigCloudAccount.is,HaConfigCloudAccount);</script><dom-module id="ha-config-cloud" assetpath="cloud/"><template><style>iron-pages{height:100%;}</style><app-route route="[[route]]" pattern="/:page" data="{{_routeData}}" tail="{{_routeTail}}"></app-route><template is="dom-if" if="[[account]]" restamp=""><ha-config-cloud-account hass="[[hass]]" account="[[account]]" is-wide="[[isWide]]"></ha-config-cloud-account></template><template is="dom-if" if="[[!account]]" restamp=""><template is="dom-if" if="[[_isLoginPage(_routeData.page)]]" restamp=""><ha-config-cloud-login page-name="login" hass="[[hass]]" is-wide="[[isWide]]" email="{{_loginEmail}}"></ha-config-cloud-login></template><template is="dom-if" if="[[_isRegisterPage(_routeData.page)]]" restamp=""><ha-config-cloud-register page-name="register" hass="[[hass]]" is-wide="[[isWide]]" email="{{_loginEmail}}"></ha-config-cloud-register></template><template is="dom-if" if="[[_isForgotPasswordPage(_routeData.page)]]" restamp=""><ha-config-cloud-forgot-password page-name="forgot-password" hass="[[hass]]" is-wide="[[isWide]]" email="{{_loginEmail}}"></ha-config-cloud-forgot-password></template></template></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),HaConfigCloud=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.NavigateMixin(Polymer.Element)),_createClass(t,[{key:"_checkRoute",value:function(e,t){e&&"/config/cloud"===e.prefix&&(t||-1!==["/forgot-password","/register"].indexOf(e.path)?t&&-1!==["/login","/register","/forgot-password"].indexOf(e.path)&&this.navigate("/config/cloud/account",!0):this.navigate("/config/cloud/login",!0))}},{key:"_isRegisterPage",value:function(e){return"register"===e}},{key:"_isForgotPasswordPage",value:function(e){return"forgot-password"===e}},{key:"_isLoginPage",value:function(e){return"login"===e}}],[{key:"is",get:function(){return"ha-config-cloud"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,loadingAccount:{type:Boolean,value:!1},account:{type:Object,value:null},route:Object,_routeData:Object,_routeTail:Object,_loginEmail:String}}},{key:"observers",get:function(){return["_checkRoute(route, account)"]}}]),t}();customElements.define(HaConfigCloud.is,HaConfigCloud);</script><dom-module id="paper-fab" assetpath="../../bower_components/paper-fab/"><template strip-whitespace=""><style include="paper-material-styles">:host{@apply --layout-vertical;@apply --layout-center-center;background:var(--paper-fab-background, var(--accent-color));border-radius:50%;box-sizing:border-box;color:var(--text-primary-color);cursor:pointer;height:56px;min-width:0;outline:none;padding:16px;position:relative;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;width:56px;z-index:0;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;@apply --paper-fab;}[hidden]{display:none !important;}:host([mini]){width:40px;height:40px;padding:8px;@apply --paper-fab-mini;}:host([disabled]){color:var(--paper-fab-disabled-text, var(--paper-grey-500));background:var(--paper-fab-disabled-background, var(--paper-grey-300));@apply --paper-fab-disabled;}iron-icon{@apply --paper-fab-iron-icon;}span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;@apply --paper-fab-label;}:host(.keyboard-focus){background:var(--paper-fab-keyboard-focus-background, var(--paper-pink-900));}:host([elevation="1"]){@apply --paper-material-elevation-1;}:host([elevation="2"]){@apply --paper-material-elevation-2;}:host([elevation="3"]){@apply --paper-material-elevation-3;}:host([elevation="4"]){@apply --paper-material-elevation-4;}:host([elevation="5"]){@apply --paper-material-elevation-5;}</style><iron-icon id="icon" hidden$="{{!_computeIsIconFab(icon, src)}}" src="[[src]]" icon="[[icon]]"></iron-icon><span hidden$="{{_computeIsIconFab(icon, src)}}">{{label}}</span></template><script>Polymer({is:"paper-fab",behaviors:[Polymer.PaperButtonBehavior],properties:{src:{type:String,value:""},icon:{type:String,value:""},mini:{type:Boolean,value:!1,reflectToAttribute:!0},label:{type:String,observer:"_labelChanged"}},_labelChanged:function(){this.setAttribute("aria-label",this.label)},_computeIsIconFab:function(e,t){return e.length>0||t.length>0}});</script></dom-module><dom-module id="ha-automation-picker" assetpath="automation/"><template><style include="ha-style">:host{display:block;}paper-item{cursor:pointer;}paper-fab{position:fixed;bottom:16px;right:16px;z-index:1;}paper-fab[is-wide]{bottom:24px;right:24px;}a{color:var(--primary-color);}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="_backTapped"></paper-icon-button><div main-title="">Automations</div></app-toolbar></app-header><ha-config-section is-wide="[[isWide]]"><div slot="header">Automation editor</div><div slot="introduction">The automation editor allows you to create and edit automations. Please read <a href="https://home-assistant.io/docs/automation/editor/" target="_blank">the instructions</a> to make sure that you have configured Home Assistant correctly.</div><paper-card heading="Pick automation to edit"><template is="dom-if" if="[[!automations.length]]"><div class="card-content"><p>We couldn't find any editable automations.</p></div></template><template is="dom-repeat" items="[[automations]]" as="automation"><paper-item><paper-item-body two-line="" on-tap="automationTapped"><div>[[computeName(automation)]]</div><div secondary="">[[computeDescription(automation)]]</div></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></template></paper-card></ha-config-section><paper-fab is-wide$="[[isWide]]" icon="mdi:plus" title="Add Automation" on-tap="addAutomation"></paper-fab></app-header-layout></template></dom-module><script>Polymer({is:"ha-automation-picker",properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},automations:{type:Array},isWide:{type:Boolean}},automationTapped:function(t){history.pushState(null,null,"/config/automation/edit/"+this.automations[t.model.index].attributes.id),this.fire("location-changed")},addAutomation:function(){history.pushState(null,null,"/config/automation/new"),this.fire("location-changed")},computeName:function(t){return window.hassUtil.computeStateName(t)},computeDescription:function(t){return""},_backTapped:function(){history.back()}});</script><dom-module id="paper-radio-button" assetpath="../../bower_components/paper-radio-button/"><template strip-whitespace=""><style>:host{display:inline-block;line-height:0;white-space:nowrap;cursor:pointer;@apply --paper-font-common-base;--calculated-paper-radio-button-size:var(--paper-radio-button-size, 16px);--calculated-paper-radio-button-ink-size:var(--paper-radio-button-ink-size, -1px);}:host(:focus){outline:none;}#radioContainer{@apply --layout-inline;@apply --layout-center-center;position:relative;width:var(--calculated-paper-radio-button-size);height:var(--calculated-paper-radio-button-size);vertical-align:middle;@apply --paper-radio-button-radio-container;}#ink{position:absolute;top:50%;left:50%;right:auto;width:var(--calculated-paper-radio-button-ink-size);height:var(--calculated-paper-radio-button-ink-size);color:var(--paper-radio-button-unchecked-ink-color, var(--primary-text-color));opacity:0.6;pointer-events:none;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);}#ink[checked]{color:var(--paper-radio-button-checked-ink-color, var(--primary-color));}#offRadio, #onRadio{position:absolute;box-sizing:border-box;top:0;left:0;width:100%;height:100%;border-radius:50%;}#offRadio{border:2px solid var(--paper-radio-button-unchecked-color, var(--primary-text-color));background-color:var(--paper-radio-button-unchecked-background-color, transparent);transition:border-color 0.28s;}#onRadio{background-color:var(--paper-radio-button-checked-color, var(--primary-color));-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform ease 0.28s;transition:transform ease 0.28s;will-change:transform;}:host([checked]) #offRadio{border-color:var(--paper-radio-button-checked-color, var(--primary-color));}:host([checked]) #onRadio{-webkit-transform:scale(0.5);transform:scale(0.5);}#radioLabel{line-height:normal;position:relative;display:inline-block;vertical-align:middle;margin-left:var(--paper-radio-button-label-spacing, 10px);white-space:normal;color:var(--paper-radio-button-label-color, var(--primary-text-color));@apply --paper-radio-button-label;}:host([checked]) #radioLabel{@apply --paper-radio-button-label-checked;}:host-context([dir="rtl"]) #radioLabel{margin-left:0;margin-right:var(--paper-radio-button-label-spacing, 10px);}#radioLabel[hidden]{display:none;}:host([disabled]) #offRadio{border-color:var(--paper-radio-button-unchecked-color, var(--primary-text-color));opacity:0.5;}:host([disabled][checked]) #onRadio{background-color:var(--paper-radio-button-unchecked-color, var(--primary-text-color));opacity:0.5;}:host([disabled]) #radioLabel{opacity:0.65;}</style><div id="radioContainer"><div id="offRadio"></div><div id="onRadio"></div></div><div id="radioLabel"><slot></slot></div></template><script>Polymer({is:"paper-radio-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var e=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),t=Math.floor(3*e);t%2!=e%2&&t++,this.updateStyles({"--paper-radio-button-ink-size":t+"px"})}})}});</script></dom-module><dom-module id="paper-radio-group" assetpath="../../bower_components/paper-radio-group/"><template><style>:host{display:inline-block;}:host ::slotted(*){padding:var(--paper-radio-group-item-padding, 12px);}</style><slot></slot></template></dom-module><script>Polymer({is:"paper-radio-group",behaviors:[Polymer.IronMenubarBehavior],hostAttributes:{role:"radiogroup",tabindex:0},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(e){var t=this._valueToItem(e);if(!t||!t.hasAttribute("disabled")){if(this.selected){var i=this._valueToItem(this.selected);if(this.selected==e){if(!this.allowEmptySelection)return void(i&&(i.checked=!0));e=""}i&&(i.checked=!1)}Polymer.IronSelectableBehavior.select.apply(this,[e]),this.fire("paper-radio-group-changed")}},_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},_onUpKey:function(e){this._focusPrevious(),e.preventDefault(),this._activateFocusedItem()},_onDownKey:function(e){this._focusNext(),e.preventDefault(),this._activateFocusedItem()},_onLeftKey:function(e){Polymer.IronMenubarBehaviorImpl._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){Polymer.IronMenubarBehaviorImpl._onRightKey.apply(this,arguments),this._activateFocusedItem()}});</script><script>var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){"use strict";function e(){}function t(t,n){var o,r,a,i,l=M;for(i=arguments.length;i-- >2;)V.push(arguments[i]);for(n&&null!=n.children&&(V.length||V.push(n.children),delete n.children);V.length;)if((r=V.pop())&&void 0!==r.pop)for(i=r.length;i--;)V.push(r[i]);else"boolean"==typeof r&&(r=null),(a="function"!=typeof t)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(a=!1)),a&&o?l[l.length-1]+=r:l===M?l=[r]:l.push(r),o=a;var u=new e;return u.nodeName=t,u.children=l,u.attributes=null==n?void 0:n,u.key=null==n?void 0:n.key,void 0!==B.vnode&&B.vnode(u),u}function n(e,t){for(var n in t)e[n]=t[n];return e}function o(e){!e._dirty&&(e._dirty=!0)&&1==H.push(e)&&(B.debounceRendering||W)(r)}function r(){var e,t=H;for(H=[];e=t.pop();)e._dirty&&w(e)}function a(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&i(e,t.nodeName):n||e._componentConstructor===t.nodeName}function i(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function l(e){var t=n({},e.attributes);t.children=e.children;var o=e.nodeName.defaultProps;if(void 0!==o)for(var r in o)void 0===t[r]&&(t[r]=o[r]);return t}function u(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function s(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"===(void 0===o?"undefined":D(o))){if("string"!=typeof n)for(var a in n)a in o||(e.style[a]="");for(var a in o)e.style[a]="number"==typeof o[a]&&!1===I.test(a)?o[a]+"px":o[a]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var i=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,c,i):e.removeEventListener(t,c,i),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e)d(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var l=r&&t!==(t=t.replace(/^xlink\:?/,""));null==o||!1===o?l?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(l?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function d(e,t,n){try{e[t]=n}catch(e){}}function c(e){return this._listeners[e.type](B.event&&B.event(e)||e)}function h(){for(var e;e=J.pop();)B.afterMount&&B.afterMount(e),e.componentDidMount&&e.componentDidMount()}function f(e,t,n,o,r,a){K++||(R=null!=r&&void 0!==r.ownerSVGElement,F=null!=e&&!("__preactattr_"in e));var i=g(e,t,n,o,a);return r&&i.parentNode!==r&&r.appendChild(i),--K||(F=!1,a||h()),i}function g(e,t,n,o,r){var a=e,l=R;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(a=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(a,e),b(e,!0))),a.__preactattr_=!0,a;var p=t.nodeName;if("function"==typeof p)return x(e,t,n,o);if(R="svg"===p||"foreignObject"!==p&&R,p=String(p),(!e||!i(e,p))&&(a=u(p,R),e)){for(;e.firstChild;)a.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(a,e),b(e,!0)}var s=a.firstChild,d=a.__preactattr_,c=t.children;if(null==d){d=a.__preactattr_={};for(var h=a.attributes,f=h.length;f--;)d[h[f].name]=h[f].value}return!F&&c&&1===c.length&&"string"==typeof c[0]&&null!=s&&void 0!==s.splitText&&null==s.nextSibling?s.nodeValue!=c[0]&&(s.nodeValue=c[0]):(c&&c.length||null!=s)&&v(a,c,n,o,F||null!=d.dangerouslySetInnerHTML),y(a,t.attributes,d),R=l,a}function v(e,t,n,o,r){var i,l,u,s,d,c=e.childNodes,h=[],f={},v=0,_=0,y=c.length,m=0,C=t?t.length:0;if(0!==y)for(x=0;x<y;x++){var k=c[x],O=k.__preactattr_;null!=(w=C&&O?k._component?k._component.__key:O.key:null)?(v++,f[w]=k):(O||(void 0!==k.splitText?!r||k.nodeValue.trim():r))&&(h[m++]=k)}if(0!==C)for(x=0;x<C;x++){d=null;var w=(s=t[x]).key;if(null!=w)v&&void 0!==f[w]&&(d=f[w],f[w]=void 0,v--);else if(!d&&_<m)for(i=_;i<m;i++)if(void 0!==h[i]&&a(l=h[i],s,r)){d=l,h[i]=void 0,i===m-1&&m--,i===_&&_++;break}d=g(d,s,n,o),u=c[x],d&&d!==e&&d!==u&&(null==u?e.appendChild(d):d===u.nextSibling?p(u):e.insertBefore(d,u))}if(v)for(var x in f)void 0!==f[x]&&b(f[x],!1);for(;_<=m;)void 0!==(d=h[m--])&&b(d,!1)}function b(e,t){var n=e._component;n?P(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||p(e),_(e))}function _(e){for(e=e.lastChild;e;){var t=e.previousSibling;b(e,!0),e=t}}function y(e,t,n){var o;for(o in n)t&&null!=t[o]||null==n[o]||s(e,o,n[o],n[o]=void 0,R);for(o in t)"children"===o||"innerHTML"===o||o in n&&t[o]===("value"===o||"checked"===o?e[o]:n[o])||s(e,o,n[o],n[o]=t[o],R)}function m(e){var t=e.constructor.name;(Z[t]||(Z[t]=[])).push(e)}function C(e,t,n){var o,r=Z[e.name];if(e.prototype&&e.prototype.render?(o=new e(t,n),S.call(o,t,n)):((o=new S(t,n)).constructor=e,o.render=k),r)for(var a=r.length;a--;)if(r[a].constructor===e){o.nextBase=r[a].nextBase,r.splice(a,1);break}return o}function k(e,t,n){return this.constructor(e,n)}function O(e,t,n,r,a){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||a?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===B.syncComponentUpdates&&e.base?o(e):w(e,1,a)),e.__ref&&e.__ref(e))}function w(e,t,o,r){if(!e._disable){var a,i,u,p=e.props,s=e.state,d=e.context,c=e.prevProps||p,g=e.prevState||s,v=e.prevContext||d,_=e.base,y=e.nextBase,m=_||y,k=e._component,x=!1;if(_&&(e.props=c,e.state=g,e.context=v,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(p,s,d)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(p,s,d),e.props=p,e.state=s,e.context=d),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){a=e.render(p,s,d),e.getChildContext&&(d=n(n({},d),e.getChildContext()));var S,j,T=a&&a.nodeName;if("function"==typeof T){var N=l(a);(i=k)&&i.constructor===T&&N.key==i.__key?O(i,N,1,d,!1):(S=i,e._component=i=C(T,N,d),i.nextBase=i.nextBase||y,i._parentComponent=e,O(i,N,0,d,!1),w(i,1,o,!0)),j=i.base}else u=m,(S=k)&&(u=e._component=null),(m||1===t)&&(u&&(u._component=null),j=f(u,a,d,o||!_,m&&m.parentNode,!0));if(m&&j!==m&&i!==k){var D=m.parentNode;D&&j!==D&&(D.replaceChild(j,m),S||(m._component=null,b(m,!1)))}if(S&&P(S),e.base=j,j&&!r){for(var A=e,E=e;E=E._parentComponent;)(A=E).base=j;j._component=A,j._componentConstructor=A.constructor}}if(!_||o?J.unshift(e):x||(e.componentDidUpdate&&e.componentDidUpdate(c,g,v),B.afterUpdate&&B.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);K||r||h()}}function x(e,t,n,o){for(var r=e&&e._component,a=r,i=e,u=r&&e._componentConstructor===t.nodeName,p=u,s=l(t);r&&!p&&(r=r._parentComponent);)p=r.constructor===t.nodeName;return r&&p&&(!o||r._component)?(O(r,s,3,n,o),e=r.base):(a&&!u&&(P(a),e=i=null),r=C(t.nodeName,s,n),e&&!r.nextBase&&(r.nextBase=e,i=null),O(r,s,1,n,o),e=r.base,i&&e!==i&&(i._component=null,b(i,!1))),e}function P(e){B.beforeUnmount&&B.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?P(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,p(t),m(e),_(t)),e.__ref&&e.__ref(null)}function S(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function j(e,t,n){return f(n,e,{},!1,t,!1)}function T(e,t){var n=U({},this.props[e]);t.target.value!==n[t.target.name]&&(t.target.value?n[t.target.name]=t.target.value:delete n[t.target.name],this.props.onChange(this.props.index,n))}function N(e){for(var t=Object.keys(Pe),n=0;n<t.length;n++)if(Pe[t[n]].configKey in e)return t[n];return null}var D="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof(e)},A=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},E=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),L=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},z=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},G=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t?e:t},B={},V=[],M=[],W="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,I=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,H=[],J=[],K=0,R=!1,F=!1,Z={};n(S.prototype,{setState:function(e,t){var r=this.state;this.prevState||(this.prevState=n({},r)),n(r,"function"==typeof e?e(r,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),o(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),w(this,2)},render:function(){}});var $=function(e){function n(e){A(this,n);var t=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state.isValid=!0,t.state.value=JSON.stringify(e.value||{},null,2),t.onChange=t.onChange.bind(t),t}return z(n,S),E(n,[{key:"onChange",value:function(e){var t=e.target.value,n=void 0,o=void 0;try{n=JSON.parse(t),o=!0}catch(e){o=!1}this.setState({value:t,isValid:o}),o&&this.props.onChange(n)}},{key:"componentWillReceiveProps",value:function(e){var t=e.value;this.setState({value:JSON.stringify(t,null,2),isValid:!0})}},{key:"render",value:function(e,n){var o=e.label,r=n.value,a={minWidth:300,width:"100%"};return n.isValid||(a.border="1px solid red"),t("paper-textarea",{label:o,value:r,style:a,"onvalue-changed":this.onChange})}}]),n}(),q=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e.eventDataChanged=e.eventDataChanged.bind(e),e}return z(n,S),E(n,[{key:"eventDataChanged",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event_data:e}))}},{key:"render",value:function(e){var n=e.trigger,o=n.event_type,r=n.event_data;return t("div",null,t("paper-input",{label:"Event Type",name:"event_type",value:o,onChange:this.onChange}),t($,{label:"Event Data",value:r,onChange:this.eventDataChanged}))}}]),n}();q.defaultConfig={event_type:"",event_data:{}};var Q=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.radioGroupPicked=e.radioGroupPicked.bind(e),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event:e.target.selected}))}},{key:"render",value:function(e){var n=e.trigger.event;return t("div",null,t("label",{id:"eventlabel"},"Event:"),t("paper-radio-group",{selected:n,"aria-labelledby":"eventlabel","onpaper-radio-group-changed":this.radioGroupPicked},t("paper-radio-button",{name:"start"},"Start"),t("paper-radio-button",{name:"shutdown"},"Shutdown")))}}]),n}();Q.defaultConfig={event:"start"};var X=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.trigger,o=n.topic,r=n.payload;return t("div",null,t("paper-input",{label:"Topic",name:"topic",value:o,onChange:this.onChange}),t("paper-input",{label:"Payload (Optional)",name:"payload",value:r,onChange:this.onChange}))}}]),n}();X.defaultConfig={topic:""};var Y=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.trigger,o=n.value_template,r=n.entity_id,a=n.below,i=n.above;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:r,onChange:this.onChange}),t("paper-input",{label:"Above",name:"above",value:i,onChange:this.onChange}),t("paper-input",{label:"Below",name:"below",value:a,onChange:this.onChange}),t("paper-textarea",{label:"Value template (optional)",name:"value_template",value:o,"onvalue-changed":this.onChange}))}}]),n}();Y.defaultConfig={entity_id:""};var ee=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.trigger,o=n.entity_id,r=n.to,a=n.from,i=n.for;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"From",name:"from",value:a,onChange:this.onChange}),t("paper-input",{label:"To",name:"to",value:r,onChange:this.onChange}),i&&t("pre",null,"For: ",JSON.stringify(i,null,2)))}}]),n}();ee.defaultConfig={entity_id:""};var te=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e.radioGroupPicked=e.radioGroupPicked.bind(e),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event:e.target.selected}))}},{key:"render",value:function(e){var n=e.trigger,o=n.offset,r=n.event;return t("div",null,t("label",{id:"eventlabel"},"Event:"),t("paper-radio-group",{selected:r,"aria-labelledby":"eventlabel","onpaper-radio-group-changed":this.radioGroupPicked},t("paper-radio-button",{name:"sunrise"},"Sunrise"),t("paper-radio-button",{name:"sunset"},"Sunset")),t("paper-input",{label:"Offset (optional)",name:"offset",value:o,onChange:this.onChange}))}}]),n}();te.defaultConfig={event:"sunrise"};var ne=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-textarea",{label:"Value Template",name:"value_template",value:e.trigger.value_template,"onvalue-changed":this.onChange}))}}]),n}();ne.defaultConfig={value_template:""};var oe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-input",{label:"At",name:"at",value:e.trigger.at,onChange:this.onChange}))}}]),n}();oe.defaultConfig={at:""};var re=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e.radioGroupPicked=e.radioGroupPicked.bind(e),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event:e.target.selected}))}},{key:"render",value:function(e){var n=e.trigger,o=n.entity_id,r=n.zone,a=n.event;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"Zone",name:"zone",value:r,onChange:this.onChange}),t("label",{id:"eventlabel"},"Event:"),t("paper-radio-group",{selected:a,"aria-labelledby":"eventlabel","onpaper-radio-group-changed":this.radioGroupPicked},t("paper-radio-button",{name:"enter"},"Enter"),t("paper-radio-button",{name:"leave"},"Leave")))}}]),n}();re.defaultConfig={entity_id:"",zone:"",event:"enter"};var ae={event:q,state:ee,homeassistant:Q,mqtt:X,numeric_state:Y,sun:te,template:ne,time:oe,zone:re},ie=Object.keys(ae).sort(),le=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return z(n,S),E(n,[{key:"typeChanged",value:function(e){var t=e.target.selectedItem.innerHTML;t!==this.props.trigger.platform&&this.props.onChange(this.props.index,U({platform:t},ae[t].defaultConfig))}},{key:"render",value:function(e){var n=e.index,o=e.trigger,r=e.onChange,a=ae[o.platform],i=ie.indexOf(o.platform);return a?t("div",null,t("paper-dropdown-menu-light",{label:"Trigger Type","no-animations":!0},t("paper-listbox",{slot:"dropdown-content",selected:i,"oniron-select":this.typeChanged},ie.map(function(e){return t("paper-item",null,e)}))),t(a,{index:n,trigger:o,onChange:r})):t("div",null,"Unsupported platform: ",o.platform,t("pre",null,JSON.stringify(o,null,2)))}}]),n}(),ue=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onDelete=e.onDelete.bind(e),e}return z(n,S),E(n,[{key:"onDelete",value:function(){confirm("Sure you want to delete?")&&this.props.onChange(this.props.index,null)}},{key:"render",value:function(e){return t("paper-card",null,t("div",{class:"card-menu"},t("paper-menu-button",{"no-animations":!0,"horizontal-align":"right","horizontal-offset":"-5","vertical-offset":"-5"},t("paper-icon-button",{icon:"mdi:dots-vertical",slot:"dropdown-trigger"}),t("paper-listbox",{slot:"dropdown-content"},t("paper-item",{disabled:!0},"Duplicate"),t("paper-item",{onTap:this.onDelete},"Delete")))),t("div",{class:"card-content"},t(le,e)))}}]),n}(),pe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.addTrigger=e.addTrigger.bind(e),e.triggerChanged=e.triggerChanged.bind(e),e}return z(n,S),E(n,[{key:"addTrigger",value:function(){var e=this.props.trigger.concat(U({platform:"state"},ee.defaultConfig));this.props.onChange(e)}},{key:"triggerChanged",value:function(e,t){var n=this.props.trigger.concat();null===t?n.splice(e,1):n[e]=t,this.props.onChange(n)}},{key:"render",value:function(e){var n=this;return t("div",{class:"triggers"},e.trigger.map(function(e,o){return t(ue,{index:o,trigger:e,onChange:n.triggerChanged})}),t("paper-card",null,t("div",{class:"card-actions add-card"},t("paper-button",{onTap:this.addTrigger},"Add trigger"))))}}]),n}(),se=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.value_template,r=n.entity_id,a=n.below,i=n.above;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:r,onChange:this.onChange}),t("paper-input",{label:"Above",name:"above",value:i,onChange:this.onChange}),t("paper-input",{label:"Below",name:"below",value:a,onChange:this.onChange}),t("paper-textarea",{label:"Value template (optional)",name:"value_template",value:o,"onvalue-changed":this.onChange}))}}]),n}();se.defaultConfig={entity_id:""};var de=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.entity_id,r=n.state,a=n.for;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"State",name:"state",value:r,onChange:this.onChange}),a&&t("pre",null,"For: ",JSON.stringify(a,null,2)))}}]),n}();de.defaultConfig={entity_id:"",state:""};var ce=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e.afterPicked=e.radioGroupPicked.bind(e,"after"),e.beforePicked=e.radioGroupPicked.bind(e,"before"),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e,t){var n=U({},this.props.condition);t.target.selected?n[e]=t.target.selected:delete n[e],this.props.onChange(this.props.index,n)}},{key:"render",value:function(e){var n=e.condition,o=n.after,r=n.after_offset,a=n.before,i=n.before_offset;return t("div",null,t("label",{id:"beforelabel"},"Before:"),t("paper-radio-group",{"allow-empty-selection":!0,selected:a,"aria-labelledby":"beforelabel","onpaper-radio-group-changed":this.beforePicked},t("paper-radio-button",{name:"sunrise"},"Sunrise"),t("paper-radio-button",{name:"sunset"},"Sunset")),t("paper-input",{label:"Before offset (optional)",name:"before_offset",value:i,onChange:this.onChange,disabled:void 0===a}),t("label",{id:"afterlabel"},"After:"),t("paper-radio-group",{"allow-empty-selection":!0,selected:o,"aria-labelledby":"afterlabel","onpaper-radio-group-changed":this.afterPicked},t("paper-radio-button",{name:"sunrise"},"Sunrise"),t("paper-radio-button",{name:"sunset"},"Sunset")),t("paper-input",{label:"After offset (optional)",name:"after_offset",value:r,onChange:this.onChange,disabled:void 0===o}))}}]),n}();ce.defaultConfig={};var he=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-textarea",{label:"Value Template",name:"value_template",value:e.condition.value_template,"onvalue-changed":this.onChange}))}}]),n}();he.defaultConfig={value_template:""};var fe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.after,r=n.before;return t("div",null,t("paper-input",{label:"After",name:"after",value:o,onChange:this.onChange}),t("paper-input",{label:"Before",name:"before",value:r,onChange:this.onChange}))}}]),n}();fe.defaultConfig={};var ge=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.entity_id,r=n.zone;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"Zone entity id",name:"zone",value:r,onChange:this.onChange}))}}]),n}();ge.defaultConfig={entity_id:"",zone:""};var ve={state:de,numeric_state:se,sun:ce,template:he,time:fe,zone:ge},be=Object.keys(ve).sort(),_e=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return z(n,S),E(n,[{key:"typeChanged",value:function(e){var t=e.target.selectedItem.innerHTML;t!==this.props.condition.condition&&this.props.onChange(this.props.index,U({condition:t},ve[t].defaultConfig))}},{key:"render",value:function(e){var n=e.index,o=e.condition,r=e.onChange,a=ve[o.condition],i=be.indexOf(o.condition);return a?t("div",null,t("paper-dropdown-menu-light",{label:"Condition Type","no-animations":!0},t("paper-listbox",{slot:"dropdown-content",selected:i,"oniron-select":this.typeChanged},be.map(function(e){return t("paper-item",null,e)}))),t(a,{index:n,condition:o,onChange:r})):t("div",null,"Unsupported condition: ",o.condition,t("pre",null,JSON.stringify(o,null,2)))}}]),n}(),ye=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onDelete=e.onDelete.bind(e),e}return z(n,S),E(n,[{key:"onDelete",value:function(){confirm("Sure you want to delete?")&&this.props.onChange(this.props.index,null)}},{key:"render",value:function(e){return t("paper-card",null,t("div",{class:"card-menu"},t("paper-menu-button",{"no-animations":!0,"horizontal-align":"right","horizontal-offset":"-5","vertical-offset":"-5"},t("paper-icon-button",{icon:"mdi:dots-vertical",slot:"dropdown-trigger"}),t("paper-listbox",{slot:"dropdown-content"},t("paper-item",{disabled:!0},"Duplicate"),t("paper-item",{onTap:this.onDelete},"Delete")))),t("div",{class:"card-content"},t(_e,e)))}}]),n}(),me=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.addCondition=e.addCondition.bind(e),e.conditionChanged=e.conditionChanged.bind(e),e}return z(n,S),E(n,[{key:"addCondition",value:function(){var e=this.props.condition.concat({condition:"state"});this.props.onChange(e)}},{key:"conditionChanged",value:function(e,t){var n=this.props.condition.concat();null===t?n.splice(e,1):n[e]=t,this.props.onChange(n)}},{key:"render",value:function(e){var n=this;return t("div",{class:"triggers"},e.condition.map(function(e,o){return t(ye,{index:o,condition:e,onChange:n.conditionChanged})}),t("paper-card",null,t("div",{class:"card-actions add-card"},t("paper-button",{onTap:this.addCondition},"Add condition"))))}}]),n}(),Ce=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e.serviceDataChanged=e.serviceDataChanged.bind(e),e}return z(n,S),E(n,[{key:"serviceDataChanged",value:function(e){this.props.onChange(this.props.index,U({},this.props.action,{data:e}))}},{key:"render",value:function(e){var n=e.action,o=n.alias,r=n.service,a=n.data;return t("div",null,t("paper-input",{label:"Alias",name:"alias",value:o,onChange:this.onChange}),t("paper-input",{label:"Service",name:"service",value:r,onChange:this.onChange}),t($,{label:"Service Data",value:a,onChange:this.serviceDataChanged}))}}]),n}();Ce.configKey="service",Ce.defaultConfig={alias:"",service:"",data:{}};var ke=function(e){function n(){return A(this,n),G(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.action,o=e.index,r=e.onChange;return t(_e,{condition:n,onChange:r,index:o})}}]),n}();ke.configKey="condition",ke.defaultConfig=U({condition:"state"},de.defaultConfig);var Oe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-input",{label:"Delay",name:"delay",value:e.action.delay,onChange:this.onChange}))}}]),n}();Oe.configKey="delay",Oe.defaultConfig={delay:""};var we=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e.serviceDataChanged=e.serviceDataChanged.bind(e),e}return z(n,S),E(n,[{key:"serviceDataChanged",value:function(e){this.props.onChange(this.props.index,U({},this.props.action,{data:e}))}},{key:"render",value:function(e){var n=e.action,o=n.event,r=n.event_data;return t("div",null,t("paper-input",{label:"Event",name:"event",value:o,onChange:this.onChange}),t($,{label:"Service Data",value:r,onChange:this.serviceDataChanged}))}}]),n}();we.configKey="event",we.defaultConfig={event:"",event_data:{}};var xe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e.onTemplateChange=e.onTemplateChange.bind(e),e}return z(n,S),E(n,[{key:"onTemplateChange",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,L({},e.target.name,e.target.value)))}},{key:"render",value:function(e){var n=e.action,o=n.wait_template,r=n.timeout;return t("div",null,t("paper-textarea",{label:"Wait Template",name:"wait_template",value:o,"onvalue-changed":this.onTemplateChange}),t("paper-input",{label:"Timeout (Optional)",name:"timeout",value:r,onChange:this.onChange}))}}]),n}();xe.configKey="wait_template",xe.defaultConfig={wait_template:"",timeout:""};var Pe={"Call Service":Ce,Delay:Oe,Wait:xe,Condition:ke,"Fire Event":we},Se=Object.keys(Pe).sort(),je=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return z(n,S),E(n,[{key:"typeChanged",value:function(e){var t=e.target.selectedItem.innerHTML;N(this.props.action)!==t&&this.props.onChange(this.props.index,Pe[t].defaultConfig)}},{key:"render",value:function(e){var n=e.index,o=e.action,r=e.onChange,a=N(o),i=a&&Pe[a],l=Se.indexOf(a);return i?t("div",null,t("paper-dropdown-menu-light",{label:"Action Type","no-animations":!0},t("paper-listbox",{slot:"dropdown-content",selected:l,"oniron-select":this.typeChanged},Se.map(function(e){return t("paper-item",null,e)}))),t(i,{index:n,action:o,onChange:r})):t("div",null,"Unsupported action",t("pre",null,JSON.stringify(o,null,2)))}}]),n}(),Te=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onDelete=e.onDelete.bind(e),e}return z(n,S),E(n,[{key:"onDelete",value:function(){confirm("Sure you want to delete?")&&this.props.onChange(this.props.index,null)}},{key:"render",value:function(e){return t("paper-card",null,t("div",{class:"card-menu"},t("paper-menu-button",{"no-animations":!0,"horizontal-align":"right","horizontal-offset":"-5","vertical-offset":"-5"},t("paper-icon-button",{icon:"mdi:dots-vertical",slot:"dropdown-trigger"}),t("paper-listbox",{slot:"dropdown-content"},t("paper-item",{disabled:!0},"Duplicate"),t("paper-item",{onTap:this.onDelete},"Delete")))),t("div",{class:"card-content"},t(je,e)))}}]),n}(),Ne=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.addAction=e.addAction.bind(e),e.actionChanged=e.actionChanged.bind(e),e}return z(n,S),E(n,[{key:"addAction",value:function(){var e=this.props.script.concat({service:""});this.props.onChange(e)}},{key:"actionChanged",value:function(e,t){var n=this.props.script.concat();null===t?n.splice(e,1):n[e]=t,this.props.onChange(n)}},{key:"render",value:function(e){var n=this;return t("div",{class:"script"},e.script.map(function(e,o){return t(Te,{index:o,action:e,onChange:n.actionChanged})}),t("paper-card",null,t("div",{class:"card-actions add-card"},t("paper-button",{onTap:this.addAction},"Add action"))))}}]),n}(),De=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=e.onChange.bind(e),e.triggerChanged=e.triggerChanged.bind(e),e.conditionChanged=e.conditionChanged.bind(e),e.actionChanged=e.actionChanged.bind(e),e}return z(n,S),E(n,[{key:"onChange",value:function(e){this.props.onChange(U({},this.props.automation,L({},e.target.name,e.target.value)))}},{key:"triggerChanged",value:function(e){this.props.onChange(U({},this.props.automation,{trigger:e}))}},{key:"conditionChanged",value:function(e){this.props.onChange(U({},this.props.automation,{condition:e}))}},{key:"actionChanged",value:function(e){this.props.onChange(U({},this.props.automation,{action:e}))}},{key:"render",value:function(e){var n=e.automation,o=e.isWide,r=n.alias,a=n.trigger,i=n.condition,l=n.action;return t("div",null,t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},r),t("span",{slot:"introduction"},"Use automations to bring your home alive."),t("paper-card",null,t("div",{class:"card-content"},t("paper-input",{label:"Name",name:"alias",value:r,onChange:this.onChange})))),t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},"Triggers"),t("span",{slot:"introduction"},"Triggers are what starts the processing of an automation rule. It is possible to specify multiple triggers for the same rule. Once a trigger starts, Home Assistant will validate the conditions, if any, and call the action.",t("p",null,t("a",{href:"https://home-assistant.io/docs/automation/trigger/",target:"_blank"},"Learn more about triggers."))),t(pe,{trigger:a,onChange:this.triggerChanged})),t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},"Conditions"),t("span",{slot:"introduction"},"Conditions are an optional part of an automation rule and can be used to prevent an action from happening when triggered. Conditions look very similar to triggers but are very different. A trigger will look at events happening in the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is currently on or off.",t("p",null,t("a",{href:"https://home-assistant.io/docs/scripts/conditions/",target:"_blank"},"Learn more about conditions."))),t(me,{condition:i||[],onChange:this.conditionChanged})),t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},"Action"),t("span",{slot:"introduction"},"The actions are what Home Assistant will do when the automation is triggered.",t("p",null,t("a",{href:"https://home-assistant.io/docs/scripts/",target:"_blank"},"Learn more about actions."))),t(Ne,{script:l,onChange:this.actionChanged})))}}]),n}();window.AutomationEditor=function(e,n,o){return j(t(De,n),e,o)},window.unmountPreact=function(e,t){j(function(){return null},e,t)}}();</script><dom-module id="ha-automation-editor" assetpath="automation/"><template><style include="ha-style">.errors{padding:20px;font-weight:bold;color:var(--google-red-500);}.content{padding-bottom:20px;}paper-card{display:block;}.triggers,
+<html><head></head><body><div hidden="" by-polymer-bundler=""><dom-module id="ha-config-section"><template><style include="iron-flex ha-style">.content{padding:28px 20px 0;max-width:1040px;margin:0 auto;}.header{@apply (--paper-font-display1);opacity:var(--dark-primary-opacity);}.together{margin-top:32px;}.intro{@apply (--paper-font-subhead);width:100%;max-width:400px;margin-right:40px;opacity:var(--dark-primary-opacity);}.panel{margin-top:-24px;}.panel ::slotted(*){margin-top:24px;display:block;}.narrow.content{max-width:640px;}.narrow .together{margin-top:20px;}.narrow .header{@apply (--paper-font-headline);}.narrow .intro{font-size:14px;padding-bottom:20px;margin-right:0;max-width:500px;}</style><div class$="[[computeContentClasses(isWide)]]"><div class="header"><slot name="header"></slot></div><div class$="[[computeClasses(isWide)]]"><div class="intro"><slot name="introduction"></slot></div><div class="flex panel"><slot></slot></div></div></div></template></dom-module><script>Polymer({is:"ha-config-section",properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},isWide:{type:Boolean,value:!1}},computeContentClasses:function(e){return e?"content ":"content narrow"},computeClasses:function(e){return"together layout "+(e?"horizontal":"vertical narrow")}});</script><dom-module id="ha-config-navigation" assetpath="dashboard/"><template><style include="iron-flex">paper-card{display:block;}paper-item{cursor:pointer;}</style><paper-card><template is="dom-repeat" items="[[pages]]"><template is="dom-if" if="[[_computeLoaded(hass, item)]]"><paper-item on-tap="_navigate"><paper-item-body two-line="">[[_computeCaption(item)]]<div secondary="">[[_computeDescription(item)]]</div></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></template></template></paper-card></template></dom-module><script>Polymer({is:"ha-config-navigation",properties:{hass:{type:Object},pages:{type:Array,value:[{domain:"core",caption:"General",description:"Validate your configuration file and control the server.",loaded:!0},{domain:"customize",caption:"Customization",description:"Customize your entities.",loaded:!0},{domain:"automation",caption:"Automation",description:"Create and edit automations."},{domain:"script",caption:"Script",description:"Create and edit scripts."},{domain:"zwave",caption:"Z-Wave",description:"Manage your Z-Wave network."}]}},_computeLoaded:function(i,o){return o.loaded||window.hassUtil.isComponentLoaded(i,o.domain)},_computeCaption:function(i){return i.caption},_computeDescription:function(i){return i.description},_navigate:function(i){history.pushState(null,null,"/config/"+i.model.item.domain),this.fire("location-changed")}});</script><dom-module id="ha-config-cloud-menu" assetpath="dashboard/"><template><style include="iron-flex">paper-card{display:block;}paper-item{cursor:pointer;}</style><paper-card><paper-item on-tap="_navigate"><paper-item-body two-line="">Home Assistant Cloud<template is="dom-if" if="[[account]]"><div secondary="">Logged in as [[account.email]]</div></template><template is="dom-if" if="[[!account]]"><div secondary="">Not logged in</div></template></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></paper-card></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),HaConfigCloudMenu=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.NavigateMixin(Polymer.Element)),_createClass(t,[{key:"_navigate",value:function(){this.navigate("/config/cloud")}}],[{key:"is",get:function(){return"ha-config-cloud-menu"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,account:Object}}}]),t}();customElements.define(HaConfigCloudMenu.is,HaConfigCloudMenu);</script><dom-module id="ha-config-dashboard" assetpath="dashboard/"><template><style include="iron-flex ha-style">.content{padding-bottom:32px;}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><ha-menu-button narrow="[[narrow]]" show-menu="[[showMenu]]"></ha-menu-button><div main-title="">Configuration</div></app-toolbar></app-header><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Configure Home Assistant</span> <span slot="introduction">Here it is possible to configure your components and Home Assistant. Not everything is possible to configure from the UI yet, but we're working on it.</span><template is="dom-if" if="[[computeIsCloudLoaded(hass)]]"><ha-config-cloud-menu hass="[[hass]]" account="[[account]]"></ha-config-cloud-menu></template><ha-config-navigation hass="[[hass]]"></ha-config-navigation></ha-config-section></div></app-header-layout></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),HaConfigDashboard=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"computeIsCloudLoaded",value:function(e){return window.hassUtil.isComponentLoaded(e,"cloud")}}],[{key:"is",get:function(){return"ha-config-dashboard"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,account:Object,narrow:Boolean,showMenu:Boolean}}}]),t}();customElements.define(HaConfigDashboard.is,HaConfigDashboard);</script><dom-module id="ha-config-section-core" assetpath="core/"><template><style include="iron-flex ha-style">.validate-container{@apply (--layout-vertical);@apply (--layout-center-center);height:140px;}.validate-result{color:var(--google-green-500);font-weight:500;margin-bottom:1em;}.config-invalid{margin:1em 0;}.config-invalid .text{color:var(--google-red-500);font-weight:500;}.config-invalid paper-button{float:right;}.validate-log{white-space:pre-wrap;}</style><ha-config-section is-wide="[[isWide]]"><span slot="header">Server Management</span> <span slot="introduction">Changing your configuration can be a tiresome process. We know. This section will try to make your life a little bit easier.</span><paper-card heading="Configuration Validation"><div class="card-content">Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid.<template is="dom-if" if="[[!validateLog]]"><div class="validate-container"><template is="dom-if" if="[[!validating]]"><div class="validate-result" id="result">[[validateResult]]</div><paper-button raised="" on-tap="validateConfig">check config</paper-button></template><template is="dom-if" if="[[validating]]"><paper-spinner active=""></paper-spinner></template></div></template><template is="dom-if" if="[[validateLog]]"><div class="config-invalid"><span class="text">Configuration invalid.</span><paper-button raised="" on-tap="validateConfig">check config</paper-button></div><div id="configLog" class="validate-log">[[validateLog]]</div></template></div></paper-card><paper-card heading="Configuration Reloading"><div class="card-content">Some parts of Home Assistant can reload without requiring a restart. Hitting reload will unload their current configuration and load the new one.</div><div class="card-actions"><ha-call-service-button hass="[[hass]]" domain="homeassistant" service="reload_core_config">Reload Core</ha-call-service-button><ha-call-service-button hass="[[hass]]" domain="group" service="reload" hidden$="[[!groupLoaded(hass)]]">Reload Groups</ha-call-service-button><ha-call-service-button hass="[[hass]]" domain="automation" service="reload" hidden$="[[!automationLoaded(hass)]]">Reload Automation</ha-call-service-button><ha-call-service-button hass="[[hass]]" domain="script" service="reload" hidden$="[[!scriptLoaded(hass)]]">Reload Scripts</ha-call-service-button></div></paper-card><paper-card heading="Server Management"><div class="card-content">Control your Home Assistant server… from Home Assistant.</div><div class="card-actions warning"><ha-call-service-button class="warning" hass="[[hass]]" domain="homeassistant" service="restart">Restart</ha-call-service-button><ha-call-service-button class="warning" hass="[[hass]]" domain="homeassistant" service="stop">Stop</ha-call-service-button></div></paper-card></ha-config-section></template></dom-module><script>Polymer({is:"ha-config-section-core",properties:{hass:{type:Object},isWide:{type:Boolean,value:!1},validating:{type:Boolean,value:!1},validateResult:{type:String,value:""},validateLog:{type:String,value:""}},groupLoaded:function(i){return window.hassUtil.isComponentLoaded(i,"group")},automationLoaded:function(i){return window.hassUtil.isComponentLoaded(i,"automation")},scriptLoaded:function(i){return window.hassUtil.isComponentLoaded(i,"script")},validateConfig:function(){this.validating=!0,this.validateLog="",this.validateResult="";var i=this;this.hass.callApi("POST","config/core/check_config").then(function(t){i.validating=!1,(i.configValid="valid"===t.result)?i.validateResult="Valid!":i.validateLog=t.errors})}});</script><dom-module id="ha-config-section-hassbian" assetpath="core/"><template><style include="iron-flex ha-style">.header{font-size:16px;margin-bottom:1em;}.header .status{font-size:14px;float:right;}.card-actions paper-button{color:var(--default-primary-color);font-weight:500;}</style><ha-config-section is-wide="[[isWide]]"><span slot="header">Bring Hassbian to the next level</span> <span slot="introduction">Discover exciting add-ons to enhance your Home Assistant installation. Add an MQTT server or control a connected TV via HDMI-CEC.</span><template is="dom-if" if="[[suiteStatus]]"><template is="dom-repeat" items="[[computeSuiteKeys(suiteStatus)]]" as="suiteKey"><paper-card><div class="card-content"><div class="header">[[computeTitle(suiteKey)]] <span class="status">[[computeSuiteStatus(suiteStatus, suiteKey)]]</span></div>[[computeSuiteDescription(suiteStatus, suiteKey)]]</div><div class="card-actions"><paper-button on-tap="suiteMoreInfoTapped">LEARN MORE</paper-button><template is="dom-if" if="[[computeShowInstall(suiteStatus, suiteKey)]]"><paper-button on-tap="suiteActionTapped">INSTALL</paper-button></template></div></paper-card></template></template></ha-config-section></template></dom-module><script>Polymer({is:"ha-config-section-hassbian",properties:{hass:{type:Object},isWide:{type:Boolean},suiteStatus:{type:Object,value:null}},updateStatus:function(){this.hass.callApi("GET","config/hassbian/suites").then(function(t){this.suiteStatus=t;for(var e=!1,s=Object.keys(t),i=0;i<s.length;i++)if("installing"===t[s[i]].state){e=!0;break}e&&this.async(this.updateStatus,5e3)}.bind(this))},attached:function(){this.updateStatus=this.updateStatus.bind(this),this.updateStatus()},computeSuiteKeys:function(t){return Object.keys(t).sort(function(e,s){var i="installing"===t[e].state,n="installing"===t[s].state;if(i&&n);else{if(i)return-1;if(n)return 1}return e<s?-1:e>s?1:0})},computeSuiteDescription:function(t,e){return t[e].description},computeTitle:function(t){return t.substr(0,1).toUpperCase()+t.substr(1)},computeSuiteStatus:function(t,e){var s=t[e].state.replace(/_/," ");return s.substr(0,1).toUpperCase()+s.substr(1)},computeShowStatus:function(t,e){var s=t[e].state;return"installing"!==s&&"not_installed"!==s},computeShowInstall:function(t,e){return"not_installed"===t[e].state},suiteMoreInfoTapped:function(){},suiteActionTapped:function(){this.hass.callApi("POST","config/hassbian/suites/openzwave/install").then(this.updateStatus)}});</script><dom-module id="ha-config-section-themes" assetpath="core/"><template><ha-config-section is-wide="[[isWide]]"><span slot="header">Set a theme</span> <span slot="introduction">Choose 'Backend-selected' to use whatever theme the backend chooses or pick a theme for this device.</span><paper-card><div class="card-content"><paper-dropdown-menu label="Theme" vertical-align="bottom"><paper-listbox slot="dropdown-content" selected="{{selectedTheme}}"><template is="dom-repeat" items="[[themes]]" as="theme"><paper-item>[[theme]]</paper-item></template></paper-listbox></paper-dropdown-menu></div></paper-card></ha-config-section></template></dom-module><script>Polymer({is:"ha-config-section-themes",properties:{hass:{type:Object},isWide:{type:Boolean},themes:{type:Array,computed:"computeThemes(hass)"},selectedTheme:{type:Number}},ready:function(){this.hass.selectedTheme&&this.themes.indexOf(this.hass.selectedTheme)>0?this.selectedTheme=this.themes.indexOf(this.hass.selectedTheme):this.hass.selectedTheme||(this.selectedTheme=0)},observers:["selectionChanged(hass, selectedTheme)"],computeThemes:function(e){return e?["Backend-selected","default"].concat(Object.keys(e.themes.themes).sort()):[]},selectionChanged:function(e,s){s>0&&s<this.themes.length?e.selectedTheme!==this.themes[s]&&this.fire("settheme",this.themes[s]):0===s&&""!==e.selectedTheme&&this.fire("settheme","")}});</script><dom-module id="ha-config-core" assetpath="core/"><template><style include="iron-flex ha-style">.content{padding-bottom:32px;}.border{margin:32px auto 0;border-bottom:1px solid rgba(0, 0, 0, 0.12);max-width:1040px;}.narrow .border{max-width:640px;}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="_backTapped"></paper-icon-button><div main-title="">Core</div></app-toolbar></app-header><div class$="[[computeClasses(isWide)]]"><ha-config-section-core is-wide="[[isWide]]" hass="[[hass]]"></ha-config-section-core><template is="dom-if" if="[[computeIsThemesLoaded(hass)]]"><div class="border"></div><ha-config-section-themes is-wide="[[isWide]]" hass="[[hass]]"></ha-config-section-themes></template><template is="dom-if" if="[[computeIsHassbianLoaded(hass)]]"><div class="border"></div><ha-config-section-hassbian is-wide="[[isWide]]" hass="[[hass]]"></ha-config-section-hassbian></template></div></app-header-layout></template></dom-module><script>Polymer({is:"ha-config-core",properties:{hass:Object,isWide:Boolean},computeClasses:function(e){return e?"content":"content narrow"},computeIsHassbianLoaded:function(e){return window.hassUtil.isComponentLoaded(e,"config.hassbian")},computeIsZwaveLoaded:function(e){return window.hassUtil.isComponentLoaded(e,"config.zwave")},computeIsThemesLoaded:function(e){return e.themes&&e.themes.themes&&Object.keys(e.themes.themes).length},_backTapped:function(){history.back()}});</script><dom-module id="hass-subpage" assetpath="../../src/layouts/"><template><style include="ha-style"></style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="_backTapped"></paper-icon-button><div main-title="">[[title]]</div></app-toolbar></app-header><slot></slot></app-header-layout></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),HassSubpage=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"_backTapped",value:function(){history.back()}}],[{key:"is",get:function(){return"hass-subpage"}},{key:"properties",get:function(){return{title:String}}}]),t}();customElements.define(HassSubpage.is,HassSubpage);</script><dom-module id="ha-config-cloud-login" assetpath="cloud/"><template><style include="iron-flex ha-style">.content{padding-bottom:24px;}paper-card{display:block;}paper-item{cursor:pointer;}paper-card:last-child{margin-top:24px;}h1{@apply (--paper-font-headline);margin:0;}.error{color:var(--google-red-500);}.card-actions{display:flex;justify-content:space-between;align-items:center;}[hidden]{display:none;}</style><hass-subpage title="Cloud Login"><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Home Assistant Cloud</span> <span slot="introduction">The Home Assistant Cloud allows you to opt-in to functions that will bring your Home Assistant experience to the next level.<p><i>Home Assistant will never share information with our cloud without your prior permission. </i></p></span><paper-card><div class="card-content"><h1>Sign In</h1><paper-input label="Email" id="emailInput" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input><paper-input label="Password" value="{{_password}}" type="password" on-keydown="_keyDown"></paper-input><div class="error" hidden$="[[!error]]">[[error]]</div></div><div class="card-actions"><ha-progress-button on-tap="_handleLogin" progress="[[_requestInProgress]]">Sign in</ha-progress-button><button class="link" hidden="[[_requestInProgress]]" on-click="_handleForgotPassword">forgot password?</button></div></paper-card><paper-card><paper-item on-tap="_handleRegister"><paper-item-body two-line="">Create Account<div secondary="">It is free and allows easy integration with voice assistants.</div></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></paper-card></ha-config-section></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function _inherits(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}var _createClass=function(){function e(e,o){for(var n=0;n<o.length;n++){var r=o[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(o,n,r){return n&&e(o.prototype,n),r&&e(o,r),o}}(),HaConfigCloudLogin=function(e){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,window.hassMixins.NavigateMixin(window.hassMixins.EventsMixin(Polymer.Element))),_createClass(o,[{key:"_inputChanged",value:function(){this.error=!1}},{key:"_keyDown",value:function(e){13===e.keyCode&&(this._handleLogin(),e.preventDefault())}},{key:"_handleLogin",value:function(){var e=this;this.email?this._password||(this.error="Password is required."):this.error="Email is required.",this.error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/login",{email:this.email,password:this._password}).then(function(o){e.fire("ha-account-refreshed",{account:o}),e.email="",e._password=""},function(o){if(e._password="",e._requestInProgress=!1,o&&o.body&&o.body.message){if("UserNotConfirmed"===o.body.code)return alert("You need to confirm your email before logging in."),void e.navigate("/config/cloud/register#confirm");"PasswordChangeRequired"===o.body.code&&(alert("You need to change your password before logging in."),e.navigate("/config/cloud/forgot-password")),e.error=o.body.message}else e.error="Unknown error"}))}},{key:"_handleRegister",value:function(){this.navigate("/config/cloud/register")}},{key:"_handleForgotPassword",value:function(){this.navigate("/config/cloud/forgot-password")}}],[{key:"is",get:function(){return"ha-config-cloud-login"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,email:{type:String,notify:!0},_password:{type:String,value:""},_requestInProgress:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["_inputChanged(email, _password)"]}}]),o}();customElements.define(HaConfigCloudLogin.is,HaConfigCloudLogin);</script><dom-module id="ha-config-cloud-register" assetpath="cloud/"><template><style include="iron-flex ha-style">paper-card{display:block;}paper-item{cursor:pointer;}paper-card:last-child{margin-top:24px;}h1{@apply (--paper-font-headline);margin:0;}.error{color:var(--google-red-500);}.card-actions{display:flex;justify-content:space-between;align-items:center;}[hidden]{display:none;}</style><hass-subpage title="Register Account"><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Register with the Home Assistant Cloud</span> <span slot="introduction">Register today to easily connect your Home Assistant to cloud-only services.<p>By registering an account you agree to the following terms and conditions.</p><ul><li><a href="#">Terms and Conditions</a></li><li><a href="#">Privacy Policy</a></li></ul><p></p><p><i>Home Assistant will never share information with our cloud without your prior permission. </i></p></span><template is="dom-if" if="[[!_hasConfirmationCode]]"><paper-card><div class="card-content"><div class="header"><h1>Register</h1><div class="error" hidden$="[[!_error]]">[[_error]]</div></div><paper-input autofocus="" label="Email address" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input><paper-input label="Password" value="{{_password}}" type="password" on-keydown="_keyDown"></paper-input></div><div class="card-actions"><ha-progress-button on-tap="_handleRegister" progress="[[_requestInProgress]]">Create Account</ha-progress-button><button class="link" hidden="[[_requestInProgress]]" on-click="_handleShowVerifyAccount">have confirmation code?</button></div></paper-card></template><template is="dom-if" if="[[_hasConfirmationCode]]"><paper-card><div class="card-content"><div class="header"><h1>Verify email</h1><div class="error" hidden$="[[!_error]]">[[_error]]</div></div><p>Check your email address, we've emailed you a verification code to activate your account.</p><template is="dom-if" if="[[_showEmailInputForConfirmation]]"><paper-input label="Email address" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input></template><paper-input label="Confirmation code" value="{{_confirmationCode}}" on-keydown="_keyDown" type="number"></paper-input></div><div class="card-actions"><ha-progress-button on-tap="_handleVerifyEmail" progress="[[_requestInProgress]]">Verify Email</ha-progress-button></div></paper-card></template></ha-config-section></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function _inherits(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}var _createClass=function(){function e(e,o){for(var r=0;r<o.length;r++){var t=o[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(o,r,t){return r&&e(o.prototype,r),t&&e(o,t),o}}(),HaConfigCloudRegister=function(e){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,window.hassMixins.NavigateMixin(window.hassMixins.EventsMixin(Polymer.Element))),_createClass(o,[{key:"_inputChanged",value:function(){this._error=!1}},{key:"_keyDown",value:function(e){13===e.keyCode&&(this._hasConfirmationCode?this._handleVerifyEmail():this._handleRegister(),e.preventDefault())}},{key:"_handleRegister",value:function(){var e=this;this.email?this._password||(this._error="Password is required."):this._error="Email is required.",this._error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/register",{email:this.email,password:this._password}).then(function(){e._requestInProgress=!1,e._hasConfirmationCode=!0},function(o){e._password="",e._requestInProgress=!1,e._error=o&&o.body&&o.body.message?o.body.message:"Unknown error"}))}},{key:"_handleShowVerifyAccount",value:function(){this._error="",this._showEmailInputForConfirmation=!0,this._hasConfirmationCode=!0}},{key:"_handleVerifyEmail",value:function(){var e=this;this.email?this._confirmationCode||(this._error="Confirmation code is required."):this._error="Email is required.",this._error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/confirm_register",{email:this.email,confirmation_code:this._confirmationCode}).then(function(){alert("Confirmation successful. You can now login."),e.navigate("config/cloud/login")},function(o){e._confirmationCode="",e._error=o&&o.body&&o.body.message?o.body.message:"Unknown error",e._requestInProgress=!1}))}}],[{key:"is",get:function(){return"ha-config-cloud-register"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,email:{type:String,notify:!0},_requestInProgress:{type:Boolean,value:!1},_password:{type:String,value:""},_showEmailInputForConfirmation:{type:Boolean,value:!1},_hasConfirmationCode:{type:Boolean,value:function(){return"#confirm"===document.location.hash}}}}},{key:"observers",get:function(){return["_inputChanged(email, _password)"]}}]),o}();customElements.define(HaConfigCloudRegister.is,HaConfigCloudRegister);</script><dom-module id="ha-config-cloud-forgot-password" assetpath="cloud/"><template><style include="iron-flex ha-style">.content{padding-bottom:24px;}paper-card{display:block;max-width:600px;margin:0 auto;margin-top:24px;}h1{@apply (--paper-font-headline);margin:0;}.error{color:var(--google-red-500);}.card-actions{display:flex;justify-content:space-between;align-items:center;}.card-actions a{color:var(--primary-text-color);}[hidden]{display:none;}</style><hass-subpage title="Forgot Password"><div class="content"><template is="dom-if" if="[[!_hasToken]]"><paper-card><div class="card-content"><h1>Forgot Password</h1><p>Enter your email address and we will send you a link to reset your password.</p><paper-input autofocus="" label="E-mail" value="{{email}}" type="email" on-keydown="_keyDown"></paper-input><div class="error" hidden$="[[!error]]">[[error]]</div></div><div class="card-actions"><ha-progress-button on-tap="_handleEmailPasswordReset" progress="[[_requestInProgress]]">Send reset email</ha-progress-button><button class="link" hidden="[[_requestInProgress]]" on-click="_handleHaveToken">have a token?</button></div></paper-card></template><template is="dom-if" if="[[_hasToken]]"><paper-card><div class="card-content"><h1>Confirm new password</h1><template is="dom-if" if="[[_showEmailInputForConfirmation]]"><paper-input label="E-mail" type="email" value="{{email}}" on-keydown="_keyDown"></paper-input></template><paper-input label="Confirmation code" value="{{_confirmationCode}}" on-keydown="_keyDown" type="number"></paper-input><paper-input label="New password" value="{{_newPassword}}" on-keydown="_keyDown" type="password"></paper-input><div class="error" hidden$="[[!error]]">[[error]]</div></div><div class="card-actions"><ha-progress-button on-tap="_handleConfirmPasswordReset" progress="[[_requestInProgress]]">Reset Password</ha-progress-button></div></paper-card></template></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function _inherits(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}var _createClass=function(){function e(e,o){for(var r=0;r<o.length;r++){var t=o[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(o,r,t){return r&&e(o.prototype,r),t&&e(o,t),o}}(),HaConfigCloudForgotPassword=function(e){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,window.hassMixins.NavigateMixin(window.hassMixins.EventsMixin(Polymer.Element))),_createClass(o,[{key:"_inputChanged",value:function(){this.error=!1}},{key:"_keyDown",value:function(e){13===e.keyCode&&(this._hasToken?this._handleConfirmPasswordReset():this._handleEmailPasswordReset(),e.preventDefault())}},{key:"_handleEmailPasswordReset",value:function(){var e=this;this.email||(this.error="Email is required."),this.error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/forgot_password",{email:this.email}).then(function(){e._hasToken=!0,e._requestInProgress=!1},function(o){e._requestInProgress=!1,e.error=o&&o.body&&o.body.message?o.body.message:"Unknown error"}))}},{key:"_handleHaveToken",value:function(){this._error="",this._showEmailInputForConfirmation=!0,this._hasToken=!0}},{key:"_handleConfirmPasswordReset",value:function(){var e=this;this.error="",this.email||(this.error+="Email is required. "),this._confirmationCode||(this.error+="Confirmation code is required. "),this._newPassword?this._newPassword.length<6&&(this.error+="New password should be at least 6 characters."):this.error+="New password is required. ",this.error||(this._requestInProgress=!0,this.hass.callApi("post","cloud/confirm_forgot_password",{email:this.email,confirmation_code:this._confirmationCode,new_password:this._newPassword}).then(function(){alert("Password reset successful! You can now login."),e.navigate("config/cloud/login")},function(o){e._requestInProgress=!1,e.error=o&&o.body&&o.body.message?o.body.message:"Unknown error"}))}}],[{key:"is",get:function(){return"ha-config-cloud-forgot-password"}},{key:"properties",get:function(){return{hass:Object,email:{type:String,notify:!0},_hasToken:{type:Boolean,value:!1},_newPassword:{type:String,value:""},_confirmationCode:{type:String,value:""},_showEmailInputForConfirmation:{type:Boolean,value:!1},_requestInProgress:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["_inputChanged(email, _newPassword)"]}}]),o}();customElements.define(HaConfigCloudForgotPassword.is,HaConfigCloudForgotPassword);</script><dom-module id="ha-config-cloud-account" assetpath="cloud/"><template><style include="iron-flex ha-style">.content{padding-bottom:24px;}paper-card{display:block;}.account{display:flex;padding:0 16px;}paper-button{align-self:center;}.soon{font-style:italic;margin-top:24px;text-align:center;}</style><hass-subpage title="Cloud Account"><div class="content"><ha-config-section is-wide="[[isWide]]"><span slot="header">Home Assistant Cloud</span> <span slot="introduction">The Home Assistant Cloud allows you to opt-in to functions that will bring your Home Assistant experience to the next level.<p><i>Home Assistant will never share information with our cloud without your prior permission. </i></p></span><paper-card><div class="account"><paper-item-body>[[account.email]]</paper-item-body><paper-button class="warning" on-tap="handleLogout">Sign out</paper-button></div></paper-card><div class="soon">More configuration options coming soon.</div></ha-config-section></div></hass-subpage></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),HaConfigCloudAccount=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.EventsMixin(Polymer.Element)),_createClass(t,[{key:"handleLogout",value:function(){var e=this;this.hass.callApi("post","cloud/logout").then(function(){return e.fire("ha-account-refreshed",{account:null})})}}],[{key:"is",get:function(){return"ha-config-cloud-account"}},{key:"properties",get:function(){return{hass:Object,account:Object}}}]),t}();customElements.define(HaConfigCloudAccount.is,HaConfigCloudAccount);</script><dom-module id="ha-config-cloud" assetpath="cloud/"><template><style>iron-pages{height:100%;}</style><app-route route="[[route]]" pattern="/:page" data="{{_routeData}}" tail="{{_routeTail}}"></app-route><template is="dom-if" if="[[account]]" restamp=""><ha-config-cloud-account hass="[[hass]]" account="[[account]]" is-wide="[[isWide]]"></ha-config-cloud-account></template><template is="dom-if" if="[[!account]]" restamp=""><template is="dom-if" if="[[_isLoginPage(_routeData.page)]]" restamp=""><ha-config-cloud-login page-name="login" hass="[[hass]]" is-wide="[[isWide]]" email="{{_loginEmail}}"></ha-config-cloud-login></template><template is="dom-if" if="[[_isRegisterPage(_routeData.page)]]" restamp=""><ha-config-cloud-register page-name="register" hass="[[hass]]" is-wide="[[isWide]]" email="{{_loginEmail}}"></ha-config-cloud-register></template><template is="dom-if" if="[[_isForgotPasswordPage(_routeData.page)]]" restamp=""><ha-config-cloud-forgot-password page-name="forgot-password" hass="[[hass]]" is-wide="[[isWide]]" email="{{_loginEmail}}"></ha-config-cloud-forgot-password></template></template></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),HaConfigCloud=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.NavigateMixin(Polymer.Element)),_createClass(t,[{key:"_checkRoute",value:function(e,t){e&&"/config/cloud"===e.prefix&&(t||-1!==["/forgot-password","/register"].indexOf(e.path)?t&&-1!==["/login","/register","/forgot-password"].indexOf(e.path)&&this.navigate("/config/cloud/account",!0):this.navigate("/config/cloud/login",!0))}},{key:"_isRegisterPage",value:function(e){return"register"===e}},{key:"_isForgotPasswordPage",value:function(e){return"forgot-password"===e}},{key:"_isLoginPage",value:function(e){return"login"===e}}],[{key:"is",get:function(){return"ha-config-cloud"}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,loadingAccount:{type:Boolean,value:!1},account:{type:Object,value:null},route:Object,_routeData:Object,_routeTail:Object,_loginEmail:String}}},{key:"observers",get:function(){return["_checkRoute(route, account)"]}}]),t}();customElements.define(HaConfigCloud.is,HaConfigCloud);</script><dom-module id="paper-fab" assetpath="../../bower_components/paper-fab/"><template strip-whitespace=""><style include="paper-material-styles">:host{@apply --layout-vertical;@apply --layout-center-center;background:var(--paper-fab-background, var(--accent-color));border-radius:50%;box-sizing:border-box;color:var(--text-primary-color);cursor:pointer;height:56px;min-width:0;outline:none;padding:16px;position:relative;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;width:56px;z-index:0;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;@apply --paper-fab;}[hidden]{display:none !important;}:host([mini]){width:40px;height:40px;padding:8px;@apply --paper-fab-mini;}:host([disabled]){color:var(--paper-fab-disabled-text, var(--paper-grey-500));background:var(--paper-fab-disabled-background, var(--paper-grey-300));@apply --paper-fab-disabled;}iron-icon{@apply --paper-fab-iron-icon;}span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;@apply --paper-fab-label;}:host(.keyboard-focus){background:var(--paper-fab-keyboard-focus-background, var(--paper-pink-900));}:host([elevation="1"]){@apply --paper-material-elevation-1;}:host([elevation="2"]){@apply --paper-material-elevation-2;}:host([elevation="3"]){@apply --paper-material-elevation-3;}:host([elevation="4"]){@apply --paper-material-elevation-4;}:host([elevation="5"]){@apply --paper-material-elevation-5;}</style><iron-icon id="icon" hidden$="{{!_computeIsIconFab(icon, src)}}" src="[[src]]" icon="[[icon]]"></iron-icon><span hidden$="{{_computeIsIconFab(icon, src)}}">{{label}}</span></template><script>Polymer({is:"paper-fab",behaviors:[Polymer.PaperButtonBehavior],properties:{src:{type:String,value:""},icon:{type:String,value:""},mini:{type:Boolean,value:!1,reflectToAttribute:!0},label:{type:String,observer:"_labelChanged"}},_labelChanged:function(){this.setAttribute("aria-label",this.label)},_computeIsIconFab:function(e,t){return e.length>0||t.length>0}});</script></dom-module><dom-module id="ha-automation-picker" assetpath="automation/"><template><style include="ha-style">:host{display:block;}paper-item{cursor:pointer;}paper-fab{position:fixed;bottom:16px;right:16px;z-index:1;}paper-fab[is-wide]{bottom:24px;right:24px;}a{color:var(--primary-color);}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="_backTapped"></paper-icon-button><div main-title="">Automations</div></app-toolbar></app-header><ha-config-section is-wide="[[isWide]]"><div slot="header">Automation editor</div><div slot="introduction">The automation editor allows you to create and edit automations. Please read <a href="https://home-assistant.io/docs/automation/editor/" target="_blank">the instructions</a> to make sure that you have configured Home Assistant correctly.</div><paper-card heading="Pick automation to edit"><template is="dom-if" if="[[!automations.length]]"><div class="card-content"><p>We couldn't find any editable automations.</p></div></template><template is="dom-repeat" items="[[automations]]" as="automation"><paper-item><paper-item-body two-line="" on-tap="automationTapped"><div>[[computeName(automation)]]</div><div secondary="">[[computeDescription(automation)]]</div></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></template></paper-card></ha-config-section><paper-fab is-wide$="[[isWide]]" icon="mdi:plus" title="Add Automation" on-tap="addAutomation"></paper-fab></app-header-layout></template></dom-module><script>Polymer({is:"ha-automation-picker",properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},automations:{type:Array},isWide:{type:Boolean}},automationTapped:function(t){history.pushState(null,null,"/config/automation/edit/"+this.automations[t.model.index].attributes.id),this.fire("location-changed")},addAutomation:function(){history.pushState(null,null,"/config/automation/new"),this.fire("location-changed")},computeName:function(t){return window.hassUtil.computeStateName(t)},computeDescription:function(t){return""},_backTapped:function(){history.back()}});</script><dom-module id="paper-radio-button" assetpath="../../bower_components/paper-radio-button/"><template strip-whitespace=""><style>:host{display:inline-block;line-height:0;white-space:nowrap;cursor:pointer;@apply --paper-font-common-base;--calculated-paper-radio-button-size:var(--paper-radio-button-size, 16px);--calculated-paper-radio-button-ink-size:var(--paper-radio-button-ink-size, -1px);}:host(:focus){outline:none;}#radioContainer{@apply --layout-inline;@apply --layout-center-center;position:relative;width:var(--calculated-paper-radio-button-size);height:var(--calculated-paper-radio-button-size);vertical-align:middle;@apply --paper-radio-button-radio-container;}#ink{position:absolute;top:50%;left:50%;right:auto;width:var(--calculated-paper-radio-button-ink-size);height:var(--calculated-paper-radio-button-ink-size);color:var(--paper-radio-button-unchecked-ink-color, var(--primary-text-color));opacity:0.6;pointer-events:none;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);}#ink[checked]{color:var(--paper-radio-button-checked-ink-color, var(--primary-color));}#offRadio, #onRadio{position:absolute;box-sizing:border-box;top:0;left:0;width:100%;height:100%;border-radius:50%;}#offRadio{border:2px solid var(--paper-radio-button-unchecked-color, var(--primary-text-color));background-color:var(--paper-radio-button-unchecked-background-color, transparent);transition:border-color 0.28s;}#onRadio{background-color:var(--paper-radio-button-checked-color, var(--primary-color));-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform ease 0.28s;transition:transform ease 0.28s;will-change:transform;}:host([checked]) #offRadio{border-color:var(--paper-radio-button-checked-color, var(--primary-color));}:host([checked]) #onRadio{-webkit-transform:scale(0.5);transform:scale(0.5);}#radioLabel{line-height:normal;position:relative;display:inline-block;vertical-align:middle;margin-left:var(--paper-radio-button-label-spacing, 10px);white-space:normal;color:var(--paper-radio-button-label-color, var(--primary-text-color));@apply --paper-radio-button-label;}:host([checked]) #radioLabel{@apply --paper-radio-button-label-checked;}:host-context([dir="rtl"]) #radioLabel{margin-left:0;margin-right:var(--paper-radio-button-label-spacing, 10px);}#radioLabel[hidden]{display:none;}:host([disabled]) #offRadio{border-color:var(--paper-radio-button-unchecked-color, var(--primary-text-color));opacity:0.5;}:host([disabled][checked]) #onRadio{background-color:var(--paper-radio-button-unchecked-color, var(--primary-text-color));opacity:0.5;}:host([disabled]) #radioLabel{opacity:0.65;}</style><div id="radioContainer"><div id="offRadio"></div><div id="onRadio"></div></div><div id="radioLabel"><slot></slot></div></template><script>Polymer({is:"paper-radio-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var e=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),t=Math.floor(3*e);t%2!=e%2&&t++,this.updateStyles({"--paper-radio-button-ink-size":t+"px"})}})}});</script></dom-module><dom-module id="paper-radio-group" assetpath="../../bower_components/paper-radio-group/"><template><style>:host{display:inline-block;}:host ::slotted(*){padding:var(--paper-radio-group-item-padding, 12px);}</style><slot></slot></template></dom-module><script>Polymer({is:"paper-radio-group",behaviors:[Polymer.IronMenubarBehavior],hostAttributes:{role:"radiogroup",tabindex:0},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(e){var t=this._valueToItem(e);if(!t||!t.hasAttribute("disabled")){if(this.selected){var i=this._valueToItem(this.selected);if(this.selected==e){if(!this.allowEmptySelection)return void(i&&(i.checked=!0));e=""}i&&(i.checked=!1)}Polymer.IronSelectableBehavior.select.apply(this,[e]),this.fire("paper-radio-group-changed")}},_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},_onUpKey:function(e){this._focusPrevious(),e.preventDefault(),this._activateFocusedItem()},_onDownKey:function(e){this._focusNext(),e.preventDefault(),this._activateFocusedItem()},_onLeftKey:function(e){Polymer.IronMenubarBehaviorImpl._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){Polymer.IronMenubarBehaviorImpl._onRightKey.apply(this,arguments),this._activateFocusedItem()}});</script><script>var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){"use strict";function e(){}function t(t,n){var o,r,a,i,l=M;for(i=arguments.length;i-- >2;)V.push(arguments[i]);for(n&&null!=n.children&&(V.length||V.push(n.children),delete n.children);V.length;)if((r=V.pop())&&void 0!==r.pop)for(i=r.length;i--;)V.push(r[i]);else"boolean"==typeof r&&(r=null),(a="function"!=typeof t)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(a=!1)),a&&o?l[l.length-1]+=r:l===M?l=[r]:l.push(r),o=a;var u=new e;return u.nodeName=t,u.children=l,u.attributes=null==n?void 0:n,u.key=null==n?void 0:n.key,void 0!==B.vnode&&B.vnode(u),u}function n(e,t){for(var n in t)e[n]=t[n];return e}function o(e){!e._dirty&&(e._dirty=!0)&&1==H.push(e)&&(B.debounceRendering||W)(r)}function r(){var e,t=H;for(H=[];e=t.pop();)e._dirty&&w(e)}function a(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&i(e,t.nodeName):n||e._componentConstructor===t.nodeName}function i(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function l(e){var t=n({},e.attributes);t.children=e.children;var o=e.nodeName.defaultProps;if(void 0!==o)for(var r in o)void 0===t[r]&&(t[r]=o[r]);return t}function u(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function s(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"===(void 0===o?"undefined":D(o))){if("string"!=typeof n)for(var a in n)a in o||(e.style[a]="");for(var a in o)e.style[a]="number"==typeof o[a]&&!1===I.test(a)?o[a]+"px":o[a]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var i=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,c,i):e.removeEventListener(t,c,i),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e)d(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var l=r&&t!==(t=t.replace(/^xlink\:?/,""));null==o||!1===o?l?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(l?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function d(e,t,n){try{e[t]=n}catch(e){}}function c(e){return this._listeners[e.type](B.event&&B.event(e)||e)}function h(){for(var e;e=J.pop();)B.afterMount&&B.afterMount(e),e.componentDidMount&&e.componentDidMount()}function f(e,t,n,o,r,a){K++||(R=null!=r&&void 0!==r.ownerSVGElement,F=null!=e&&!("__preactattr_"in e));var i=g(e,t,n,o,a);return r&&i.parentNode!==r&&r.appendChild(i),--K||(F=!1,a||h()),i}function g(e,t,n,o,r){var a=e,l=R;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(a=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(a,e),b(e,!0))),a.__preactattr_=!0,a;var p=t.nodeName;if("function"==typeof p)return x(e,t,n,o);if(R="svg"===p||"foreignObject"!==p&&R,p=String(p),(!e||!i(e,p))&&(a=u(p,R),e)){for(;e.firstChild;)a.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(a,e),b(e,!0)}var s=a.firstChild,d=a.__preactattr_,c=t.children;if(null==d){d=a.__preactattr_={};for(var h=a.attributes,f=h.length;f--;)d[h[f].name]=h[f].value}return!F&&c&&1===c.length&&"string"==typeof c[0]&&null!=s&&void 0!==s.splitText&&null==s.nextSibling?s.nodeValue!=c[0]&&(s.nodeValue=c[0]):(c&&c.length||null!=s)&&v(a,c,n,o,F||null!=d.dangerouslySetInnerHTML),y(a,t.attributes,d),R=l,a}function v(e,t,n,o,r){var i,l,u,s,d,c=e.childNodes,h=[],f={},v=0,_=0,y=c.length,m=0,C=t?t.length:0;if(0!==y)for(x=0;x<y;x++){var k=c[x],O=k.__preactattr_;null!=(w=C&&O?k._component?k._component.__key:O.key:null)?(v++,f[w]=k):(O||(void 0!==k.splitText?!r||k.nodeValue.trim():r))&&(h[m++]=k)}if(0!==C)for(x=0;x<C;x++){d=null;var w=(s=t[x]).key;if(null!=w)v&&void 0!==f[w]&&(d=f[w],f[w]=void 0,v--);else if(!d&&_<m)for(i=_;i<m;i++)if(void 0!==h[i]&&a(l=h[i],s,r)){d=l,h[i]=void 0,i===m-1&&m--,i===_&&_++;break}d=g(d,s,n,o),u=c[x],d&&d!==e&&d!==u&&(null==u?e.appendChild(d):d===u.nextSibling?p(u):e.insertBefore(d,u))}if(v)for(var x in f)void 0!==f[x]&&b(f[x],!1);for(;_<=m;)void 0!==(d=h[m--])&&b(d,!1)}function b(e,t){var n=e._component;n?P(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||p(e),_(e))}function _(e){for(e=e.lastChild;e;){var t=e.previousSibling;b(e,!0),e=t}}function y(e,t,n){var o;for(o in n)t&&null!=t[o]||null==n[o]||s(e,o,n[o],n[o]=void 0,R);for(o in t)"children"===o||"innerHTML"===o||o in n&&t[o]===("value"===o||"checked"===o?e[o]:n[o])||s(e,o,n[o],n[o]=t[o],R)}function m(e){var t=e.constructor.name;(Z[t]||(Z[t]=[])).push(e)}function C(e,t,n){var o,r=Z[e.name];if(e.prototype&&e.prototype.render?(o=new e(t,n),S.call(o,t,n)):((o=new S(t,n)).constructor=e,o.render=k),r)for(var a=r.length;a--;)if(r[a].constructor===e){o.nextBase=r[a].nextBase,r.splice(a,1);break}return o}function k(e,t,n){return this.constructor(e,n)}function O(e,t,n,r,a){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||a?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===B.syncComponentUpdates&&e.base?o(e):w(e,1,a)),e.__ref&&e.__ref(e))}function w(e,t,o,r){if(!e._disable){var a,i,u,p=e.props,s=e.state,d=e.context,c=e.prevProps||p,g=e.prevState||s,v=e.prevContext||d,_=e.base,y=e.nextBase,m=_||y,k=e._component,x=!1;if(_&&(e.props=c,e.state=g,e.context=v,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(p,s,d)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(p,s,d),e.props=p,e.state=s,e.context=d),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){a=e.render(p,s,d),e.getChildContext&&(d=n(n({},d),e.getChildContext()));var S,j,T=a&&a.nodeName;if("function"==typeof T){var N=l(a);(i=k)&&i.constructor===T&&N.key==i.__key?O(i,N,1,d,!1):(S=i,e._component=i=C(T,N,d),i.nextBase=i.nextBase||y,i._parentComponent=e,O(i,N,0,d,!1),w(i,1,o,!0)),j=i.base}else u=m,(S=k)&&(u=e._component=null),(m||1===t)&&(u&&(u._component=null),j=f(u,a,d,o||!_,m&&m.parentNode,!0));if(m&&j!==m&&i!==k){var D=m.parentNode;D&&j!==D&&(D.replaceChild(j,m),S||(m._component=null,b(m,!1)))}if(S&&P(S),e.base=j,j&&!r){for(var A=e,E=e;E=E._parentComponent;)(A=E).base=j;j._component=A,j._componentConstructor=A.constructor}}if(!_||o?J.unshift(e):x||(e.componentDidUpdate&&e.componentDidUpdate(c,g,v),B.afterUpdate&&B.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);K||r||h()}}function x(e,t,n,o){for(var r=e&&e._component,a=r,i=e,u=r&&e._componentConstructor===t.nodeName,p=u,s=l(t);r&&!p&&(r=r._parentComponent);)p=r.constructor===t.nodeName;return r&&p&&(!o||r._component)?(O(r,s,3,n,o),e=r.base):(a&&!u&&(P(a),e=i=null),r=C(t.nodeName,s,n),e&&!r.nextBase&&(r.nextBase=e,i=null),O(r,s,1,n,o),e=r.base,i&&e!==i&&(i._component=null,b(i,!1))),e}function P(e){B.beforeUnmount&&B.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?P(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,p(t),m(e),_(t)),e.__ref&&e.__ref(null)}function S(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function j(e,t,n){return f(n,e,{},!1,t,!1)}function T(e,t){var n=U({},this.props[e]);t.target.value!==n[t.target.name]&&(t.target.value?n[t.target.name]=t.target.value:delete n[t.target.name],this.props.onChange(this.props.index,n))}function N(e){for(var t=Object.keys(Pe),n=0;n<t.length;n++)if(Pe[t[n]].configKey in e)return t[n];return null}var D="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof(e)},A=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},E=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),L=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},z=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},G=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t?e:t},B={},V=[],M=[],W="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,I=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,H=[],J=[],K=0,R=!1,F=!1,Z={};n(S.prototype,{setState:function(e,t){var r=this.state;this.prevState||(this.prevState=n({},r)),n(r,"function"==typeof e?e(r,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),o(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),w(this,2)},render:function(){}});var $=function(e){function n(e){A(this,n);var t=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state.isValid=!0,t.state.value=JSON.stringify(e.value||{},null,2),t.onChange=t.onChange.bind(t),t}return z(n,S),E(n,[{key:"onChange",value:function(e){var t=e.target.value,n=void 0,o=void 0;try{n=JSON.parse(t),o=!0}catch(e){o=!1}this.setState({value:t,isValid:o}),o&&this.props.onChange(n)}},{key:"componentWillReceiveProps",value:function(e){var t=e.value;this.setState({value:JSON.stringify(t,null,2),isValid:!0})}},{key:"render",value:function(e,n){var o=e.label,r=n.value,a={minWidth:300,width:"100%"};return n.isValid||(a.border="1px solid red"),t("paper-textarea",{label:o,value:r,style:a,"onvalue-changed":this.onChange})}}]),n}(),q=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e.eventDataChanged=e.eventDataChanged.bind(e),e}return z(n,S),E(n,[{key:"eventDataChanged",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event_data:e}))}},{key:"render",value:function(e){var n=e.trigger,o=n.event_type,r=n.event_data;return t("div",null,t("paper-input",{label:"Event Type",name:"event_type",value:o,onChange:this.onChange}),t($,{label:"Event Data",value:r,onChange:this.eventDataChanged}))}}]),n}();q.defaultConfig={event_type:"",event_data:{}};var Q=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.radioGroupPicked=e.radioGroupPicked.bind(e),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event:e.target.selected}))}},{key:"render",value:function(e){var n=e.trigger.event;return t("div",null,t("label",{id:"eventlabel"},"Event:"),t("paper-radio-group",{selected:n,"aria-labelledby":"eventlabel","onpaper-radio-group-changed":this.radioGroupPicked},t("paper-radio-button",{name:"start"},"Start"),t("paper-radio-button",{name:"shutdown"},"Shutdown")))}}]),n}();Q.defaultConfig={event:"start"};var X=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.trigger,o=n.topic,r=n.payload;return t("div",null,t("paper-input",{label:"Topic",name:"topic",value:o,onChange:this.onChange}),t("paper-input",{label:"Payload (Optional)",name:"payload",value:r,onChange:this.onChange}))}}]),n}();X.defaultConfig={topic:""};var Y=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.trigger,o=n.value_template,r=n.entity_id,a=n.below,i=n.above;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:r,onChange:this.onChange}),t("paper-input",{label:"Above",name:"above",value:i,onChange:this.onChange}),t("paper-input",{label:"Below",name:"below",value:a,onChange:this.onChange}),t("paper-textarea",{label:"Value template (optional)",name:"value_template",value:o,"onvalue-changed":this.onChange}))}}]),n}();Y.defaultConfig={entity_id:""};var ee=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.trigger,o=n.entity_id,r=n.to,a=n.from,i=n.for;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"From",name:"from",value:a,onChange:this.onChange}),t("paper-input",{label:"To",name:"to",value:r,onChange:this.onChange}),i&&t("pre",null,"For: ",JSON.stringify(i,null,2)))}}]),n}();ee.defaultConfig={entity_id:""};var te=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e.radioGroupPicked=e.radioGroupPicked.bind(e),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event:e.target.selected}))}},{key:"render",value:function(e){var n=e.trigger,o=n.offset,r=n.event;return t("div",null,t("label",{id:"eventlabel"},"Event:"),t("paper-radio-group",{selected:r,"aria-labelledby":"eventlabel","onpaper-radio-group-changed":this.radioGroupPicked},t("paper-radio-button",{name:"sunrise"},"Sunrise"),t("paper-radio-button",{name:"sunset"},"Sunset")),t("paper-input",{label:"Offset (optional)",name:"offset",value:o,onChange:this.onChange}))}}]),n}();te.defaultConfig={event:"sunrise"};var ne=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-textarea",{label:"Value Template",name:"value_template",value:e.trigger.value_template,"onvalue-changed":this.onChange}))}}]),n}();ne.defaultConfig={value_template:""};var oe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-input",{label:"At",name:"at",value:e.trigger.at,onChange:this.onChange}))}}]),n}();oe.defaultConfig={at:""};var re=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"trigger"),e.radioGroupPicked=e.radioGroupPicked.bind(e),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,{event:e.target.selected}))}},{key:"render",value:function(e){var n=e.trigger,o=n.entity_id,r=n.zone,a=n.event;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"Zone",name:"zone",value:r,onChange:this.onChange}),t("label",{id:"eventlabel"},"Event:"),t("paper-radio-group",{selected:a,"aria-labelledby":"eventlabel","onpaper-radio-group-changed":this.radioGroupPicked},t("paper-radio-button",{name:"enter"},"Enter"),t("paper-radio-button",{name:"leave"},"Leave")))}}]),n}();re.defaultConfig={entity_id:"",zone:"",event:"enter"};var ae={event:q,state:ee,homeassistant:Q,mqtt:X,numeric_state:Y,sun:te,template:ne,time:oe,zone:re},ie=Object.keys(ae).sort(),le=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return z(n,S),E(n,[{key:"typeChanged",value:function(e){var t=e.target.selectedItem.innerHTML;t!==this.props.trigger.platform&&this.props.onChange(this.props.index,U({platform:t},ae[t].defaultConfig))}},{key:"render",value:function(e){var n=e.index,o=e.trigger,r=e.onChange,a=ae[o.platform],i=ie.indexOf(o.platform);return a?t("div",null,t("paper-dropdown-menu-light",{label:"Trigger Type","no-animations":!0},t("paper-listbox",{slot:"dropdown-content",selected:i,"oniron-select":this.typeChanged},ie.map(function(e){return t("paper-item",null,e)}))),t(a,{index:n,trigger:o,onChange:r})):t("div",null,"Unsupported platform: ",o.platform,t("pre",null,JSON.stringify(o,null,2)))}}]),n}(),ue=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onDelete=e.onDelete.bind(e),e}return z(n,S),E(n,[{key:"onDelete",value:function(){confirm("Sure you want to delete?")&&this.props.onChange(this.props.index,null)}},{key:"render",value:function(e){return t("paper-card",null,t("div",{class:"card-menu"},t("paper-menu-button",{"no-animations":!0,"horizontal-align":"right","horizontal-offset":"-5","vertical-offset":"-5"},t("paper-icon-button",{icon:"mdi:dots-vertical",slot:"dropdown-trigger"}),t("paper-listbox",{slot:"dropdown-content"},t("paper-item",{disabled:!0},"Duplicate"),t("paper-item",{onTap:this.onDelete},"Delete")))),t("div",{class:"card-content"},t(le,e)))}}]),n}(),pe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.addTrigger=e.addTrigger.bind(e),e.triggerChanged=e.triggerChanged.bind(e),e}return z(n,S),E(n,[{key:"addTrigger",value:function(){var e=this.props.trigger.concat(U({platform:"state"},ee.defaultConfig));this.props.onChange(e)}},{key:"triggerChanged",value:function(e,t){var n=this.props.trigger.concat();null===t?n.splice(e,1):n[e]=t,this.props.onChange(n)}},{key:"render",value:function(e){var n=this;return t("div",{class:"triggers"},e.trigger.map(function(e,o){return t(ue,{index:o,trigger:e,onChange:n.triggerChanged})}),t("paper-card",null,t("div",{class:"card-actions add-card"},t("paper-button",{onTap:this.addTrigger},"Add trigger"))))}}]),n}(),se=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.value_template,r=n.entity_id,a=n.below,i=n.above;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:r,onChange:this.onChange}),t("paper-input",{label:"Above",name:"above",value:i,onChange:this.onChange}),t("paper-input",{label:"Below",name:"below",value:a,onChange:this.onChange}),t("paper-textarea",{label:"Value template (optional)",name:"value_template",value:o,"onvalue-changed":this.onChange}))}}]),n}();se.defaultConfig={entity_id:""};var de=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.entity_id,r=n.state,a=n.for;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"State",name:"state",value:r,onChange:this.onChange}),a&&t("pre",null,"For: ",JSON.stringify(a,null,2)))}}]),n}();de.defaultConfig={entity_id:"",state:""};var ce=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e.afterPicked=e.radioGroupPicked.bind(e,"after"),e.beforePicked=e.radioGroupPicked.bind(e,"before"),e}return z(n,S),E(n,[{key:"radioGroupPicked",value:function(e,t){var n=U({},this.props.condition);t.target.selected?n[e]=t.target.selected:delete n[e],this.props.onChange(this.props.index,n)}},{key:"render",value:function(e){var n=e.condition,o=n.after,r=n.after_offset,a=n.before,i=n.before_offset;return t("div",null,t("label",{id:"beforelabel"},"Before:"),t("paper-radio-group",{"allow-empty-selection":!0,selected:a,"aria-labelledby":"beforelabel","onpaper-radio-group-changed":this.beforePicked},t("paper-radio-button",{name:"sunrise"},"Sunrise"),t("paper-radio-button",{name:"sunset"},"Sunset")),t("paper-input",{label:"Before offset (optional)",name:"before_offset",value:i,onChange:this.onChange,disabled:void 0===a}),t("label",{id:"afterlabel"},"After:"),t("paper-radio-group",{"allow-empty-selection":!0,selected:o,"aria-labelledby":"afterlabel","onpaper-radio-group-changed":this.afterPicked},t("paper-radio-button",{name:"sunrise"},"Sunrise"),t("paper-radio-button",{name:"sunset"},"Sunset")),t("paper-input",{label:"After offset (optional)",name:"after_offset",value:r,onChange:this.onChange,disabled:void 0===o}))}}]),n}();ce.defaultConfig={};var he=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-textarea",{label:"Value Template",name:"value_template",value:e.condition.value_template,"onvalue-changed":this.onChange}))}}]),n}();he.defaultConfig={value_template:""};var fe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.after,r=n.before;return t("div",null,t("paper-input",{label:"After",name:"after",value:o,onChange:this.onChange}),t("paper-input",{label:"Before",name:"before",value:r,onChange:this.onChange}))}}]),n}();fe.defaultConfig={};var ge=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"condition"),e}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.condition,o=n.entity_id,r=n.zone;return t("div",null,t("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),t("paper-input",{label:"Zone entity id",name:"zone",value:r,onChange:this.onChange}))}}]),n}();ge.defaultConfig={entity_id:"",zone:""};var ve={state:de,numeric_state:se,sun:ce,template:he,time:fe,zone:ge},be=Object.keys(ve).sort(),_e=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return z(n,S),E(n,[{key:"typeChanged",value:function(e){var t=e.target.selectedItem.innerHTML;t!==this.props.condition.condition&&this.props.onChange(this.props.index,U({condition:t},ve[t].defaultConfig))}},{key:"render",value:function(e){var n=e.index,o=e.condition,r=e.onChange,a=ve[o.condition],i=be.indexOf(o.condition);return a?t("div",null,t("paper-dropdown-menu-light",{label:"Condition Type","no-animations":!0},t("paper-listbox",{slot:"dropdown-content",selected:i,"oniron-select":this.typeChanged},be.map(function(e){return t("paper-item",null,e)}))),t(a,{index:n,condition:o,onChange:r})):t("div",null,"Unsupported condition: ",o.condition,t("pre",null,JSON.stringify(o,null,2)))}}]),n}(),ye=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onDelete=e.onDelete.bind(e),e}return z(n,S),E(n,[{key:"onDelete",value:function(){confirm("Sure you want to delete?")&&this.props.onChange(this.props.index,null)}},{key:"render",value:function(e){return t("paper-card",null,t("div",{class:"card-menu"},t("paper-menu-button",{"no-animations":!0,"horizontal-align":"right","horizontal-offset":"-5","vertical-offset":"-5"},t("paper-icon-button",{icon:"mdi:dots-vertical",slot:"dropdown-trigger"}),t("paper-listbox",{slot:"dropdown-content"},t("paper-item",{disabled:!0},"Duplicate"),t("paper-item",{onTap:this.onDelete},"Delete")))),t("div",{class:"card-content"},t(_e,e)))}}]),n}(),me=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.addCondition=e.addCondition.bind(e),e.conditionChanged=e.conditionChanged.bind(e),e}return z(n,S),E(n,[{key:"addCondition",value:function(){var e=this.props.condition.concat({condition:"state"});this.props.onChange(e)}},{key:"conditionChanged",value:function(e,t){var n=this.props.condition.concat();null===t?n.splice(e,1):n[e]=t,this.props.onChange(n)}},{key:"render",value:function(e){var n=this;return t("div",{class:"triggers"},e.condition.map(function(e,o){return t(ye,{index:o,condition:e,onChange:n.conditionChanged})}),t("paper-card",null,t("div",{class:"card-actions add-card"},t("paper-button",{onTap:this.addCondition},"Add condition"))))}}]),n}(),Ce=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e.serviceDataChanged=e.serviceDataChanged.bind(e),e}return z(n,S),E(n,[{key:"serviceDataChanged",value:function(e){this.props.onChange(this.props.index,U({},this.props.action,{data:e}))}},{key:"render",value:function(e){var n=e.action,o=n.alias,r=n.service,a=n.data;return t("div",null,t("paper-input",{label:"Alias",name:"alias",value:o,onChange:this.onChange}),t("paper-input",{label:"Service",name:"service",value:r,onChange:this.onChange}),t($,{label:"Service Data",value:a,onChange:this.serviceDataChanged}))}}]),n}();Ce.configKey="service",Ce.defaultConfig={alias:"",service:"",data:{}};var ke=function(e){function n(){return A(this,n),G(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return z(n,S),E(n,[{key:"render",value:function(e){var n=e.action,o=e.index,r=e.onChange;return t(_e,{condition:n,onChange:r,index:o})}}]),n}();ke.configKey="condition",ke.defaultConfig=U({condition:"state"},de.defaultConfig);var Oe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e}return z(n,S),E(n,[{key:"render",value:function(e){return t("div",null,t("paper-input",{label:"Delay",name:"delay",value:e.action.delay,onChange:this.onChange}))}}]),n}();Oe.configKey="delay",Oe.defaultConfig={delay:""};var we=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e.serviceDataChanged=e.serviceDataChanged.bind(e),e}return z(n,S),E(n,[{key:"serviceDataChanged",value:function(e){this.props.onChange(this.props.index,U({},this.props.action,{data:e}))}},{key:"render",value:function(e){var n=e.action,o=n.event,r=n.event_data;return t("div",null,t("paper-input",{label:"Event",name:"event",value:o,onChange:this.onChange}),t($,{label:"Service Data",value:r,onChange:this.serviceDataChanged}))}}]),n}();we.configKey="event",we.defaultConfig={event:"",event_data:{}};var xe=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=T.bind(e,"action"),e.onTemplateChange=e.onTemplateChange.bind(e),e}return z(n,S),E(n,[{key:"onTemplateChange",value:function(e){this.props.onChange(this.props.index,U({},this.props.trigger,L({},e.target.name,e.target.value)))}},{key:"render",value:function(e){var n=e.action,o=n.wait_template,r=n.timeout;return t("div",null,t("paper-textarea",{label:"Wait Template",name:"wait_template",value:o,"onvalue-changed":this.onTemplateChange}),t("paper-input",{label:"Timeout (Optional)",name:"timeout",value:r,onChange:this.onChange}))}}]),n}();xe.configKey="wait_template",xe.defaultConfig={wait_template:"",timeout:""};var Pe={"Call Service":Ce,Delay:Oe,Wait:xe,Condition:ke,"Fire Event":we},Se=Object.keys(Pe).sort(),je=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return z(n,S),E(n,[{key:"typeChanged",value:function(e){var t=e.target.selectedItem.innerHTML;N(this.props.action)!==t&&this.props.onChange(this.props.index,Pe[t].defaultConfig)}},{key:"render",value:function(e){var n=e.index,o=e.action,r=e.onChange,a=N(o),i=a&&Pe[a],l=Se.indexOf(a);return i?t("div",null,t("paper-dropdown-menu-light",{label:"Action Type","no-animations":!0},t("paper-listbox",{slot:"dropdown-content",selected:l,"oniron-select":this.typeChanged},Se.map(function(e){return t("paper-item",null,e)}))),t(i,{index:n,action:o,onChange:r})):t("div",null,"Unsupported action",t("pre",null,JSON.stringify(o,null,2)))}}]),n}(),Te=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onDelete=e.onDelete.bind(e),e}return z(n,S),E(n,[{key:"onDelete",value:function(){confirm("Sure you want to delete?")&&this.props.onChange(this.props.index,null)}},{key:"render",value:function(e){return t("paper-card",null,t("div",{class:"card-menu"},t("paper-menu-button",{"no-animations":!0,"horizontal-align":"right","horizontal-offset":"-5","vertical-offset":"-5"},t("paper-icon-button",{icon:"mdi:dots-vertical",slot:"dropdown-trigger"}),t("paper-listbox",{slot:"dropdown-content"},t("paper-item",{disabled:!0},"Duplicate"),t("paper-item",{onTap:this.onDelete},"Delete")))),t("div",{class:"card-content"},t(je,e)))}}]),n}(),Ne=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.addAction=e.addAction.bind(e),e.actionChanged=e.actionChanged.bind(e),e}return z(n,S),E(n,[{key:"addAction",value:function(){var e=this.props.script.concat({service:""});this.props.onChange(e)}},{key:"actionChanged",value:function(e,t){var n=this.props.script.concat();null===t?n.splice(e,1):n[e]=t,this.props.onChange(n)}},{key:"render",value:function(e){var n=this;return t("div",{class:"script"},e.script.map(function(e,o){return t(Te,{index:o,action:e,onChange:n.actionChanged})}),t("paper-card",null,t("div",{class:"card-actions add-card"},t("paper-button",{onTap:this.addAction},"Add action"))))}}]),n}(),De=function(e){function n(){A(this,n);var e=G(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.onChange=e.onChange.bind(e),e.triggerChanged=e.triggerChanged.bind(e),e.conditionChanged=e.conditionChanged.bind(e),e.actionChanged=e.actionChanged.bind(e),e}return z(n,S),E(n,[{key:"onChange",value:function(e){this.props.onChange(U({},this.props.automation,L({},e.target.name,e.target.value)))}},{key:"triggerChanged",value:function(e){this.props.onChange(U({},this.props.automation,{trigger:e}))}},{key:"conditionChanged",value:function(e){this.props.onChange(U({},this.props.automation,{condition:e}))}},{key:"actionChanged",value:function(e){this.props.onChange(U({},this.props.automation,{action:e}))}},{key:"render",value:function(e){var n=e.automation,o=e.isWide,r=n.alias,a=n.trigger,i=n.condition,l=n.action;return t("div",null,t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},r),t("span",{slot:"introduction"},"Use automations to bring your home alive."),t("paper-card",null,t("div",{class:"card-content"},t("paper-input",{label:"Name",name:"alias",value:r,onChange:this.onChange})))),t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},"Triggers"),t("span",{slot:"introduction"},"Triggers are what starts the processing of an automation rule. It is possible to specify multiple triggers for the same rule. Once a trigger starts, Home Assistant will validate the conditions, if any, and call the action.",t("p",null,t("a",{href:"https://home-assistant.io/docs/automation/trigger/",target:"_blank"},"Learn more about triggers."))),t(pe,{trigger:a,onChange:this.triggerChanged})),t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},"Conditions"),t("span",{slot:"introduction"},"Conditions are an optional part of an automation rule and can be used to prevent an action from happening when triggered. Conditions look very similar to triggers but are very different. A trigger will look at events happening in the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is currently on or off.",t("p",null,t("a",{href:"https://home-assistant.io/docs/scripts/conditions/",target:"_blank"},"Learn more about conditions."))),t(me,{condition:i||[],onChange:this.conditionChanged})),t("ha-config-section",{"is-wide":o},t("span",{slot:"header"},"Action"),t("span",{slot:"introduction"},"The actions are what Home Assistant will do when the automation is triggered.",t("p",null,t("a",{href:"https://home-assistant.io/docs/scripts/",target:"_blank"},"Learn more about actions."))),t(Ne,{script:l,onChange:this.actionChanged})))}}]),n}();window.AutomationEditor=function(e,n,o){return j(t(De,n),e,o)},window.unmountPreact=function(e,t){j(function(){return null},e,t)}}();</script><dom-module id="ha-automation-editor" assetpath="automation/"><template><style include="ha-style">.errors{padding:20px;font-weight:bold;color:var(--google-red-500);}.content{padding-bottom:20px;}paper-card{display:block;}.triggers,
       .script{margin-top:-16px;}.triggers paper-card,
       .script paper-card{margin-top:16px;}.add-card paper-button{display:block;text-align:center;}.card-menu{position:absolute;top:0;right:0;z-index:1;color:var(--primary-text-color);}.card-menu paper-item{cursor:pointer;}span[slot=introduction] a{color:var(--primary-color);}paper-fab{position:fixed;bottom:16px;right:16px;z-index:1;margin-bottom:-80px;transition:margin-bottom .3s;}paper-fab[is-wide]{bottom:24px;right:24px;}paper-fab[dirty]{margin-bottom:0;}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="backTapped"></paper-icon-button><div main-title="">Automation [[name]]</div></app-toolbar></app-header><div class="content"><template is="dom-if" if="[[errors]]"><div class="errors">[[errors]]</div></template><div id="root"></div><paper-fab is-wide$="[[isWide]]" dirty$="[[dirty]]" icon="mdi:content-save" title="Save" on-tap="saveAutomation"></paper-fab></div></app-header-layout></template></dom-module><script>Polymer({is:"ha-automation-editor",properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},errors:{type:Object,value:null},dirty:{type:Boolean,value:!1},config:{type:Object,value:null},automation:{type:Object,observer:"automationChanged"},creatingNew:{type:Boolean,observer:"creatingNewChanged"},name:{type:String,computed:"computeName(automation)"},isWide:{type:Boolean,observer:"isWideChanged"}},created:function(){this.configChanged=this.configChanged.bind(this),this._rendered=null},detached:function(){this._rendered&&window.unmountPreact(this._rendered)},configChanged:function(t){null!==this._rendered&&(this.config=t,this.errors=null,this.dirty=!0,this._updateComponent(t))},automationChanged:function(t,i){t&&(this.hass?i&&i.attributes.id===t.attributes.id||this.hass.callApi("get","config/automation/config/"+t.attributes.id).then(function(t){["trigger","condition","action"].forEach(function(i){var e=t[i];e&&!Array.isArray(e)&&(t[i]=[e])}),this.dirty=!1,this.config=t,this._updateComponent()}.bind(this)):setTimeout(this.automationChanged.bind(this,t,i),0))},creatingNewChanged:function(t){t&&(this.dirty=!1,this.config={alias:"New Automation",trigger:[{platform:"state"}],condition:[],action:[{service:""}]},this._updateComponent())},isWideChanged:function(){null!==this.config&&this._updateComponent()},backTapped:function(){this.dirty&&!confirm("You have unsaved changes. Are you sure you want to leave?")||history.back()},_updateComponent:function(){this._rendered=window.AutomationEditor(this.$.root,{automation:this.config,onChange:this.configChanged,isWide:this.isWide},this._rendered)},saveAutomation:function(){var t=this.creatingNew?""+Date.now():this.automation.attributes.id;this.hass.callApi("post","config/automation/config/"+t,this.config).then(function(){this.dirty=!1,this.creatingNew&&(history.replaceState(null,null,"/config/automation/edit/"+t),this.fire("location-changed"))}.bind(this),function(t){throw this.errors=t.body.message,t}.bind(this))},computeName:function(t){return t&&window.hassUtil.computeStateName(t)}});</script><dom-module id="ha-config-automation" assetpath="automation/"><template><style>ha-automation-picker,
       ha-automation-editor{height:100%;}</style><app-route route="[[route]]" pattern="/edit/:automation" data="{{_routeData}}" active="{{_edittingAutomation}}"></app-route><app-route route="[[route]]" pattern="/new" active="{{_creatingNew}}"></app-route><template is="dom-if" if="[[!showEditor]]"><ha-automation-picker narrow="[[narrow]]" show-menu="[[showMenu]]" automations="[[automations]]" is-wide="[[isWide]]"></ha-automation-picker></template><template is="dom-if" if="[[showEditor]]" restamp=""><ha-automation-editor hass="[[hass]]" automation="[[automation]]" is-wide="[[isWide]]" creating-new="[[_creatingNew]]"></ha-automation-editor></template></template></dom-module><script>Polymer({is:"ha-config-automation",properties:{hass:Object,narrow:Boolean,showMenu:Boolean,route:Object,isWide:Boolean,_routeData:Object,_routeMatches:Boolean,_creatingNew:Boolean,_edittingAutomation:Boolean,automations:{type:Array,computed:"computeAutomations(hass)"},automation:{type:Object,computed:"computeAutomation(automations, _edittingAutomation, _routeData)"},showEditor:{type:Boolean,computed:"computeShowEditor(_edittingAutomation, _creatingNew)"}},computeAutomation:function(t,o,e){if(!t||!o)return null;for(var a=0;a<t.length;a++)if(t[a].attributes.id===e.automation)return t[a];return null},computeAutomations:function(t){var o=[];return Object.keys(t.states).forEach(function(e){var a=t.states[e];"automation"===window.hassUtil.computeDomain(a)&&"id"in a.attributes&&o.push(a)}),o.sort(function(t,o){var e=(t.attributes.alias||t.entity_id).toLowerCase(),a=(o.attributes.alias||o.entity_id).toLowerCase();return e<a?-1:e>a?1:0})},computeShowEditor:function(t,o){return o||t}});</script><dom-module id="ha-script-picker" assetpath="script/"><template><style include="ha-style">:host{display:block;}paper-item{cursor:pointer;}paper-fab{position:fixed;bottom:16px;right:16px;z-index:1;}paper-fab[is-wide]{bottom:24px;right:24px;}a{color:var(--primary-color);}</style><app-header-layout has-scrolling-region=""><app-header slot="header" fixed=""><app-toolbar><paper-icon-button icon="mdi:arrow-left" on-tap="_backTapped"></paper-icon-button><div main-title="">Scripts</div></app-toolbar></app-header><ha-config-section is-wide="[[isWide]]"><div slot="header">Script editor</div><div slot="introduction">The script editor allows you to create and edit scripts. Please read <a href="https://home-assistant.io/docs/scripts/editor/" target="_blank">the instructions</a> to make sure that you have configured Home Assistant correctly.</div><paper-card heading="Pick script to edit"><template is="dom-if" if="[[!scripts.length]]"><div class="card-content"><p>We couldn't find any editable scripts.</p></div></template><template is="dom-repeat" items="[[scripts]]" as="script"><paper-item><paper-item-body two-line="" on-tap="scriptTapped"><div>[[computeName(script)]]</div><div secondary="">[[computeDescription(script)]]</div></paper-item-body><iron-icon icon="mdi:chevron-right"></iron-icon></paper-item></template></paper-card></ha-config-section><paper-fab is-wide$="[[isWide]]" icon="mdi:plus" title="Add Script" on-tap="addScript"></paper-fab></app-header-layout></template></dom-module><script>Polymer({is:"ha-script-picker",properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},scripts:{type:Array},isWide:{type:Boolean}},scriptTapped:function(t){history.pushState(null,null,"/config/script/edit/"+this.scripts[t.model.index].entity_id),this.fire("location-changed")},addScript:function(){history.pushState(null,null,"/config/script/new"),this.fire("location-changed")},computeName:function(t){return window.hassUtil.computeStateName(t)},computeDescription:function(t){return""},_backTapped:function(){history.back()}});</script><script>var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){"use strict";function e(){}function n(n,t){var o,r,a,i,l=q;for(i=arguments.length;i-- >2;)V.push(arguments[i]);for(t&&null!=t.children&&(V.length||V.push(t.children),delete t.children);V.length;)if((r=V.pop())&&void 0!==r.pop)for(i=r.length;i--;)V.push(r[i]);else"boolean"==typeof r&&(r=null),(a="function"!=typeof n)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(a=!1)),a&&o?l[l.length-1]+=r:l===q?l=[r]:l.push(r),o=a;var u=new e;return u.nodeName=n,u.children=l,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==M.vnode&&M.vnode(u),u}function t(e,n){for(var t in n)e[t]=n[t];return e}function o(e){!e._dirty&&(e._dirty=!0)&&1==H.push(e)&&(M.debounceRendering||z)(r)}function r(){var e,n=H;for(H=[];e=n.pop();)e._dirty&&O(e)}function a(e,n,t){return"string"==typeof n||"number"==typeof n?void 0!==e.splitText:"string"==typeof n.nodeName?!e._componentConstructor&&i(e,n.nodeName):t||e._componentConstructor===n.nodeName}function i(e,n){return e.normalizedNodeName===n||e.nodeName.toLowerCase()===n.toLowerCase()}function l(e){var n=t({},e.attributes);n.children=e.children;var o=e.nodeName.defaultProps;if(void 0!==o)for(var r in o)void 0===n[r]&&(n[r]=o[r]);return n}function u(e,n){var t=n?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return t.normalizedNodeName=e,t}function p(e){var n=e.parentNode;n&&n.removeChild(e)}function s(e,n,t,o,r){if("className"===n&&(n="class"),"key"===n);else if("ref"===n)t&&t(null),o&&o(e);else if("class"!==n||r)if("style"===n){if(o&&"string"!=typeof o&&"string"!=typeof t||(e.style.cssText=o||""),o&&"object"===(void 0===o?"undefined":D(o))){if("string"!=typeof t)for(var a in t)a in o||(e.style[a]="");for(var a in o)e.style[a]="number"==typeof o[a]&&!1===I.test(a)?o[a]+"px":o[a]}}else if("dangerouslySetInnerHTML"===n)o&&(e.innerHTML=o.__html||"");else if("o"==n[0]&&"n"==n[1]){var i=n!==(n=n.replace(/Capture$/,""));n=n.toLowerCase().substring(2),o?t||e.addEventListener(n,d,i):e.removeEventListener(n,d,i),(e._listeners||(e._listeners={}))[n]=o}else if("list"!==n&&"type"!==n&&!r&&n in e)c(e,n,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(n);else{var l=r&&n!==(n=n.replace(/^xlink\:?/,""));null==o||!1===o?l?e.removeAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase()):e.removeAttribute(n):"function"!=typeof o&&(l?e.setAttributeNS("http://www.w3.org/1999/xlink",n.toLowerCase(),o):e.setAttribute(n,o))}else e.className=o||""}function c(e,n,t){try{e[n]=t}catch(e){}}function d(e){return this._listeners[e.type](M.event&&M.event(e)||e)}function f(){for(var e;e=J.pop();)M.afterMount&&M.afterMount(e),e.componentDidMount&&e.componentDidMount()}function h(e,n,t,o,r,a){K++||(R=null!=r&&void 0!==r.ownerSVGElement,G=null!=e&&!("__preactattr_"in e));var i=v(e,n,t,o,a);return r&&i.parentNode!==r&&r.appendChild(i),--K||(G=!1,a||f()),i}function v(e,n,t,o,r){var a=e,l=R;if(null!=n&&"boolean"!=typeof n||(n=""),"string"==typeof n||"number"==typeof n)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=n&&(e.nodeValue=n):(a=document.createTextNode(n),e&&(e.parentNode&&e.parentNode.replaceChild(a,e),_(e,!0))),a.__preactattr_=!0,a;var p=n.nodeName;if("function"==typeof p)return w(e,n,t,o);if(R="svg"===p||"foreignObject"!==p&&R,p=String(p),(!e||!i(e,p))&&(a=u(p,R),e)){for(;e.firstChild;)a.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(a,e),_(e,!0)}var s=a.firstChild,c=a.__preactattr_,d=n.children;if(null==c){c=a.__preactattr_={};for(var f=a.attributes,h=f.length;h--;)c[f[h].name]=f[h].value}return!G&&d&&1===d.length&&"string"==typeof d[0]&&null!=s&&void 0!==s.splitText&&null==s.nextSibling?s.nodeValue!=d[0]&&(s.nodeValue=d[0]):(d&&d.length||null!=s)&&g(a,d,t,o,G||null!=c.dangerouslySetInnerHTML),y(a,n.attributes,c),R=l,a}function g(e,n,t,o,r){var i,l,u,s,c,d=e.childNodes,f=[],h={},g=0,b=0,y=d.length,m=0,C=n?n.length:0;if(0!==y)for(w=0;w<y;w++){var k=d[w],x=k.__preactattr_;null!=(O=C&&x?k._component?k._component.__key:x.key:null)?(g++,h[O]=k):(x||(void 0!==k.splitText?!r||k.nodeValue.trim():r))&&(f[m++]=k)}if(0!==C)for(w=0;w<C;w++){c=null;var O=(s=n[w]).key;if(null!=O)g&&void 0!==h[O]&&(c=h[O],h[O]=void 0,g--);else if(!c&&b<m)for(i=b;i<m;i++)if(void 0!==f[i]&&a(l=f[i],s,r)){c=l,f[i]=void 0,i===m-1&&m--,i===b&&b++;break}c=v(c,s,t,o),u=d[w],c&&c!==e&&c!==u&&(null==u?e.appendChild(c):c===u.nextSibling?p(u):e.insertBefore(c,u))}if(g)for(var w in h)void 0!==h[w]&&_(h[w],!1);for(;b<=m;)void 0!==(c=f[m--])&&_(c,!1)}function _(e,n){var t=e._component;t?S(t):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==n&&null!=e.__preactattr_||p(e),b(e))}function b(e){for(e=e.lastChild;e;){var n=e.previousSibling;_(e,!0),e=n}}function y(e,n,t){var o;for(o in t)n&&null!=n[o]||null==t[o]||s(e,o,t[o],t[o]=void 0,R);for(o in n)"children"===o||"innerHTML"===o||o in t&&n[o]===("value"===o||"checked"===o?e[o]:t[o])||s(e,o,t[o],t[o]=n[o],R)}function m(e){var n=e.constructor.name;(F[n]||(F[n]=[])).push(e)}function C(e,n,t){var o,r=F[e.name];if(e.prototype&&e.prototype.render?(o=new e(n,t),P.call(o,n,t)):((o=new P(n,t)).constructor=e,o.render=k),r)for(var a=r.length;a--;)if(r[a].constructor===e){o.nextBase=r[a].nextBase,r.splice(a,1);break}return o}function k(e,n,t){return this.constructor(e,t)}function x(e,n,t,r,a){e._disable||(e._disable=!0,(e.__ref=n.ref)&&delete n.ref,(e.__key=n.key)&&delete n.key,!e.base||a?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=n,e._disable=!1,0!==t&&(1!==t&&!1===M.syncComponentUpdates&&e.base?o(e):O(e,1,a)),e.__ref&&e.__ref(e))}function O(e,n,o,r){if(!e._disable){var a,i,u,p=e.props,s=e.state,c=e.context,d=e.prevProps||p,v=e.prevState||s,g=e.prevContext||c,b=e.base,y=e.nextBase,m=b||y,k=e._component,w=!1;if(b&&(e.props=d,e.state=v,e.context=g,2!==n&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(p,s,c)?w=!0:e.componentWillUpdate&&e.componentWillUpdate(p,s,c),e.props=p,e.state=s,e.context=c),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!w){a=e.render(p,s,c),e.getChildContext&&(c=t(t({},c),e.getChildContext()));var P,N,j=a&&a.nodeName;if("function"==typeof j){var T=l(a);(i=k)&&i.constructor===j&&T.key==i.__key?x(i,T,1,c,!1):(P=i,e._component=i=C(j,T,c),i.nextBase=i.nextBase||y,i._parentComponent=e,x(i,T,0,c,!1),O(i,1,o,!0)),N=i.base}else u=m,(P=k)&&(u=e._component=null),(m||1===n)&&(u&&(u._component=null),N=h(u,a,c,o||!b,m&&m.parentNode,!0));if(m&&N!==m&&i!==k){var D=m.parentNode;D&&N!==D&&(D.replaceChild(N,m),P||(m._component=null,_(m,!1)))}if(P&&S(P),e.base=N,N&&!r){for(var U=e,A=e;A=A._parentComponent;)(U=A).base=N;N._component=U,N._componentConstructor=U.constructor}}if(!b||o?J.unshift(e):w||(e.componentDidUpdate&&e.componentDidUpdate(d,v,g),M.afterUpdate&&M.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);K||r||f()}}function w(e,n,t,o){for(var r=e&&e._component,a=r,i=e,u=r&&e._componentConstructor===n.nodeName,p=u,s=l(n);r&&!p&&(r=r._parentComponent);)p=r.constructor===n.nodeName;return r&&p&&(!o||r._component)?(x(r,s,3,t,o),e=r.base):(a&&!u&&(S(a),e=i=null),r=C(n.nodeName,s,t),e&&!r.nextBase&&(r.nextBase=e,i=null),x(r,s,1,t,o),e=r.base,i&&e!==i&&(i._component=null,_(i,!1))),e}function S(e){M.beforeUnmount&&M.beforeUnmount(e);var n=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var t=e._component;t?S(t):n&&(n.__preactattr_&&n.__preactattr_.ref&&n.__preactattr_.ref(null),e.nextBase=n,p(n),m(e),b(n)),e.__ref&&e.__ref(null)}function P(e,n){this._dirty=!0,this.context=n,this.props=e,this.state=this.state||{}}function N(e,n,t){return h(t,e,{},!1,n,!1)}function j(e,n){var t=E({},this.props[e]);n.target.value!==t[n.target.name]&&(n.target.value?t[n.target.name]=n.target.value:delete t[n.target.name],this.props.onChange(this.props.index,t))}function T(e){for(var n=Object.keys(se),t=0;t<n.length;t++)if(se[n[t]].configKey in e)return n[t];return null}var D="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof(e)},U=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},A=function(){function e(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(n,t,o){return t&&e(n.prototype,t),o&&e(n,o),n}}(),B=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},E=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},L=function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+(void 0===n?"undefined":_typeof(n)));e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)},W=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=(void 0===n?"undefined":_typeof(n))&&"function"!=typeof n?e:n},M={},V=[],q=[],z="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,I=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,H=[],J=[],K=0,R=!1,G=!1,F={};t(P.prototype,{setState:function(e,n){var r=this.state;this.prevState||(this.prevState=t({},r)),t(r,"function"==typeof e?e(r,this.props):e),n&&(this._renderCallbacks=this._renderCallbacks||[]).push(n),o(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),O(this,2)},render:function(){}});var $=function(e){function t(e){U(this,t);var n=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state.isValid=!0,n.state.value=JSON.stringify(e.value||{},null,2),n.onChange=n.onChange.bind(n),n}return L(t,P),A(t,[{key:"onChange",value:function(e){var n=e.target.value,t=void 0,o=void 0;try{t=JSON.parse(n),o=!0}catch(e){o=!1}this.setState({value:n,isValid:o}),o&&this.props.onChange(t)}},{key:"componentWillReceiveProps",value:function(e){var n=e.value;this.setState({value:JSON.stringify(n,null,2),isValid:!0})}},{key:"render",value:function(e,t){var o=e.label,r=t.value,a={minWidth:300,width:"100%"};return t.isValid||(a.border="1px solid red"),n("paper-textarea",{label:o,value:r,style:a,"onvalue-changed":this.onChange})}}]),t}(),Z=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"action"),e.serviceDataChanged=e.serviceDataChanged.bind(e),e}return L(t,P),A(t,[{key:"serviceDataChanged",value:function(e){this.props.onChange(this.props.index,E({},this.props.action,{data:e}))}},{key:"render",value:function(e){var t=e.action,o=t.alias,r=t.service,a=t.data;return n("div",null,n("paper-input",{label:"Alias",name:"alias",value:o,onChange:this.onChange}),n("paper-input",{label:"Service",name:"service",value:r,onChange:this.onChange}),n($,{label:"Service Data",value:a,onChange:this.serviceDataChanged}))}}]),t}();Z.configKey="service",Z.defaultConfig={alias:"",service:"",data:{}};var Q=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"condition"),e}return L(t,P),A(t,[{key:"render",value:function(e){var t=e.condition,o=t.entity_id,r=t.state,a=t.for;return n("div",null,n("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),n("paper-input",{label:"State",name:"state",value:r,onChange:this.onChange}),a&&n("pre",null,"For: ",JSON.stringify(a,null,2)))}}]),t}();Q.defaultConfig={entity_id:"",state:""};var X=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"condition"),e}return L(t,P),A(t,[{key:"render",value:function(e){var t=e.condition,o=t.value_template,r=t.entity_id,a=t.below,i=t.above;return n("div",null,n("paper-input",{label:"Entity Id",name:"entity_id",value:r,onChange:this.onChange}),n("paper-input",{label:"Above",name:"above",value:i,onChange:this.onChange}),n("paper-input",{label:"Below",name:"below",value:a,onChange:this.onChange}),n("paper-textarea",{label:"Value template (optional)",name:"value_template",value:o,"onvalue-changed":this.onChange}))}}]),t}();X.defaultConfig={entity_id:""};var Y=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"condition"),e.afterPicked=e.radioGroupPicked.bind(e,"after"),e.beforePicked=e.radioGroupPicked.bind(e,"before"),e}return L(t,P),A(t,[{key:"radioGroupPicked",value:function(e,n){var t=E({},this.props.condition);n.target.selected?t[e]=n.target.selected:delete t[e],this.props.onChange(this.props.index,t)}},{key:"render",value:function(e){var t=e.condition,o=t.after,r=t.after_offset,a=t.before,i=t.before_offset;return n("div",null,n("label",{id:"beforelabel"},"Before:"),n("paper-radio-group",{"allow-empty-selection":!0,selected:a,"aria-labelledby":"beforelabel","onpaper-radio-group-changed":this.beforePicked},n("paper-radio-button",{name:"sunrise"},"Sunrise"),n("paper-radio-button",{name:"sunset"},"Sunset")),n("paper-input",{label:"Before offset (optional)",name:"before_offset",value:i,onChange:this.onChange,disabled:void 0===a}),n("label",{id:"afterlabel"},"After:"),n("paper-radio-group",{"allow-empty-selection":!0,selected:o,"aria-labelledby":"afterlabel","onpaper-radio-group-changed":this.afterPicked},n("paper-radio-button",{name:"sunrise"},"Sunrise"),n("paper-radio-button",{name:"sunset"},"Sunset")),n("paper-input",{label:"After offset (optional)",name:"after_offset",value:r,onChange:this.onChange,disabled:void 0===o}))}}]),t}();Y.defaultConfig={};var ee=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"condition"),e}return L(t,P),A(t,[{key:"render",value:function(e){return n("div",null,n("paper-textarea",{label:"Value Template",name:"value_template",value:e.condition.value_template,"onvalue-changed":this.onChange}))}}]),t}();ee.defaultConfig={value_template:""};var ne=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"condition"),e}return L(t,P),A(t,[{key:"render",value:function(e){var t=e.condition,o=t.after,r=t.before;return n("div",null,n("paper-input",{label:"After",name:"after",value:o,onChange:this.onChange}),n("paper-input",{label:"Before",name:"before",value:r,onChange:this.onChange}))}}]),t}();ne.defaultConfig={};var te=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"condition"),e}return L(t,P),A(t,[{key:"render",value:function(e){var t=e.condition,o=t.entity_id,r=t.zone;return n("div",null,n("paper-input",{label:"Entity Id",name:"entity_id",value:o,onChange:this.onChange}),n("paper-input",{label:"Zone entity id",name:"zone",value:r,onChange:this.onChange}))}}]),t}();te.defaultConfig={entity_id:"",zone:""};var oe={state:Q,numeric_state:X,sun:Y,template:ee,time:ne,zone:te},re=Object.keys(oe).sort(),ae=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return L(t,P),A(t,[{key:"typeChanged",value:function(e){var n=e.target.selectedItem.innerHTML;n!==this.props.condition.condition&&this.props.onChange(this.props.index,E({condition:n},oe[n].defaultConfig))}},{key:"render",value:function(e){var t=e.index,o=e.condition,r=e.onChange,a=oe[o.condition],i=re.indexOf(o.condition);return a?n("div",null,n("paper-dropdown-menu-light",{label:"Condition Type","no-animations":!0},n("paper-listbox",{slot:"dropdown-content",selected:i,"oniron-select":this.typeChanged},re.map(function(e){return n("paper-item",null,e)}))),n(a,{index:t,condition:o,onChange:r})):n("div",null,"Unsupported condition: ",o.condition,n("pre",null,JSON.stringify(o,null,2)))}}]),t}(),ie=function(e){function t(){return U(this,t),W(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return L(t,P),A(t,[{key:"render",value:function(e){var t=e.action,o=e.index,r=e.onChange;return n(ae,{condition:t,onChange:r,index:o})}}]),t}();ie.configKey="condition",ie.defaultConfig=E({condition:"state"},Q.defaultConfig);var le=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"action"),e}return L(t,P),A(t,[{key:"render",value:function(e){return n("div",null,n("paper-input",{label:"Delay",name:"delay",value:e.action.delay,onChange:this.onChange}))}}]),t}();le.configKey="delay",le.defaultConfig={delay:""};var ue=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"action"),e.serviceDataChanged=e.serviceDataChanged.bind(e),e}return L(t,P),A(t,[{key:"serviceDataChanged",value:function(e){this.props.onChange(this.props.index,E({},this.props.action,{data:e}))}},{key:"render",value:function(e){var t=e.action,o=t.event,r=t.event_data;return n("div",null,n("paper-input",{label:"Event",name:"event",value:o,onChange:this.onChange}),n($,{label:"Service Data",value:r,onChange:this.serviceDataChanged}))}}]),t}();ue.configKey="event",ue.defaultConfig={event:"",event_data:{}};var pe=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=j.bind(e,"action"),e.onTemplateChange=e.onTemplateChange.bind(e),e}return L(t,P),A(t,[{key:"onTemplateChange",value:function(e){this.props.onChange(this.props.index,E({},this.props.trigger,B({},e.target.name,e.target.value)))}},{key:"render",value:function(e){var t=e.action,o=t.wait_template,r=t.timeout;return n("div",null,n("paper-textarea",{label:"Wait Template",name:"wait_template",value:o,"onvalue-changed":this.onTemplateChange}),n("paper-input",{label:"Timeout (Optional)",name:"timeout",value:r,onChange:this.onChange}))}}]),t}();pe.configKey="wait_template",pe.defaultConfig={wait_template:"",timeout:""};var se={"Call Service":Z,Delay:le,Wait:pe,Condition:ie,"Fire Event":ue},ce=Object.keys(se).sort(),de=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.typeChanged=e.typeChanged.bind(e),e}return L(t,P),A(t,[{key:"typeChanged",value:function(e){var n=e.target.selectedItem.innerHTML;T(this.props.action)!==n&&this.props.onChange(this.props.index,se[n].defaultConfig)}},{key:"render",value:function(e){var t=e.index,o=e.action,r=e.onChange,a=T(o),i=a&&se[a],l=ce.indexOf(a);return i?n("div",null,n("paper-dropdown-menu-light",{label:"Action Type","no-animations":!0},n("paper-listbox",{slot:"dropdown-content",selected:l,"oniron-select":this.typeChanged},ce.map(function(e){return n("paper-item",null,e)}))),n(i,{index:t,action:o,onChange:r})):n("div",null,"Unsupported action",n("pre",null,JSON.stringify(o,null,2)))}}]),t}(),fe=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onDelete=e.onDelete.bind(e),e}return L(t,P),A(t,[{key:"onDelete",value:function(){confirm("Sure you want to delete?")&&this.props.onChange(this.props.index,null)}},{key:"render",value:function(e){return n("paper-card",null,n("div",{class:"card-menu"},n("paper-menu-button",{"no-animations":!0,"horizontal-align":"right","horizontal-offset":"-5","vertical-offset":"-5"},n("paper-icon-button",{icon:"mdi:dots-vertical",slot:"dropdown-trigger"}),n("paper-listbox",{slot:"dropdown-content"},n("paper-item",{disabled:!0},"Duplicate"),n("paper-item",{onTap:this.onDelete},"Delete")))),n("div",{class:"card-content"},n(de,e)))}}]),t}(),he=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.addAction=e.addAction.bind(e),e.actionChanged=e.actionChanged.bind(e),e}return L(t,P),A(t,[{key:"addAction",value:function(){var e=this.props.script.concat({service:""});this.props.onChange(e)}},{key:"actionChanged",value:function(e,n){var t=this.props.script.concat();null===n?t.splice(e,1):t[e]=n,this.props.onChange(t)}},{key:"render",value:function(e){var t=this;return n("div",{class:"script"},e.script.map(function(e,o){return n(fe,{index:o,action:e,onChange:t.actionChanged})}),n("paper-card",null,n("div",{class:"card-actions add-card"},n("paper-button",{onTap:this.addAction},"Add action"))))}}]),t}(),ve=function(e){function t(){U(this,t);var e=W(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onChange=e.onChange.bind(e),e.sequenceChanged=e.sequenceChanged.bind(e),e}return L(t,P),A(t,[{key:"onChange",value:function(e){this.props.onChange(E({},this.props.script,B({},e.target.name,e.target.value)))}},{key:"sequenceChanged",value:function(e){this.props.onChange(E({},this.props.script,{sequence:e}))}},{key:"render",value:function(e){var t=e.script,o=e.isWide,r=t.alias,a=t.sequence;return n("div",null,n("ha-config-section",{"is-wide":o},n("span",{slot:"header"},r),n("span",{slot:"introduction"},"Use scripts to execute a sequence of actions."),n("paper-card",null,n("div",{class:"card-content"},n("paper-input",{label:"Name",name:"alias",value:r,onChange:this.onChange})))),n("ha-config-section",{"is-wide":o},n("span",{slot:"header"},"Sequence"),n("span",{slot:"introduction"},"The sequence of actions of this script.",n("p",null,n("a",{href:"https://home-assistant.io/docs/scripts/",target:"_blank"},"Learn more about available actions."))),n(he,{script:a,onChange:this.sequenceChanged})))}}]),t}();window.ScriptEditor=function(e,t,o){return N(n(ve,t),e,o)},window.unmountPreact=function(e,n){N(function(){return null},e,n)}}();</script><dom-module id="ha-script-editor" assetpath="script/"><template><style include="ha-style">.errors{padding:20px;font-weight:bold;color:var(--google-red-500);}.content{padding-bottom:20px;}paper-card{display:block;}.triggers,
diff --git a/homeassistant/components/frontend/www_static/panels/ha-panel-config.html.gz b/homeassistant/components/frontend/www_static/panels/ha-panel-config.html.gz
index 66644926537bed6f7299bf68e979c03586fa7067..439e965e0c9d2bff1e09fab4587e4b92513b58d9 100644
Binary files a/homeassistant/components/frontend/www_static/panels/ha-panel-config.html.gz and b/homeassistant/components/frontend/www_static/panels/ha-panel-config.html.gz differ
diff --git a/homeassistant/components/frontend/www_static/service_worker.js b/homeassistant/components/frontend/www_static/service_worker.js
index f23669fb07eef2d0aadc773f56d390eaca4b9548..ce24b20ac9293664d837582cf626cd6b32c54788 100644
--- a/homeassistant/components/frontend/www_static/service_worker.js
+++ b/homeassistant/components/frontend/www_static/service_worker.js
@@ -37,7 +37,7 @@
 /* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */
 'use strict';
 
-var precacheConfig = [["/","e22b4dfa3b4277935d374eb30b36b7a7"],["/frontend/panels/dev-event-d409e7ab537d9fe629126d122345279c.html","936814991f2a5e23d61d29f0d40f81b8"],["/frontend/panels/dev-info-b0e55eb657fd75f21aba2426ac0cedc0.html","1fa953b0224470f70d4e87bbe4dff191"],["/frontend/panels/dev-mqtt-94b222b013a98583842de3e72d5888c6.html","dc3ddfac58397feda97317358f0aecbb"],["/frontend/panels/dev-service-422b2c181ee0713fa31d45a64e605baf.html","ae7d26b1c8c3309fd3c65944f89ea03f"],["/frontend/panels/dev-state-7948d3dba058f31517d880df8ed0e857.html","ff8156bb1a52490fcc07466556fce0e1"],["/frontend/panels/dev-template-928e7b81b9c113b70edc9f4a1d051827.html","312c8313800b44c83bcb8dc2df30c759"],["/frontend/panels/map-565db019147162080c21af962afc097f.html","a1a360042395682335e2f471dddad309"],["/static/compatibility-1686167ff210e001f063f5c606b2e74b.js","6ee7b5e2dd82b510c3bd92f7e215988e"],["/static/core-2a7d01e45187c7d4635da05065b5e54e.js","90a0a8a6a6dd0ca41b16f40e7d23924d"],["/static/frontend-6b0a95408d9ee869d0fe20c374077ed4.html","2fced25e314a02654197adbfe36f1063"],["/static/mdi-89074face5529f5fe6fbae49ecb3e88b.html","97754e463f9e56a95c813d4d8e792347"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/icons/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/icons/favicon.ico","04235bda7843ec2fceb1cbe2bc696cf4"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"]];
+var precacheConfig = [["/","da6c72cc82251a0456b2e678ebb6795c"],["/frontend/panels/dev-event-d409e7ab537d9fe629126d122345279c.html","936814991f2a5e23d61d29f0d40f81b8"],["/frontend/panels/dev-info-b0e55eb657fd75f21aba2426ac0cedc0.html","1fa953b0224470f70d4e87bbe4dff191"],["/frontend/panels/dev-mqtt-94b222b013a98583842de3e72d5888c6.html","dc3ddfac58397feda97317358f0aecbb"],["/frontend/panels/dev-service-422b2c181ee0713fa31d45a64e605baf.html","ae7d26b1c8c3309fd3c65944f89ea03f"],["/frontend/panels/dev-state-7948d3dba058f31517d880df8ed0e857.html","ff8156bb1a52490fcc07466556fce0e1"],["/frontend/panels/dev-template-928e7b81b9c113b70edc9f4a1d051827.html","312c8313800b44c83bcb8dc2df30c759"],["/frontend/panels/map-565db019147162080c21af962afc097f.html","a1a360042395682335e2f471dddad309"],["/static/compatibility-1686167ff210e001f063f5c606b2e74b.js","6ee7b5e2dd82b510c3bd92f7e215988e"],["/static/core-2a7d01e45187c7d4635da05065b5e54e.js","90a0a8a6a6dd0ca41b16f40e7d23924d"],["/static/frontend-7e13ce36d3141182a62a5b061e87e77a.html","73f53a9b597e1e69e0b3e56f4fc8f020"],["/static/mdi-89074face5529f5fe6fbae49ecb3e88b.html","97754e463f9e56a95c813d4d8e792347"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/icons/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/icons/favicon.ico","04235bda7843ec2fceb1cbe2bc696cf4"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"]];
 var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : '');
 
 
diff --git a/homeassistant/components/frontend/www_static/service_worker.js.gz b/homeassistant/components/frontend/www_static/service_worker.js.gz
index 2b44cab0a33464c33265692beb6105eb242e2dfc..2f4bd27e55113e95ce11c541c89e2d0853b3db68 100644
Binary files a/homeassistant/components/frontend/www_static/service_worker.js.gz and b/homeassistant/components/frontend/www_static/service_worker.js.gz differ
diff --git a/homeassistant/components/frontend/www_static/webcomponents-lite.js b/homeassistant/components/frontend/www_static/webcomponents-lite.js
index 7f2e16c7c2920f508916b4ebc2daf3abcd1a4bc6..8c1d0f7d3da0f175215a13f231a4d5367b6c1094 100644
--- a/homeassistant/components/frontend/www_static/webcomponents-lite.js
+++ b/homeassistant/components/frontend/www_static/webcomponents-lite.js
@@ -28,164 +28,166 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
 Code distributed by Google as part of the polymer project is also
 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
 */
-'use strict';var nb="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
-(function(){function k(){var a=this;this.s={};this.g=document.documentElement;var b=new za;b.rules=[];this.h=t.set(this.g,new t(b));this.i=!1;this.b=this.a=null;ob(function(){a.c()})}function H(){this.customStyles=[];this.enqueued=!1}function pb(){}function ha(a){this.cache={};this.c=void 0===a?100:a}function p(){}function t(a,b,c,d,e){this.G=a||null;this.b=b||null;this.sa=c||[];this.P=null;this.Y=e||"";this.a=this.B=this.K=null}function r(){}function za(){this.end=this.start=0;this.rules=this.parent=
-this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}function $c(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;m(this)&&(e=[],J(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var g=e[f];1===g.__CE_state&&a.disconnectedCallback(g)}this.ownerDocument.__CE_hasRegistry?a.c(this):a.j(this);
-return b}})}function c(b,c){u(b,"insertAdjacentElement",function(b,d){var e=m(d);b=c.call(this,b,d);e&&a.a(d);m(b)&&a.b(d);return b})}qb?u(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=qb.call(this,a)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(Aa&&Aa.get)b(Element.prototype,Aa);else if(Ba&&Ba.get)b(HTMLElement.prototype,Ba);else{var d=Ca.call(document,"div");a.u(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return rb.call(this,
-!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)Da.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)ja.call(b,d.childNodes[0])}})})}u(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return sb.call(this,b,c);var d=Ea.call(this,b);sb.call(this,b,c);c=Ea.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});u(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return tb.call(this,
-b,c,d);var e=ka.call(this,b,c);tb.call(this,b,c,d);d=ka.call(this,b,c);a.attributeChangedCallback(this,c,e,d,b)});u(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return ub.call(this,b);var c=Ea.call(this,b);ub.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});u(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return vb.call(this,b,c);var d=ka.call(this,b,c);vb.call(this,b,c);var e=ka.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
-c,d,e,b)});wb?c(HTMLElement.prototype,wb):xb?c(Element.prototype,xb):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");yb(a,Element.prototype,{La:ad,append:bd});cd(a,{kb:dd,jb:ed,ub:fd,remove:gd})}function cd(a,b){var c=Element.prototype;c.before=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});b.kb.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],
-g instanceof Element&&a.b(g)};c.after=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});b.jb.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.replaceWith=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});var g=m(this);b.ub.apply(this,d);for(var h=0;h<f.length;h++)a.a(f[h]);
-if(g)for(a.a(this),f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.remove=function(){var c=m(this);b.remove.call(this);c&&a.a(this)}}function hd(a){function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,h=e.length;if(0<h&&m(this)){c=Array(h);for(var n=0;n<h;n++)c[n]=e[n]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.a(c[b])}}})}
-u(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=zb.call(this,b,d);if(m(this))for(d=0;d<c.length;d++)a.b(c[d]);return b}c=m(b);d=zb.call(this,b,d);c&&a.a(b);m(this)&&a.b(b);return d});u(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=ja.call(this,b);if(m(this))for(var e=0;e<c.length;e++)a.b(c[e]);return b}c=m(b);e=ja.call(this,b);c&&a.a(b);m(this)&&
-a.b(b);return e});u(Node.prototype,"cloneNode",function(b){b=rb.call(this,b);this.ownerDocument.__CE_hasRegistry?a.c(b):a.j(b);return b});u(Node.prototype,"removeChild",function(b){var c=m(b),e=Da.call(this,b);c&&a.a(b);return e});u(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Ab.call(this,b,d);if(m(this))for(a.a(d),d=0;d<c.length;d++)a.b(c[d]);return b}c=m(b);var f=Ab.call(this,b,d),g=m(this);g&&a.a(d);c&&a.a(b);g&&
-a.b(b);return f});Fa&&Fa.get?b(Node.prototype,Fa):a.u(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)Da.call(this,this.firstChild);ja.call(this,document.createTextNode(a))}})})}function id(a){u(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=a.f(b);if(c)return new c.constructor}b=Ca.call(this,b);a.g(b);return b});
-u(Document.prototype,"importNode",function(b,c){b=jd.call(this,b,c);this.__CE_hasRegistry?a.c(b):a.j(b);return b});u(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.f(c);if(d)return new d.constructor}b=kd.call(this,b,c);a.g(b);return b});yb(a,Document.prototype,{La:ld,append:md})}function yb(a,b,c){b.prepend=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof
-Node&&m(a)});c.La.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};b.append=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&m(a)});c.append.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(m(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)}}function nd(a){window.HTMLElement=function(){function b(){var b=this.constructor,d=a.C(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");
-var e=d.constructionStack;if(!e.length)return e=Ca.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,a.g(e),e;d=e.length-1;var f=e[d];if(f===Bb)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");e[d]=Bb;Object.setPrototypeOf(f,b.prototype);a.g(f);return f}b.prototype=od.prototype;return b}()}function B(a){this.f=!1;this.a=a;this.h=new Map;this.g=function(a){return a()};this.b=!1;this.c=
-[];this.i=new Ga(a,document)}function Cb(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function Ga(a,b){this.b=a;this.a=b;this.N=void 0;this.b.c(this.a);"loading"===this.a.readyState&&(this.N=new MutationObserver(this.f.bind(this)),this.N.observe(this.a,{childList:!0,subtree:!0}))}function A(){this.s=new Map;this.l=new Map;this.i=[];this.h=!1}function l(a,b,c){if(a!==Db)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=
-l.prototype;a.D(b,c);return a}function la(a){if(!a.__shady||void 0===a.__shady.firstChild){a.__shady=a.__shady||{};a.__shady.firstChild=Ha(a);a.__shady.lastChild=Ia(a);Eb(a);for(var b=a.__shady.childNodes=S(a),c=0,d;c<b.length&&(d=b[c]);c++)d.__shady=d.__shady||{},d.__shady.parentNode=a,d.__shady.nextSibling=b[c+1]||null,d.__shady.previousSibling=b[c-1]||null,Fb(d)}}function pd(a){var b=a&&a.N;b&&(b.ba.delete(a.ab),b.ba.size||(a.fb.__shady.W=null))}function qd(a,b){a.__shady=a.__shady||{};a.__shady.W||
-(a.__shady.W=new ma);a.__shady.W.ba.add(b);var c=a.__shady.W;return{ab:b,N:c,fb:a,takeRecords:function(){return c.takeRecords()}}}function ma(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.ba=new Set}function T(a){return a.__shady&&void 0!==a.__shady.firstChild}function L(a){return"ShadyRoot"===a.Wa}function Z(a){a=a.getRootNode();if(L(a))return a}function Ja(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=Object.getOwnPropertyDescriptor(b,e);f&&
-Object.defineProperty(a,e,f)}}function Ka(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)Ja(a,c[d]);return a}function rd(a,b){for(var c in b)a[c]=b[c]}function Gb(a){La.push(a);Ma.textContent=Hb++}function Ib(a){Na||(Na=!0,Gb(na));aa.push(a)}function na(){Na=!1;for(var a=!!aa.length;aa.length;)aa.shift()();return a}function sd(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===
-a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})}function Jb(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function Kb(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}function Oa(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g;e<f&&(g=d[e]);e++){a:{var h=
-g;var n=a;var R=b;switch(h.nodeType){case Node.ELEMENT_NODE:for(var k=h.localName,ia="<"+k,l=h.attributes,m=0;n=l[m];m++)ia+=" "+n.name+'="'+n.value.replace(td,Jb)+'"';ia+=">";h=ud[k]?ia:ia+Oa(h,R)+"</"+k+">";break a;case Node.TEXT_NODE:h=h.data;h=n&&vd[n.localName]?h:h.replace(wd,Jb);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h),Error("not implemented");}}c+=h}return c}function U(a){F.currentNode=a;return F.parentNode()}function Ha(a){F.currentNode=
-a;return F.firstChild()}function Ia(a){F.currentNode=a;return F.lastChild()}function Lb(a){F.currentNode=a;return F.previousSibling()}function Mb(a){F.currentNode=a;return F.nextSibling()}function S(a){var b=[];F.currentNode=a;for(a=F.firstChild();a;)b.push(a),a=F.nextSibling();return b}function Nb(a){x.currentNode=a;return x.parentNode()}function Ob(a){x.currentNode=a;return x.firstChild()}function Pb(a){x.currentNode=a;return x.lastChild()}function Qb(a){x.currentNode=a;return x.previousSibling()}
-function Rb(a){x.currentNode=a;return x.nextSibling()}function Sb(a){var b=[];x.currentNode=a;for(a=x.firstChild();a;)b.push(a),a=x.nextSibling();return b}function Tb(a){return Oa(a,function(a){return S(a)})}function Ub(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}}function M(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,
-d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function N(a){M(a,Vb);M(a,Pa);M(a,Qa)}function Wb(a,b,c){Fb(a);c=c||null;a.__shady=a.__shady||{};b.__shady=b.__shady||{};c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&
-(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}function Ra(a,b,c){if(b===a)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(c){var d=c.__shady&&c.__shady.parentNode;if(void 0!==d&&d!==a||void 0===d&&U(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.parentNode&&
-Sa(b.parentNode,b);d=Z(a);var e;if(e=d)a:{if(!b.__noInsertionPoint){var f;"slot"===b.localName?f=[b]:b.querySelectorAll&&(f=b.querySelectorAll("slot"));if(f&&f.length){e=f;break a}}e=void 0}f=e;d&&("slot"===a.localName||f)&&d.M();if(T(a)){e=c;Eb(a);a.__shady=a.__shady||{};void 0!==a.__shady.firstChild&&(a.__shady.childNodes=null);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var g=b.childNodes,h=0;h<g.length;h++)Wb(g[h],a,e);b.__shady=b.__shady||{};e=void 0!==b.__shady.firstChild?null:void 0;b.__shady.firstChild=
-b.__shady.lastChild=e;b.__shady.childNodes=e}else Wb(b,a,e);if(Ta(a)){a.__shady.root.M();var n=!0}else a.__shady.root&&(n=!0)}n||(n=L(a)?a.host:a,c?(c=Xb(c),Ua.call(n,b,c)):Yb.call(n,b));Zb(a,b);f&&d.$a(f);return b}function Sa(a,b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+b);var c=Z(b);if(T(a)){b.__shady=b.__shady||{};a.__shady=a.__shady||{};b===a.__shady.firstChild&&(a.__shady.firstChild=b.__shady.nextSibling);b===a.__shady.lastChild&&(a.__shady.lastChild=
-b.__shady.previousSibling);var d=b.__shady.previousSibling;var e=b.__shady.nextSibling;d&&(d.__shady=d.__shady||{},d.__shady.nextSibling=e);e&&(e.__shady=e.__shady||{},e.__shady.previousSibling=d);b.__shady.parentNode=b.__shady.previousSibling=b.__shady.nextSibling=void 0;void 0!==a.__shady.childNodes&&(a.__shady.childNodes=null);if(Ta(a)){a.__shady.root.M();var f=!0}}$b(b);c&&((e=a&&"slot"===a.localName)&&(f=!0),((d=c.gb(b))||e)&&c.M());f||(f=L(a)?a.host:a,(!a.__shady.root&&"slot"!==b.localName||
-f===U(b))&&ba.call(f,b));Zb(a,null,b);return b}function $b(a){if(a.__shady&&void 0!==a.__shady.ta)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)$b(e);a.__shady&&(a.__shady.ta=void 0)}function Xb(a){var b=a;a&&"slot"===a.localName&&(b=(b=a.__shady&&a.__shady.U)&&b.length?b[0]:Xb(a.nextSibling));return b}function Ta(a){return(a=a&&a.__shady&&a.__shady.root)&&a.Ba()}function ac(a,b){"slot"===b?(a=a.parentNode,Ta(a)&&a.__shady.root.M()):"slot"===a.localName&&"name"===b&&(b=Z(a))&&(b.ib(a),
-b.M())}function Zb(a,b,c){if(a=a.__shady&&a.__shady.W)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),a.wb()}function bc(a){if(a&&a.nodeType){a.__shady=a.__shady||{};var b=a.__shady.ta;void 0===b&&(L(a)?b=a:b=(b=a.parentNode)?bc(b):a,document.documentElement.contains(a)&&(a.__shady.ta=b));return b}}function oa(a,b,c){var d=[];cc(a.childNodes,b,c,d);return d}function cc(a,b,c,d){for(var e=0,f=a.length,g;e<f&&(g=a[e]);e++){var h;if(h=g.nodeType===Node.ELEMENT_NODE){h=g;var n=b,R=c,k=d,l=n(h);l&&k.push(h);
-R&&R(l)?h=l:(cc(h.childNodes,n,R,k),h=void 0)}if(h)break}}function dc(a){a=a.getRootNode();L(a)&&a.Ea()}function ec(a,b,c){pa||(pa=window.ShadyCSS&&window.ShadyCSS.ScopingShim);pa&&"class"===b?pa.setElementClass(a,c):(fc.call(a,b,c),ac(a,b))}function gc(a,b){if(a.ownerDocument!==document)return Va.call(document,a,b);var c=Va.call(document,a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=gc(a[b],!0),c.appendChild(d)}return c}function Wa(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),
-d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===document&&c.push(window);return c}function hc(a,b){if(!L)return a;a=Wa(a,!0);for(var c=0,d,e,f,g;c<b.length;c++)if(d=b[c],f=d===window?window:d.getRootNode(),f!==e&&(g=a.indexOf(f),e=f),!L(f)||-1<g)return d}function Xa(a){function b(b,d){b=new a(b,d);b.ja=d&&!!d.composed;return b}rd(b,a);b.prototype=a.prototype;return b}function ic(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&
-b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&a.target!==a.relatedTarget&&(e.call(b,a),!a.Ua);d++);}function xd(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];ic(a,d,"capture");if(a.ka)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=d.__shady&&d.__shady.root;if(!c||f&&f===e)if(ic(a,d,"bubble"),d!==window&&(e=d.getRootNode()),
-a.ka)break}}function jc(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=a[g],n=h.type,R=h.capture,k=h.once,l=h.passive;if(b===h.node&&c===n&&d===R&&e===k&&f===l)return g}return-1}function kc(a,b,c){if(b){if("object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var g=c&&c.la||this,h=b.Z;if(h){if(-1<jc(h,g,a,d,e,f))return}else b.Z=[];h=function(d){e&&this.removeEventListener(a,b,c);d.__target||lc(d);if(g!==this){var f=Object.getOwnPropertyDescriptor(d,"currentTarget");
-Object.defineProperty(d,"currentTarget",{get:function(){return g},configurable:!0})}if(d.composed||-1<d.composedPath().indexOf(g))if(d.target===d.relatedTarget)d.eventPhase===Event.BUBBLING_PHASE&&d.stopImmediatePropagation();else if(d.eventPhase===Event.CAPTURING_PHASE||d.bubbles||d.target===g){var h="object"===typeof b&&b.handleEvent?b.handleEvent(d):b.call(g,d);g!==this&&(f?(Object.defineProperty(d,"currentTarget",f),f=null):delete d.currentTarget);return h}};b.Z.push({node:this,type:a,capture:d,
-once:e,passive:f,zb:h});Ya[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][d?"capture":"bubble"].push(h)):(this instanceof Window?mc:nc).call(this,a,h,c)}}function oc(a,b,c){if(b){if("object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var g=c&&c.la||this,h=void 0;var n=null;try{n=b.Z}catch(R){}n&&(e=jc(n,g,a,d,e,f),-1<e&&(h=n.splice(e,1)[0].zb,n.length||(b.Z=void 0)));(this instanceof Window?
-pc:qc).call(this,a,h||b,c);h&&Ya[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],h=a.indexOf(h),-1<h&&a.splice(h,1))}}function yd(){for(var a in Ya)window.addEventListener(a,function(a){a.__target||(lc(a),xd(a))},!0)}function lc(a){a.__target=a.target;a.za=a.relatedTarget;if(C.V){var b=rc,c=Object.getPrototypeOf(a);if(!c.hasOwnProperty("__patchProto")){var d=Object.create(c);d.Bb=c;Ja(d,b);c.__patchProto=d}a.__proto__=c.__patchProto}else Ja(a,rc)}function ca(a,
-b){return{index:a,X:[],aa:b}}function zd(a,b,c,d){var e=0,f=0,g=0,h=0,n=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<n;g++)if(a[g]!==c[g])break a;g=n}if(b==a.length&&d==c.length){h=a.length;for(var k=c.length,l=0;l<n-g&&Ad(a[--h],c[--k]);)l++;h=l}e+=g;f+=g;b-=h;d-=h;if(!(b-e||d-f))return[];if(e==b){for(b=ca(e,0);f<d;)b.X.push(c[f++]);return[b]}if(f==d)return[ca(e,b-e)];n=e;g=f;d=d-g+1;h=b-n+1;b=Array(d);for(k=0;k<d;k++)b[k]=Array(h),b[k][0]=k;for(k=0;k<h;k++)b[0][k]=k;for(k=1;k<d;k++)for(l=1;l<h;l++)if(a[n+
-l-1]===c[g+k-1])b[k][l]=b[k-1][l-1];else{var m=b[k-1][l]+1,p=b[k][l-1]+1;b[k][l]=m<p?m:p}n=b.length-1;g=b[0].length-1;d=b[n][g];for(a=[];0<n||0<g;)n?g?(h=b[n-1][g-1],k=b[n-1][g],l=b[n][g-1],m=k<l?k<h?k:h:l<h?l:h,m==h?(h==d?a.push(0):(a.push(1),d=h),n--,g--):m==k?(a.push(3),n--,d=k):(a.push(2),g--,d=l)):(a.push(3),n--):(a.push(2),g--);a.reverse();b=void 0;n=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(n.push(b),b=void 0);e++;f++;break;case 1:b||(b=ca(e,0));b.aa++;e++;b.X.push(c[f]);f++;break;
-case 2:b||(b=ca(e,0));b.aa++;e++;break;case 3:b||(b=ca(e,0)),b.X.push(c[f]),f++}b&&n.push(b);return n}function Ad(a,b){return a===b}function sc(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function tc(a){dc(a);return a.__shady&&a.__shady.assignedSlot||null}function I(a,b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}}function Bd(){var a=window.customElements&&window.customElements.nativeHTMLElement||
-HTMLElement;I(window.Node.prototype,Cd);I(window.Window.prototype,Dd);I(window.Text.prototype,Ed);I(window.DocumentFragment.prototype,Za);I(window.Element.prototype,uc);I(window.Document.prototype,vc);window.HTMLSlotElement&&I(window.HTMLSlotElement.prototype,wc);I(a.prototype,Fd);C.V&&(N(window.Node.prototype),N(window.Text.prototype),N(window.DocumentFragment.prototype),N(window.Element.prototype),N(a.prototype),N(window.Document.prototype),window.HTMLSlotElement&&N(window.HTMLSlotElement.prototype))}
-function xc(a){var b=Gd.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function m(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function $a(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}function J(a,b,c){c=c?c:new Set;for(var d=a;d;){if(d.nodeType===
-Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)J(d,b,c);d=$a(a,e);continue}else if("template"===f){d=$a(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)J(e,b,c)}d=d.firstChild?d.firstChild:$a(a,d)}}function u(a,b,c){a[b]=c}function ab(a){a=a.replace(G.mb,"").replace(G.port,"");var b=yc,c=a,d=new za;d.start=0;d.end=c.length;for(var e=
-d,f=0,g=c.length;f<g;f++)if("{"===c[f]){e.rules||(e.rules=[]);var h=e,n=h.rules[h.rules.length-1]||null;e=new za;e.start=f+1;e.parent=h;e.previous=n;h.rules.push(e)}else"}"===c[f]&&(e.end=f+1,e=e.parent||d);return b(d,a)}function yc(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&((c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=Hd(c),c=c.replace(G.Ka," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=!c.indexOf("@"),
-a.atRule)?c.indexOf("@media")?c.match(G.rb)&&(a.type=O.ia,a.keyframesName=a.selector.split(G.Ka).pop()):a.type=O.MEDIA_RULE:a.type=c.indexOf("--")?O.STYLE_RULE:O.va);if(c=a.rules)for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++)yc(f,b);return a}function Hd(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}function zc(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));
-if(f){f=0;for(var g=e.length,h;f<g&&(h=e[f]);f++)d=zc(h,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(G.Fa,"").replace(G.Ja,""),b=b.replace(G.sb,"").replace(G.yb,"")),(d=b.trim())&&(d="  "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}function Ac(a){q=a&&a.shimcssproperties?!1:w||!(navigator.userAgent.match("AppleWebKit/601")||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}function V(a,b){if(!a)return"";"string"===typeof a&&
-(a=ab(a));b&&W(a,b);return zc(a,q)}function qa(a){!a.__cssRules&&a.textContent&&(a.__cssRules=ab(a.textContent));return a.__cssRules||null}function Bc(a){return!!a.parent&&a.parent.type===O.ia}function W(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===O.MEDIA_RULE){var g=a.selector.match(Id);g&&(window.matchMedia(g[1]).matches||(e=!0))}f===O.STYLE_RULE?b(a):c&&f===O.ia?c(a):f===O.va&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var h;e<f&&(h=a[e]);e++)W(h,b,c,d)}}}function bb(a,b,c,d){var e=document.createElement("style");
-b&&e.setAttribute("scope",b);e.textContent=a;Cc(e,c,d);return e}function Cc(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);P?a.compareDocumentPosition(P)===Node.DOCUMENT_POSITION_PRECEDING&&(P=a):P=a}function Dc(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&!--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=Dc(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,
-d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}function ra(a,b){w?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}function Q(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,Y:c}}function Ec(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];
-if(e.nodeType===Node.ELEMENT_NODE){var f=e.getRootNode();var g=e;var h=[];g.classList?h=Array.from(g.classList):g instanceof window.SVGElement&&g.hasAttribute("class")&&(h=g.getAttribute("class").split(/\s+/));g=h;h=g.indexOf(v.c);(g=-1<h?g[h+1]:"")&&f===e.ownerDocument?v.a(e,g,!0):f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f=f.host)&&(f=Q(f).is,g!==f&&(g&&v.a(e,g,!0),v.a(e,f)))}}}}function Jd(a){if(a=sa[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||
-0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function Fc(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function Kd(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,Ld.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))}function ob(a){requestAnimationFrame(function(){Gc?Gc(a):(cb||(cb=new Promise(function(a){db=a}),"complete"===document.readyState?db():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&
-db()})),cb.then(function(){a&&a()}))})}(function(){if(!function(){var a=document.createEvent("Event");a.initEvent("foo",!0,!0);a.preventDefault();return a.defaultPrevented}()){var a=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(a.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var b=/Trident/.test(navigator.userAgent);if(!window.CustomEvent||b&&"function"!==typeof window.CustomEvent)window.CustomEvent=
-function(a,b){b=b||{};var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c},window.CustomEvent.prototype=window.Event.prototype;if(!window.Event||b&&"function"!==typeof window.Event){var c=window.Event;window.Event=function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles,!!b.cancelable);return c};if(c)for(var d in c)window.Event[d]=c[d];window.Event.prototype=c.prototype}if(!window.MouseEvent||b&&"function"!==typeof window.MouseEvent){b=
-window.MouseEvent;window.MouseEvent=function(a,b){b=b||{};var c=document.createEvent("MouseEvent");c.initMouseEvent(a,!!b.bubbles,!!b.cancelable,b.view||window,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);return c};if(b)for(d in b)window.MouseEvent[d]=b[d];window.MouseEvent.prototype=b.prototype}Array.from||(Array.from=function(a){return[].slice.call(a)});Object.assign||(Object.assign=function(a,b){for(var c=[].slice.call(arguments,
-1),d=0,e;d<c.length;d++)if(e=c[d])for(var f=a,k=e,l=Object.getOwnPropertyNames(k),m=0;m<l.length;m++)e=l[m],f[e]=k[e];return a})})(window.WebComponents);(function(){function a(){}var b="undefined"===typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var a=Document.prototype.importNode;Document.prototype.importNode=function(){var b=a.apply(this,arguments);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=this.createDocumentFragment();c.appendChild(b);return c}return b}}();
-var c=Node.prototype.cloneNode,d=Document.prototype.createElement,e=Document.prototype.importNode,f=function(){if(!b){var a=document.createElement("template"),c=document.createElement("template");c.content.appendChild(document.createElement("div"));a.content.appendChild(c);a=a.cloneNode(!0);return 0===a.content.childNodes.length||0===a.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(b){var g=function(a){switch(a){case "&":return"&amp;";
-case "<":return"&lt;";case ">":return"&gt;";case "\u00a0":return"&nbsp;"}},h=function(b){Object.defineProperty(b,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=b.nextSibling)a+=b.outerHTML||b.data.replace(t,g);return a},set:function(b){k.body.innerHTML=b;for(a.b(k);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;k.body.firstChild;)this.content.appendChild(k.body.firstChild)},configurable:!0})},k=document.implementation.createHTMLDocument("template"),
-l=!0,m=document.createElement("style");m.textContent="template{display:none;}";var p=document.head;p.insertBefore(m,p.firstElementChild);a.prototype=Object.create(HTMLElement.prototype);var r=!document.createElement("div").hasOwnProperty("innerHTML");a.O=function(b){if(!b.content){b.content=k.createDocumentFragment();for(var c;c=b.firstChild;)b.content.appendChild(c);if(r)b.__proto__=a.prototype;else if(b.cloneNode=function(b){return a.a(this,b)},l)try{h(b)}catch(y){l=!1}a.b(b.content)}};h(a.prototype);
-a.b=function(b){b=b.querySelectorAll("template");for(var c=0,d=b.length,e;c<d&&(e=b[c]);c++)a.O(e)};document.addEventListener("DOMContentLoaded",function(){a.b(document)});Document.prototype.createElement=function(){var b=d.apply(this,arguments);"template"===b.localName&&a.O(b);return b};var t=/[&\u00A0<>]/g}if(b||f)a.a=function(a,b){var d=c.call(a,!1);this.O&&this.O(d);b&&(d.content.appendChild(c.call(a.content,!0)),this.ra(d.content,a.content));return d},a.prototype.cloneNode=function(b){return a.a(this,
-b)},a.ra=function(a,b){if(b.querySelectorAll){b=b.querySelectorAll("template");a=a.querySelectorAll("template");for(var c=0,d=a.length,e,f;c<d;c++)f=b[c],e=a[c],this.O&&this.O(f),e.parentNode.replaceChild(f.cloneNode(!0),e)}},Node.prototype.cloneNode=function(b){if(this instanceof DocumentFragment)if(b)var d=this.ownerDocument.importNode(this,!0);else return this.ownerDocument.createDocumentFragment();else d=c.call(this,b);b&&a.ra(d,this);return d},Document.prototype.importNode=function(b,c){if("template"===
-b.localName)return a.a(b,c);var d=e.call(this,b,c);c&&a.ra(d,b);return d},f&&(window.HTMLTemplateElement.prototype.cloneNode=function(b){return a.a(this,b)});b&&(window.HTMLTemplateElement=a)})();!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.Eb?define(b):a.ES6Promise=b()}(window,function(){function a(a,b){E[x]=a;E[x+1]=b;x+=2;2===x&&(H?H(g):O())}function b(){return function(){return process.Hb(g)}}function c(){return"undefined"!=
-typeof C?function(){C(g)}:f()}function d(){var a=0,b=new L(g),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function e(){var a=new MessageChannel;return a.port1.onmessage=g,function(){return a.port2.postMessage(0)}}function f(){var a=setTimeout;return function(){return a(g,1)}}function g(){for(var a=0;a<x;a+=2)(0,E[a])(E[a+1]),E[a]=void 0,E[a+1]=void 0;x=0}function h(){try{var a=require("vertx");return C=a.Jb||a.Ib,c()}catch(Hc){return f()}}function k(b,
-c){var d=arguments,e=this,f=new this.constructor(m);void 0===f[M]&&Ic(f);var g=e.o;return g?!function(){var b=d[g-1];a(function(){return Jc(g,f,b,e.m)})}():u(e,f,b,c),f}function l(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=new this(m);return y(b,a),b}function m(){}function p(a){try{return a.then}catch(Hc){return N.error=Hc,N}}function r(a,b,c,d){try{a.call(b,c,d)}catch(Od){return Od}}function t(b,c,d){a(function(a){var b=!1,e=r(d,c,function(d){b||(b=!0,c!==d?y(a,d):q(a,d))},
-function(c){b||(b=!0,z(a,c))});!b&&e&&(b=!0,z(a,e))},b)}function v(a,b){b.o===K?q(a,b.m):b.o===J?z(a,b.m):u(b,void 0,function(b){return y(a,b)},function(b){return z(a,b)})}function w(a,b,c){b.constructor===a.constructor&&c===k&&b.constructor.resolve===l?v(a,b):c===N?(z(a,N.error),N.error=null):void 0===c?q(a,b):"function"==typeof c?t(a,b,c):q(a,b)}function y(a,b){if(a===b)z(a,new TypeError("You cannot resolve a promise with itself"));else{var c=typeof b;null===b||"object"!==c&&"function"!==c?q(a,
-b):w(a,b,p(b))}}function B(a){a.Ca&&a.Ca(a.m);X(a)}function q(b,c){b.o===I&&(b.m=c,b.o=K,0!==b.T.length&&a(X,b))}function z(b,c){b.o===I&&(b.o=J,b.m=c,a(B,b))}function u(b,c,d,e){var f=b.T,g=f.length;b.Ca=null;f[g]=c;f[g+K]=d;f[g+J]=e;0===g&&b.o&&a(X,b)}function X(a){var b=a.T,c=a.o;if(0!==b.length){for(var d,e,f=a.m,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?Jc(c,d,e,f):e(f);a.T.length=0}}function Kc(){this.error=null}function Jc(a,b,c,d){var e="function"==typeof c,f=void 0,g=void 0,h=void 0,X=void 0;
-if(e){try{var k=c(d)}catch(Pd){k=(P.error=Pd,P)}if(f=k,f===P?(X=!0,g=f.error,f.error=null):h=!0,b===f)return void z(b,new TypeError("A promises callback cannot return that same promise."))}else f=d,h=!0;b.o!==I||(e&&h?y(b,f):X?z(b,g):a===K?q(b,f):a===J&&z(b,f))}function Lc(a,b){try{b(function(b){y(a,b)},function(b){z(a,b)})}catch(Md){z(a,Md)}}function Ic(a){a[M]=Q++;a.o=void 0;a.m=void 0;a.T=[]}function da(a,b){this.eb=a;this.J=new a(m);this.J[M]||Ic(this.J);F(b)?(this.length=b.length,this.$=b.length,
-this.m=Array(this.length),0===this.length?q(this.J,this.m):(this.length=this.length||0,this.cb(b),0===this.$&&q(this.J,this.m))):z(this.J,Error("Array Methods must be provided an Array"))}function D(a){this[M]=Q++;this.m=this.o=void 0;this.T=[];if(m!==a){if("function"!=typeof a)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof D)Lc(this,a);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
-}}var A=void 0,F=A=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},x=0,C=void 0,H=void 0,G=(A="undefined"!=typeof window?window:void 0)||{},L=G.MutationObserver||G.WebKitMutationObserver;G="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;var E=Array(1E3),O=void 0;O="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?b():L?d():G?e():A||"function"!=
-typeof require?f():h();var M=Math.random().toString(36).substring(16),I=void 0,K=1,J=2,N=new Kc,P=new Kc,Q=0;return da.prototype.cb=function(a){for(var b=0;this.o===I&&b<a.length;b++)this.bb(a[b],b)},da.prototype.bb=function(a,b){var c=this.eb,d=c.resolve;d===l?(d=p(a),d===k&&a.o!==I?this.oa(a.o,b,a.m):"function"!=typeof d?(this.$--,this.m[b]=a):c===D?(c=new c(m),w(c,a,d),this.pa(c,b)):this.pa(new c(function(b){return b(a)}),b)):this.pa(d(a),b)},da.prototype.oa=function(a,b,c){var d=this.J;d.o===
-I&&(this.$--,a===J?z(d,c):this.m[b]=c);0===this.$&&q(d,this.m)},da.prototype.pa=function(a,b){var c=this;u(a,void 0,function(a){return c.oa(K,b,a)},function(a){return c.oa(J,b,a)})},D.g=function(a){return(new da(this,a)).J},D.h=function(a){var b=this;return new b(F(a)?function(c,d){for(var e=a.length,f=0;f<e;f++)b.resolve(a[f]).then(c,d)}:function(a,b){return b(new TypeError("You must pass an array to race."))})},D.resolve=l,D.i=function(a){var b=new this(m);return z(b,a),b},D.f=function(a){H=a},
-D.c=function(b){a=b},D.b=a,D.prototype={constructor:D,then:k,"catch":function(a){return this.then(null,a)}},D.a=function(){var a=void 0;if("undefined"!=typeof global)a=global;else if("undefined"!=typeof self)a=self;else try{a=Function("return this")()}catch(Nd){throw Error("polyfill failed because global object is unavailable in this environment");}var b=a.Promise;if(b){var c=null;try{c=Object.prototype.toString.call(b.resolve())}catch(Nd){}if("[object Promise]"===c&&!b.Fb)return}a.Promise=D},D.Promise=
-D,D.a(),D});(function(a){function b(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function c(a){if(m)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!h(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=document.querySelectorAll("link[rel=import]:not(import-dependency)"),
-c=b.length;c?l(b,function(b){return g(b,function(){--c||a()})}):a()}function e(a){function b(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function f(a){e(function(){return d(function(){return a&&a()})})}function g(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var c=function(d){a.removeEventListener(d.type,
-c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);v&&"style"===a.localName||a.addEventListener("error",c)}}function h(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function k(){var a=this;this.a={};this.b=0;this.f=new MutationObserver(function(b){return a.l(b)});this.f.observe(document.head,{childList:!0,subtree:!0});this.c(document)}function l(a,b,c){var d=a?a.length:0,e=c?-1:1;for(c=c?d-1:0;c<d&&0<=c;c+=e)b(a[c],c)}var m="import"in document.createElement("link"),
-p=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return p||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var q=/(^\/)|(^#)|(^[\w-\d]*:)/,r=/(url\()([^)]*)(\))/g,t=/(@import[\s]+(?!url\())([^;]*)(;)/g,x=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,y={nb:function(a,b){a.href&&a.setAttribute("href",y.ua(a.getAttribute("href"),b));a.src&&a.setAttribute("src",y.ua(a.getAttribute("src"),b));
-if("style"===a.localName){var c=y.Ma(a.textContent,b,r);a.textContent=y.Ma(c,b,t)}},Ma:function(a,b,c){return a.replace(c,function(a,c,d,e){a=d.replace(/["']/g,"");b&&(a=y.Na(a,b));return c+"'"+a+"'"+e})},ua:function(a,b){return a&&q.test(a)?a:y.Na(a,b)},Na:function(a,b){if(void 0===y.ma){y.ma=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";y.ma="http://a/c%20d"===c.href}catch(Lc){}}if(y.ma)return(new URL(a,b)).href;c=y.Za;c||(c=document.implementation.createHTMLDocument("temp"),y.Za=c,c.xa=
-c.createElement("base"),c.head.appendChild(c.xa),c.wa=c.createElement("a"));c.xa.href=b;c.wa.href=a;return c.wa.href||a}},w={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a=a.split(",");var d=a[1];d=-1<a[0].indexOf(";base64")?atob(d):decodeURIComponent(d);b(d)}else{var e=new XMLHttpRequest;e.open("GET",a,w.async);e.onload=function(){var a=e.responseURL||e.getResponseHeader("Location");a&&!a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var d=e.response||e.responseText;
-304===e.status||!e.status||200<=e.status&&300>e.status?b(d,a):c(d)};e.send()}else c("error: href must be specified")}},v=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);k.prototype.c=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");l(a,function(a){return b.h(a)})};k.prototype.h=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=this.a[c];d&&d.__loaded&&(a.import=d,this.g(a))}else this.b++,this.a[c]="pending",w.load(c,function(a,d){a=b.s(a,d||c);
-b.a[c]=a;b.b--;b.c(a);b.i()},function(){b.a[c]=null;b.b--;b.i()})};k.prototype.s=function(a,b){if(!a)return document.createDocumentFragment();v&&(a=a.replace(x,function(a,b,c){return-1===a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content;else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=y.ua(c.getAttribute("href"),b),c.removeAttribute("href");c=a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\n    script:not([type]), script[type="application/javascript"],\n    script[type="text/javascript"]');
-var d=0;l(c,function(a){g(a);y.nb(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};k.prototype.i=function(){var a=this;if(!this.b){this.f.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.c(document),a.b||(a.f.observe(document.head,{childList:!0,subtree:!0}),a.j()))};
-this.v(function(){c=!0;d()});this.u(function(){b=!0;d()})}};k.prototype.flatten=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");l(a,function(a){var c=b.a[a.href];(a.import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(c),a.appendChild(c))})};k.prototype.u=function(a){function b(e){if(e<d){var f=c[e],h=document.createElement("script");f.removeAttribute("import-dependency");l(f.attributes,function(a){return h.setAttribute(a.name,
-a.value)});p=h;f.parentNode.replaceChild(h,f);g(h,function(){p=null;b(e+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};k.prototype.v=function(a){var b=document.querySelectorAll("style[import-dependency],\n    link[rel=stylesheet][import-dependency]"),d=b.length;if(d){var e=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");l(b,function(b){g(b,function(){b.removeAttribute("import-dependency");--d||a()});if(e&&b.parentNode!==document.head){var f=
-document.createElement(b.localName);f.__appliedElement=b;f.setAttribute("type","import-placeholder");b.parentNode.insertBefore(f,b.nextSibling);for(f=c(b);f&&c(f);)f=c(f);f.parentNode!==document.head&&(f=null);document.head.insertBefore(b,f);b.removeAttribute("type")}})}else a()};k.prototype.j=function(){var a=this,b=document.querySelectorAll("link[rel=import]");l(b,function(b){return a.g(b)},!0)};k.prototype.g=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState="complete"),a.dispatchEvent(b(a.import?
-"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))};k.prototype.l=function(a){var b=this;l(a,function(a){return l(a.addedNodes,function(a){a&&a.nodeType===Node.ELEMENT_NODE&&(h(a)?b.h(a):b.c(a))})})};if(m){var z=document.querySelectorAll("link[rel=import]");l(z,function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});z=function(a){a=a.target;h(a)&&(a.__loaded=!0)};document.addEventListener("load",z,!0);document.addEventListener("error",z,!0)}else{var u=Object.getOwnPropertyDescriptor(Node.prototype,
-"baseURI");Object.defineProperty((!u||u.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=h(this)?this:c(this);return a?a.href:u&&u.get?u.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});e(function(){return new k})}f(function(){return document.dispatchEvent(b("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});a.useNative=m;a.whenReady=f;a.importForElement=c})(window.HTMLImports=window.HTMLImports||{});(function(){window.WebComponents=
-window.WebComponents||{flags:{}};var a=document.querySelector('script[src*="webcomponents-lite.js"]'),b=/wc-(.+)/,c={};if(!c.noOpts){location.search.slice(1).split("&").forEach(function(a){a=a.split("=");var d;a[0]&&(d=a[0].match(b))&&(c[d[1]]=a[1]||!0)});if(a)for(var d=0,e;e=a.attributes[d];d++)"src"!==e.name&&(c[e.name]=e.value||!0);c.log&&c.log.split?(a=c.log.split(","),c.log={},a.forEach(function(a){c.log[a]=!0})):c.log={}}window.WebComponents.flags=c;if(a=c.shadydom)window.ShadyDOM=window.ShadyDOM||
-{},window.ShadyDOM.force=a;(a=c.register||c.ce)&&window.customElements&&(window.customElements.forcePolyfill=a)})();var C=window.ShadyDOM||{};C.ob=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var eb=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");C.V=!!(eb&&eb.configurable&&eb.get);C.Ia=C.force||!C.ob;var Y=Element.prototype,Mc=Y.matches||Y.matchesSelector||Y.mozMatchesSelector||Y.msMatchesSelector||Y.oMatchesSelector||Y.webkitMatchesSelector,Ma=document.createTextNode(""),
-Hb=0,La=[];(new MutationObserver(function(){for(;La.length;)try{La.shift()()}catch(a){throw Ma.textContent=Hb++,a;}})).observe(Ma,{characterData:!0});var aa=[],Na;na.list=aa;ma.prototype.wb=function(){var a=this;this.a||(this.a=!0,Gb(function(){a.b()}))};ma.prototype.b=function(){if(this.a){this.a=!1;var a=this.takeRecords();a.length&&this.ba.forEach(function(b){b(a)})}};ma.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];
-this.addedNodes=[];this.removedNodes=[];return a}return[]};var Yb=Element.prototype.appendChild,Ua=Element.prototype.insertBefore,ba=Element.prototype.removeChild,fc=Element.prototype.setAttribute,Nc=Element.prototype.removeAttribute,fb=Element.prototype.cloneNode,Va=Document.prototype.importNode,nc=Element.prototype.addEventListener,qc=Element.prototype.removeEventListener,mc=Window.prototype.addEventListener,pc=Window.prototype.removeEventListener,gb=Element.prototype.dispatchEvent,Qd=Object.freeze({appendChild:Yb,
-insertBefore:Ua,removeChild:ba,setAttribute:fc,removeAttribute:Nc,cloneNode:fb,importNode:Va,addEventListener:nc,removeEventListener:qc,Kb:mc,Lb:pc,dispatchEvent:gb,querySelector:Element.prototype.querySelector,querySelectorAll:Element.prototype.querySelectorAll}),td=/[&\u00A0"]/g,wd=/[&\u00A0<>]/g,ud=Kb("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),vd=Kb("style script xmp iframe noembed noframes plaintext noscript".split(" ")),F=document.createTreeWalker(document,
-NodeFilter.SHOW_ALL,null,!1),x=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Rd=Object.freeze({parentNode:U,firstChild:Ha,lastChild:Ia,previousSibling:Lb,nextSibling:Mb,childNodes:S,parentElement:Nb,firstElementChild:Ob,lastElementChild:Pb,previousElementSibling:Qb,nextElementSibling:Rb,children:Sb,innerHTML:Tb,textContent:Ub}),hb=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),ta=document.implementation.createHTMLDocument("inert").createElement("div"),
-ib=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),Vb={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:Nb(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode;return void 0!==a?a:U(this)},configurable:!0},nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:Mb(this)},configurable:!0},previousSibling:{get:function(){var a=
-this.__shady&&this.__shady.previousSibling;return void 0!==a?a:Lb(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return Rb(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var a=
-this.previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return Qb(this)},configurable:!0}},Pa={childNodes:{get:function(){if(T(this)){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}var b=this.__shady.childNodes}else b=S(this);b.item=function(a){return b[a]};return b},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=
-this.__shady&&this.__shady.firstChild;return void 0!==a?a:Ha(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:Ia(this)},configurable:!0},textContent:{get:function(){if(T(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return Ub(this)},set:function(a){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);
-this.appendChild(document.createTextNode(a));break;default:this.nodeValue=a}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return Ob(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var a=this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return Pb(this)},configurable:!0},
-children:{get:function(){var a;T(this)?a=Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}):a=Sb(this);a.item=function(b){return a[b]};return a},configurable:!0},innerHTML:{get:function(){var a="template"===this.localName?this.content:this;return T(this)?Oa(a):Tb(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild);for(hb&&hb.set?hb.set.call(ta,a):ta.innerHTML=a;ta.firstChild;)b.appendChild(ta.firstChild)},
-configurable:!0}},Oc={shadowRoot:{get:function(){return this.__shady&&this.__shady.tb||null},configurable:!0}},Qa={activeElement:{get:function(){var a=ib&&ib.get?ib.get.call(document):C.V?void 0:document.activeElement;if(a&&a.nodeType){var b=!!L(this);if(this===document||b&&this.host!==a&&this.host.contains(a)){for(b=Z(a);b&&b!==this;)a=b.host,b=Z(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}},Fb=C.V?function(){}:function(a){a.__shady&&
-a.__shady.Xa||(a.__shady=a.__shady||{},a.__shady.Xa=!0,M(a,Vb,!0))},Eb=C.V?function(){}:function(a){a.__shady&&a.__shady.Va||(a.__shady=a.__shady||{},a.__shady.Va=!0,M(a,Pa,!0),M(a,Oc,!0))},pa=null,Sd={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,
-touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},rc={get composed(){!1!==this.isTrusted&&void 0===this.ja&&(this.ja=Sd[this.type]);return this.ja||!1},composedPath:function(){this.ya||(this.ya=Wa(this.__target,this.composed));return this.ya},
-get target(){return hc(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.za)return null;this.Aa||(this.Aa=Wa(this.za,!0));return hc(this.currentTarget,this.Aa)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.ka=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.ka=this.Ua=!0}},Ya={focus:!0,blur:!0},Td=Xa(window.Event),Ud=Xa(window.CustomEvent),Vd=Xa(window.MouseEvent),Db={};l.prototype=Object.create(DocumentFragment.prototype);
-l.prototype.D=function(a,b){this.Wa="ShadyRoot";la(a);la(this);this.host=a;this.L=b&&b.mode;a.__shady=a.__shady||{};a.__shady.root=this;a.__shady.tb="closed"!==this.L?this:null;this.S=!1;this.b=[];this.a=null;b=S(a);for(var c=0,d=b.length;c<d;c++)ba.call(a,b[c])};l.prototype.M=function(){var a=this;this.S||(this.S=!0,Ib(function(){return a.Ea()}))};l.prototype.C=function(){for(var a=this,b=this;b;)b.S&&(a=b),b=b.hb();return a};l.prototype.hb=function(){var a=this.host.getRootNode();if(L(a))for(var b=
-this.host.childNodes,c=0,d;c<b.length;c++)if(d=b[c],this.h(d))return a};l.prototype.Ea=function(){this.S&&this.C()._renderRoot()};l.prototype._renderRoot=function(){this.S=!1;this.v();this.s()};l.prototype.v=function(){for(var a=0,b;a<this.b.length;a++)b=this.b[a],this.l(b);for(b=this.host.firstChild;b;b=b.nextSibling)this.f(b);for(a=0;a<this.b.length;a++){b=this.b[a];if(!b.__shady.assignedNodes.length)for(var c=b.firstChild;c;c=c.nextSibling)this.f(c,b);c=b.parentNode;(c=c.__shady&&c.__shady.root)&&
-c.Ba()&&c._renderRoot();this.c(b.__shady.U,b.__shady.assignedNodes);if(c=b.__shady.Da){for(var d=0;d<c.length;d++)c[d].__shady.na=null;b.__shady.Da=null;c.length>b.__shady.assignedNodes.length&&(b.__shady.qa=!0)}b.__shady.qa&&(b.__shady.qa=!1,this.g(b))}};l.prototype.f=function(a,b){a.__shady=a.__shady||{};var c=a.__shady.na;a.__shady.na=null;b||(b=(b=this.a[a.slot||"__catchall"])&&b[0]);b?(b.__shady.assignedNodes.push(a),a.__shady.assignedSlot=b):a.__shady.assignedSlot=void 0;c!==a.__shady.assignedSlot&&
-a.__shady.assignedSlot&&(a.__shady.assignedSlot.__shady.qa=!0)};l.prototype.l=function(a){var b=a.__shady.assignedNodes;a.__shady.assignedNodes=[];a.__shady.U=[];if(a.__shady.Da=b)for(var c=0;c<b.length;c++){var d=b[c];d.__shady.na=d.__shady.assignedSlot;d.__shady.assignedSlot===a&&(d.__shady.assignedSlot=null)}};l.prototype.c=function(a,b){for(var c=0,d;c<b.length&&(d=b[c]);c++)"slot"==d.localName?this.c(a,d.__shady.assignedNodes):a.push(b[c])};l.prototype.g=function(a){gb.call(a,new Event("slotchange"));
-a.__shady.assignedSlot&&this.g(a.__shady.assignedSlot)};l.prototype.s=function(){for(var a=this.b,b=[],c=0;c<a.length;c++){var d=a[c].parentNode;d.__shady&&d.__shady.root||!(0>b.indexOf(d))||b.push(d)}for(a=0;a<b.length;a++)c=b[a],this.I(c===this?this.host:c,this.u(c))};l.prototype.u=function(a){var b=[];a=a.childNodes;for(var c=0;c<a.length;c++){var d=a[c];if(this.h(d)){d=d.__shady.U;for(var e=0;e<d.length;e++)b.push(d[e])}else b.push(d)}return b};l.prototype.h=function(a){return"slot"==a.localName};
-l.prototype.I=function(a,b){for(var c=S(a),d=zd(b,b.length,c,c.length),e=0,f=0,g;e<d.length&&(g=d[e]);e++){for(var h=0,k;h<g.X.length&&(k=g.X[h]);h++)U(k)===a&&ba.call(a,k),c.splice(g.index+f,1);f-=g.aa}for(e=0;e<d.length&&(g=d[e]);e++)for(f=c[g.index],h=g.index;h<g.index+g.aa;h++)k=b[h],Ua.call(a,k,f),c.splice(h,0,k)};l.prototype.$a=function(a){this.a=this.a||{};this.b=this.b||[];for(var b=0;b<a.length;b++){var c=a[b];c.__shady=c.__shady||{};la(c);la(c.parentNode);var d=this.i(c);if(this.a[d]){var e=
-e||{};e[d]=!0;this.a[d].push(c)}else this.a[d]=[c];this.b.push(c)}if(e)for(var f in e)this.a[f]=this.j(this.a[f])};l.prototype.i=function(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Ya=b};l.prototype.j=function(a){return a.sort(function(a,c){a=sc(a);for(var b=sc(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.parentNode.childNodes),a.indexOf(c)-a.indexOf(f)}})};l.prototype.gb=function(a){this.a=this.a||{};this.b=this.b||[];var b=this.a,c;for(c in b)for(var d=
-b[c],e=0;e<d.length;e++){var f=d[e],g;a:{for(g=f;g;){if(g==a){g=!0;break a}g=g.parentNode}g=void 0}if(g){d.splice(e,1);var h=this.b.indexOf(f);0<=h&&this.b.splice(h,1);e--;this.H(f);h=!0}}return h};l.prototype.ib=function(a){var b=a.Ya,c=this.i(a);if(c!==b){b=this.a[b];var d=b.indexOf(a);0<=d&&b.splice(d,1);b=this.a[c]||(this.a[c]=[]);b.push(a);1<b.length&&(this.a[c]=this.j(b))}};l.prototype.H=function(a){if(a=a.__shady.U)for(var b=0;b<a.length;b++){var c=a[b],d=U(c);d&&ba.call(d,c)}};l.prototype.Ba=
-function(){return!!this.b.length};l.prototype.addEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.la=this;this.host.addEventListener(a,b,c)};l.prototype.removeEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.la=this;this.host.removeEventListener(a,b,c)};l.prototype.getElementById=function(a){return oa(this,function(b){return b.id==a},function(a){return!!a})[0]||null};(function(a){M(a,Pa,!0);M(a,Qa,!0)})(l.prototype);var Dd={addEventListener:kc.bind(window),
-removeEventListener:oc.bind(window)},Cd={addEventListener:kc,removeEventListener:oc,appendChild:function(a){return Ra(this,a)},insertBefore:function(a,b){return Ra(this,a,b)},removeChild:function(a){return Sa(this,a)},replaceChild:function(a,b){Ra(this,a,b);Sa(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=fb.call(this,a);else if(b=fb.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0),b.appendChild(d)}return b},getRootNode:function(){return bc(this)},
-get isConnected(){var a=this.ownerDocument;if(a&&a.contains&&a.contains(this)||(a=a.documentElement)&&a.contains&&a.contains(this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof l?a.host:void 0);return!!(a&&a instanceof Document)},dispatchEvent:function(a){na();return gb.call(this,a)}},Ed={get assignedSlot(){return tc(this)}},Za={querySelector:function(a){return oa(this,function(b){return Mc.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a){return oa(this,
-function(b){return Mc.call(b,a)})}},wc={assignedNodes:function(a){if("slot"===this.localName)return dc(this),this.__shady?(a&&a.flatten?this.__shady.U:this.__shady.assignedNodes)||[]:[]}},uc=Ka({setAttribute:function(a,b){ec(this,a,b)},removeAttribute:function(a){Nc.call(this,a);ac(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";if(!a)throw"Not enough arguments.";return new l(Db,this,a)},get slot(){return this.getAttribute("slot")},set slot(a){ec(this,"slot",a)},get assignedSlot(){return tc(this)}},
-Za,wc);Object.defineProperties(uc,Oc);var vc=Ka({importNode:function(a,b){return gc(a,b)},getElementById:function(a){return oa(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},Za);Object.defineProperties(vc,{_activeElement:Qa.activeElement});var Wd=HTMLElement.prototype.blur,Fd=Ka({blur:function(){var a=this.__shady&&this.__shady.root;(a=a&&a.activeElement)?a.blur():Wd.call(this)}});C.Ia&&(window.ShadyDOM={inUse:C.Ia,patch:function(a){return a},isShadyRoot:L,enqueue:Ib,flush:na,
-settings:C,filterMutations:sd,observeChildren:qd,unobserveChildren:pd,nativeMethods:Qd,nativeTree:Rd},window.Event=Td,window.CustomEvent=Ud,window.MouseEvent=Vd,yd(),Bd(),window.ShadowRoot=l);var Gd=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));A.prototype.D=function(a,b){this.s.set(a,b);this.l.set(b.constructor,b)};A.prototype.f=function(a){return this.s.get(a)};A.prototype.C=function(a){return this.l.get(a)};
-A.prototype.u=function(a){this.h=!0;this.i.push(a)};A.prototype.j=function(a){var b=this;this.h&&J(a,function(a){return b.g(a)})};A.prototype.g=function(a){if(this.h&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this.i.length;b++)this.i[b](a)}};A.prototype.b=function(a){var b=[];J(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var c=b[a];1===c.__CE_state?this.connectedCallback(c):this.v(c)}};A.prototype.a=function(a){var b=[];J(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var c=
-b[a];1===c.__CE_state&&this.disconnectedCallback(c)}};A.prototype.c=function(a,b){var c=this;b=b?b:new Set;var d=[];J(a,function(a){if("link"===a.localName&&"import"===a.getAttribute("rel")){var e=a.import;e instanceof Node&&"complete"===e.readyState?(e.__CE_isImportDocument=!0,e.__CE_hasRegistry=!0):a.addEventListener("load",function(){var d=a.import;d.__CE_documentLoadHandled||(d.__CE_documentLoadHandled=!0,d.__CE_isImportDocument=!0,d.__CE_hasRegistry=!0,b.delete(d),c.c(d,b))})}else d.push(a)},
-b);if(this.h)for(a=0;a<d.length;a++)this.g(d[a]);for(a=0;a<d.length;a++)this.v(d[a])};A.prototype.v=function(a){if(void 0===a.__CE_state){var b=this.f(a.localName);if(b){b.constructionStack.push(a);var c=b.constructor;try{try{if(new c!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{b.constructionStack.pop()}}catch(f){throw a.__CE_state=2,f;}a.__CE_state=1;a.__CE_definition=b;if(b.attributeChangedCallback)for(b=b.observedAttributes,c=0;c<b.length;c++){var d=
-b[c],e=a.getAttribute(d);null!==e&&this.attributeChangedCallback(a,d,null,e,null)}m(a)&&this.connectedCallback(a)}}};A.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};A.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};A.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&
-f.attributeChangedCallback.call(a,b,c,d,e)};Ga.prototype.c=function(){this.N&&this.N.disconnect()};Ga.prototype.f=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||this.c();for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)this.b.c(c[d])};Cb.prototype.resolve=function(a){if(this.a)throw Error("Already resolved.");this.a=a;this.b&&this.b(a)};B.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");
-if(!xc(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.a.f(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");
-var f=d("connectedCallback");var g=d("disconnectedCallback");var h=d("adoptedCallback");var k=d("attributeChangedCallback");var l=b.observedAttributes||[]}catch(le){return}finally{this.f=!1}this.a.D(a,{localName:a,constructor:b,connectedCallback:f,disconnectedCallback:g,adoptedCallback:h,attributeChangedCallback:k,observedAttributes:l,constructionStack:[]});this.c.push(a);this.b||(this.b=!0,this.g(function(){return c.j()}))};B.prototype.j=function(){if(!1!==this.b)for(this.b=!1,this.a.c(document);0<
-this.c.length;){var a=this.c.shift();(a=this.h.get(a))&&a.resolve(void 0)}};B.prototype.get=function(a){if(a=this.a.f(a))return a.constructor};B.prototype.whenDefined=function(a){if(!xc(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.h.get(a);if(b)return b.c;b=new Cb;this.h.set(a,b);this.a.f(a)&&-1===this.c.indexOf(a)&&b.resolve(void 0);return b.c};B.prototype.l=function(a){this.i.c();var b=this.g;this.g=function(c){return a(function(){return b(c)})}};
-window.CustomElementRegistry=B;B.prototype.define=B.prototype.define;B.prototype.get=B.prototype.get;B.prototype.whenDefined=B.prototype.whenDefined;B.prototype.polyfillWrapFlushCallback=B.prototype.l;var Ca=window.Document.prototype.createElement,kd=window.Document.prototype.createElementNS,jd=window.Document.prototype.importNode,ld=window.Document.prototype.prepend,md=window.Document.prototype.append,rb=window.Node.prototype.cloneNode,ja=window.Node.prototype.appendChild,zb=window.Node.prototype.insertBefore,
-Da=window.Node.prototype.removeChild,Ab=window.Node.prototype.replaceChild,Fa=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),qb=window.Element.prototype.attachShadow,Aa=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Ea=window.Element.prototype.getAttribute,sb=window.Element.prototype.setAttribute,ub=window.Element.prototype.removeAttribute,ka=window.Element.prototype.getAttributeNS,tb=window.Element.prototype.setAttributeNS,vb=window.Element.prototype.removeAttributeNS,
-xb=window.Element.prototype.insertAdjacentElement,ad=window.Element.prototype.prepend,bd=window.Element.prototype.append,dd=window.Element.prototype.before,ed=window.Element.prototype.after,fd=window.Element.prototype.replaceWith,gd=window.Element.prototype.remove,od=window.HTMLElement,Ba=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),wb=window.HTMLElement.prototype.insertAdjacentElement,Bb=new function(){},ua=window.customElements;if(!ua||ua.forcePolyfill||"function"!=
-typeof ua.define||"function"!=typeof ua.get){var ea=new A;nd(ea);id(ea);hd(ea);$c(ea);document.__CE_hasRegistry=!0;var Xd=new B(ea);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:Xd})}var O={STYLE_RULE:1,ia:7,MEDIA_RULE:4,va:1E3},G={mb:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,Fa:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Ja:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,sb:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,yb:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,
-rb:/^@[^\s]*keyframes/,Ka:/\s+/g},w=!(window.ShadyDOM&&window.ShadyDOM.inUse);if(window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss)var q=window.ShadyCSS.nativeCss;else window.ShadyCSS?(Ac(window.ShadyCSS),window.ShadyCSS=void 0):Ac(window.WebComponents&&window.WebComponents.flags);var va=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,wa=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Yd=/(--[\w-]+)\s*([:,;)]|$)/gi,Zd=/(animation\s*:)|(animation-name\s*:)/,
-Id=/@media\s(.*)/,$d=/\{[^}]*\}/g,P=null;r.prototype.a=function(a,b,c){a.__styleScoped?a.__styleScoped=null:this.i(a,b||"",c)};r.prototype.i=function(a,b,c){a.nodeType===Node.ELEMENT_NODE&&this.v(a,b,c);if(a="template"===a.localName?(a.content||a.Cb).childNodes:a.children||a.childNodes)for(var d=0;d<a.length;d++)this.i(a[d],b,c)};r.prototype.v=function(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var d=
-a.getAttribute(ae);c?d&&(b=d.replace("style-scope","").replace(b,""),ra(a,b)):ra(a,(d?d+" ":"")+"style-scope "+b)}};r.prototype.b=function(a,b,c){var d=a.__cssBuild;w||"shady"===d?b=V(b,c):(a=Q(a),b=this.H(b,a.is,a.Y,c)+"\n\n");return b.trim()};r.prototype.H=function(a,b,c,d){var e=this.f(b,c);b=this.h(b);var f=this;return V(a,function(a){a.c||(f.R(a,b,e),a.c=!0);d&&d(a,b,e)})};r.prototype.h=function(a){return a?be+a:""};r.prototype.f=function(a,b){return b?"[is="+a+"]":a};r.prototype.R=function(a,
-b,c){this.j(a,this.g,b,c)};r.prototype.j=function(a,b,c,d){a.selector=a.A=this.l(a,b,c,d)};r.prototype.l=function(a,b,c,d){var e=a.selector.split(Pc);if(!Bc(a)){a=0;for(var f=e.length,g;a<f&&(g=e[a]);a++)e[a]=b.call(this,g,c,d)}return e.join(Pc)};r.prototype.g=function(a,b,c){var d=this,e=!1;a=a.trim();a=a.replace(ce,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"});a=a.replace(de,jb+" $1");return a=a.replace(ee,function(a,g,h){e||(a=d.C(h,g,b,c),e=e||a.stop,g=a.lb,h=a.value);return g+h})};
-r.prototype.C=function(a,b,c,d){var e=a.indexOf(kb);0<=a.indexOf(jb)?a=this.L(a,d):0!==e&&(a=c?this.s(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(fe,function(a,b){return" > "+b}))}a=a.replace(ge,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,lb:b,stop:f}};r.prototype.s=function(a,b){a=a.split(Qc);a[0]+=b;return a.join(Qc)};r.prototype.L=function(a,b){var c=a.match(Rc);return(c=c&&c[2].trim()||"")?c[0].match(Sc)?a.replace(Rc,function(a,c,f){return b+
-f}):c.split(Sc)[0]===b?c:he:a.replace(jb,b)};r.prototype.I=function(a){a.selector=a.parsedSelector;this.u(a);this.j(a,this.D)};r.prototype.u=function(a){a.selector===ie&&(a.selector="html")};r.prototype.D=function(a){return a.match(kb)?this.g(a,Tc):this.s(a.trim(),Tc)};nb.Object.defineProperties(r.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var ce=/:(nth[-\w]+)\(([^)]+)\)/,Tc=":not(.style-scope)",Pc=",",ee=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Sc=/[[.:#*]/,
-jb=":host",ie=":root",kb="::slotted",de=new RegExp("^("+kb+")"),Rc=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,fe=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ge=/(.*):dir\((?:(ltr|rtl))\)/,be=".",Qc=":",ae="class",he="should_not_match",v=new r;t.get=function(a){return a?a.__styleInfo:null};t.set=function(a,b){return a.__styleInfo=b};t.prototype.c=function(){return this.G};t.prototype._getStyleRules=t.prototype.c;var Uc=function(a){return a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||
-a.oMatchesSelector||a.webkitMatchesSelector}(window.Element.prototype),je=navigator.userAgent.match("Trident");p.prototype.R=function(a){var b=this,c={},d=[],e=0;W(a,function(a){b.c(a);a.index=e++;b.I(a.w.cssText,c)},function(a){d.push(a)});a.b=d;a=[];for(var f in c)a.push(f);return a};p.prototype.c=function(a){if(!a.w){var b={},c={};this.b(a,c)&&(b.F=c,a.rules=null);b.cssText=this.H(a);a.w=b}};p.prototype.b=function(a,b){var c=a.w;if(c){if(c.F)return Object.assign(b,c.F),!0}else{c=a.parsedCssText;
-for(var d;a=va.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}};p.prototype.H=function(a){return this.L(a.parsedCssText)};p.prototype.L=function(a){return a.replace($d,"").replace(va,"")};p.prototype.I=function(a,b){for(var c;c=Yd.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}};p.prototype.fa=function(a){for(var b=Object.getOwnPropertyNames(a),c=0,d;c<b.length;c++)d=b[c],a[d]=this.a(a[d],a)};p.prototype.a=function(a,b){if(a)if(0<=a.indexOf(";"))a=this.f(a,
-b);else{var c=this;a=Dc(a,function(a,e,f,g){if(!e)return a+g;(e=c.a(b[e],b))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=c.a(b[f]||f,b)||f;return a+(e||"")+g})}return a&&a.trim()||""};p.prototype.f=function(a,b){a=a.split(";");for(var c=0,d,e;c<a.length;c++)if(d=a[c]){wa.lastIndex=0;if(e=wa.exec(d))d=this.a(b[e[1]],b);else if(e=d.indexOf(":"),-1!==e){var f=d.substring(e);f=f.trim();f=this.a(f,b)||f;d=d.substring(0,e)+f}a[c]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return a.join(";")};
-p.prototype.D=function(a,b){var c="";a.w||this.c(a);a.w.cssText&&(c=this.f(a.w.cssText,b));a.cssText=c};p.prototype.C=function(a,b){var c=a.cssText,d=a.cssText;null==a.Ha&&(a.Ha=Zd.test(c));if(a.Ha)if(null==a.ca){a.ca=[];for(var e in b)d=b[e],d=d(c),c!==d&&(c=d,a.ca.push(e))}else{for(e=0;e<a.ca.length;++e)d=b[a.ca[e]],c=d(c);d=c}a.cssText=d};p.prototype.ea=function(a,b){var c={},d=this,e=[];W(a,function(a){a.w||d.c(a);var f=a.A||a.parsedSelector;b&&a.w.F&&f&&Uc.call(b,f)&&(d.b(a,c),a=a.index,f=parseInt(a/
-32,10),e[f]=(e[f]||0)|1<<a%32)},null,!0);return{F:c,key:e}};p.prototype.ha=function(a,b,c,d){b.w||this.c(b);if(b.w.F){var e=Q(a);a=e.is;e=e.Y;e=a?v.f(a,e):"html";var f=b.parsedSelector,g=":host > *"===f||"html"===f,h=0===f.indexOf(":host")&&!g;"shady"===c&&(g=f===e+" > *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));"shadow"===c&&(g=":host > *"===f||"html"===f,h=h&&!g);if(g||h)c=e,h&&(w&&!b.A&&(b.A=v.l(b,v.g,v.h(a),e)),c=b.A||e),d({xb:c,qb:h,Gb:g})}};p.prototype.da=function(a,b){var c={},d=
-{},e=this,f=b&&b.__cssBuild;W(b,function(b){e.ha(a,b,f,function(f){Uc.call(a.Db||a,f.xb)&&(f.qb?e.b(b,c):e.b(b,d))})},null,!0);return{vb:d,pb:c}};p.prototype.ga=function(a,b,c){var d=this,e=Q(a),f=v.f(e.is,e.Y),g=new RegExp("(?:^|[^.#[:])"+(a.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");e=t.get(a).G;var h=this.h(e,c);return v.b(a,e,function(a){d.D(a,b);w||Bc(a)||!a.cssText||(d.C(a,h),d.l(a,g,f,c))})};p.prototype.h=function(a,b){a=a.b;var c={};if(!w&&a)for(var d=0,e=a[d];d<a.length;e=a[++d])this.j(e,
-b),c[e.keyframesName]=this.i(e);return c};p.prototype.i=function(a){return function(b){return b.replace(a.f,a.a)}};p.prototype.j=function(a,b){a.f=new RegExp(a.keyframesName,"g");a.a=a.keyframesName+"-"+b;a.A=a.A||a.selector;a.selector=a.A.replace(a.keyframesName,a.a)};p.prototype.l=function(a,b,c,d){a.A=a.A||a.selector;d="."+d;for(var e=a.A.split(","),f=0,g=e.length,h;f<g&&(h=e[f]);f++)e[f]=h.match(b)?h.replace(c,d):d+" "+h;a.selector=e.join(",")};p.prototype.u=function(a,b,c){var d=a.getAttribute("class")||
-"",e=d;c&&(e=d.replace(new RegExp("\\s*x-scope\\s*"+c+"\\s*","g")," "));e+=(e?" ":"")+"x-scope "+b;d!==e&&ra(a,e)};p.prototype.v=function(a,b,c,d){b=d?d.textContent||"":this.ga(a,b,c);var e=t.get(a),f=e.a;f&&!w&&f!==d&&(f._useCount--,0>=f._useCount&&f.parentNode&&f.parentNode.removeChild(f));w?e.a?(e.a.textContent=b,d=e.a):b&&(d=bb(b,c,a.shadowRoot,e.b)):d?d.parentNode||(je&&-1<b.indexOf("@media")&&(d.textContent=b),Cc(d,null,e.b)):b&&(d=bb(b,c,null,e.b));d&&(d._useCount=d._useCount||0,e.a!=d&&d._useCount++,
-e.a=d);return d};p.prototype.s=function(a,b){var c=qa(a),d=this;a.textContent=V(c,function(a){var c=a.cssText=a.parsedCssText;a.w&&a.w.cssText&&(c=c.replace(G.Fa,"").replace(G.Ja,""),a.cssText=d.f(c,b))})};nb.Object.defineProperties(p.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var K=new p,lb={},xa=window.customElements;if(xa&&!w){var ke=xa.define;xa.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,
-(P?P.nextSibling:null)||e.firstChild);P=d;lb[a]=d;return ke.call(xa,a,b,c)}}ha.prototype.a=function(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(a.F[e]!==b[e])return!1}return!0};ha.prototype.b=function(a,b,c,d){var e=this.cache[a]||[];e.push({F:b,styleElement:c,B:d});e.length>this.c&&e.shift();this.cache[a]=e};ha.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d];if(this.a(e,b,c))return e}};if(!w){var Vc=new MutationObserver(Ec),Wc=function(a){Vc.observe(a,
-{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)Wc(document);else{var mb=function(){Wc(document.body)};window.HTMLImports?window.HTMLImports.whenReady(mb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){mb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else mb()})}pb=function(){Ec(Vc.takeRecords())}}var sa={},Ld=Promise.resolve(),cb=null,Gc=window.HTMLImports&&
-window.HTMLImports.whenReady||null,db,ya=null,fa=null;H.prototype.Ga=function(){!this.enqueued&&fa&&(this.enqueued=!0,ob(fa))};H.prototype.b=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),this.Ga())};H.prototype.a=function(a){return a.__shadyCSSCachedStyle?a.__shadyCSSCachedStyle:a.getStyle?a.getStyle():a};H.prototype.c=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var c=a[b];if(!c.__shadyCSSCachedStyle){var d=this.a(c);d&&(d=d.__appliedElement||d,ya&&
-ya(d),c.__shadyCSSCachedStyle=d)}}return a};H.prototype.addCustomStyle=H.prototype.b;H.prototype.getStyleForCustomStyle=H.prototype.a;H.prototype.processStyles=H.prototype.c;Object.defineProperties(H.prototype,{transformCallback:{get:function(){return ya},set:function(a){ya=a}},validateCallback:{get:function(){return fa},set:function(a){var b=!1;fa||(b=!0);fa=a;b&&this.Ga()}}});var Xc=new ha;k.prototype.C=function(){pb()};k.prototype.da=function(a){var b=this.s[a]=(this.s[a]||0)+1;return a+"-"+b};
-k.prototype.Ra=function(a){return qa(a)};k.prototype.Ta=function(a){return V(a)};k.prototype.R=function(a){a=a.content.querySelectorAll("style");for(var b=[],c=0;c<a.length;c++){var d=a[c];b.push(d.textContent);d.parentNode.removeChild(d)}return b.join("").trim()};k.prototype.fa=function(a){return(a=a.content.querySelector("style"))?a.getAttribute("css-build")||"":""};k.prototype.prepareTemplate=function(a,b,c){if(!a.f){a.f=!0;a.name=b;a.extends=c;sa[b]=a;var d=this.fa(a),e=this.R(a);c={is:b,extends:c,
-Ab:d};w||v.a(a.content,b);this.c();var f=wa.test(e)||va.test(e);wa.lastIndex=0;va.lastIndex=0;e=ab(e);f&&q&&this.a&&this.a.transformRules(e,b);a._styleAst=e;a.g=d;d=[];q||(d=K.R(a._styleAst));if(!d.length||q)b=this.ea(c,a._styleAst,w?a.content:null,lb[b]),a.a=b;a.c=d}};k.prototype.ea=function(a,b,c,d){b=v.b(a,b);if(b.length)return bb(b,a.is,c,d)};k.prototype.ha=function(a){var b=Q(a),c=b.is;b=b.Y;var d=lb[c];c=sa[c];if(c){var e=c._styleAst;var f=c.c}return t.set(a,new t(e,d,f,0,b))};k.prototype.H=
-function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Jd)};k.prototype.I=function(){var a=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(b){a.v(b)},this.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.i)&&a.f()})})};k.prototype.c=function(){this.H();this.I()};k.prototype.f=function(){this.c();if(this.b){var a=
-this.b.processStyles();this.b.enqueued&&(q?this.Pa(a):(this.u(this.g,this.h),this.D(a)),this.b.enqueued=!1,this.i&&!q&&this.styleDocument())}};k.prototype.styleElement=function(a,b){var c=Q(a).is,d=t.get(a);d||(d=this.ha(a));this.j(a)||(this.i=!0);b&&(d.P=d.P||{},Object.assign(d.P,b));if(q){if(d.P){b=d.P;for(var e in b)null===e?a.style.removeProperty(e):a.style.setProperty(e,b[e])}if(((e=sa[c])||this.j(a))&&e&&e.a&&!Fc(e)){if(Fc(e)||e._applyShimValidatingVersion!==e._applyShimNextVersion)this.c(),
-this.a&&this.a.transformRules(e._styleAst,c),e.a.textContent=v.b(a,d.G),Kd(e);w&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=v.b(a,d.G));d.G=e._styleAst}}else this.u(a,d),d.sa&&d.sa.length&&this.L(a,d)};k.prototype.l=function(a){return(a=a.getRootNode().host)?t.get(a)?a:this.l(a):this.g};k.prototype.j=function(a){return a===this.g};k.prototype.L=function(a,b){var c=Q(a).is,d=Xc.fetch(c,b.K,b.sa),e=d?d.styleElement:null,f=b.B;b.B=d&&d.B||this.da(c);e=K.v(a,b.K,b.B,e);w||K.u(a,b.B,f);d||
-Xc.b(c,b.K,e,b.B)};k.prototype.u=function(a,b){var c=this.l(a),d=t.get(c);c=Object.create(d.K||null);var e=K.da(a,b.G);a=K.ea(d.G,a).F;Object.assign(c,e.pb,a,e.vb);this.ga(c,b.P);K.fa(c);b.K=c};k.prototype.ga=function(a,b){for(var c in b){var d=b[c];if(d||0===d)a[c]=d}};k.prototype.styleDocument=function(a){this.styleSubtree(this.g,a)};k.prototype.styleSubtree=function(a,b){var c=a.shadowRoot;(c||this.j(a))&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);
-else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};k.prototype.Pa=function(a){for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&this.Oa(c)}};k.prototype.D=function(a){for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&K.s(c,this.h.K)}};k.prototype.v=function(a){var b=this,c=qa(a);W(c,function(a){w?v.u(a):v.I(a);q&&(b.c(),b.a&&b.a.transformRule(a))});q?a.textContent=V(c):this.h.G.rules.push(c)};k.prototype.Oa=function(a){if(q&&
-this.a){var b=qa(a);this.c();this.a.transformRules(b);a.textContent=V(b)}};k.prototype.getComputedStyleValue=function(a,b){var c;q||(c=(t.get(a)||t.get(this.l(a))).K[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};k.prototype.Sa=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d){d=d.split(/\s/);for(var e=0;e<d.length;e++)if(d[e]===v.c){c=d[e+1];break}}}c&&b.push(v.c,c);q||(c=t.get(a))&&c.B&&b.push(K.g,
-c.B);ra(a,b.join(" "))};k.prototype.Qa=function(a){return t.get(a)};k.prototype.flush=k.prototype.C;k.prototype.prepareTemplate=k.prototype.prepareTemplate;k.prototype.styleElement=k.prototype.styleElement;k.prototype.styleDocument=k.prototype.styleDocument;k.prototype.styleSubtree=k.prototype.styleSubtree;k.prototype.getComputedStyleValue=k.prototype.getComputedStyleValue;k.prototype.setElementClass=k.prototype.Sa;k.prototype._styleInfoForNode=k.prototype.Qa;k.prototype.transformCustomStyleForDocument=
-k.prototype.v;k.prototype.getStyleAst=k.prototype.Ra;k.prototype.styleAstToString=k.prototype.Ta;k.prototype.flushCustomStyles=k.prototype.f;Object.defineProperties(k.prototype,{nativeShadow:{get:function(){return w}},nativeCss:{get:function(){return q}}});var E=new k;if(window.ShadyCSS){var Yc=window.ShadyCSS.ApplyShim;var Zc=window.ShadyCSS.CustomStyleInterface}window.ShadyCSS={ScopingShim:E,prepareTemplate:function(a,b,c){E.f();E.prepareTemplate(a,b,c)},styleSubtree:function(a,b){E.f();E.styleSubtree(a,
-b)},styleElement:function(a){E.f();E.styleElement(a)},styleDocument:function(a){E.f();E.styleDocument(a)},getComputedStyleValue:function(a,b){return E.getComputedStyleValue(a,b)},nativeCss:q,nativeShadow:w};Yc&&(window.ShadyCSS.ApplyShim=Yc);Zc&&(window.ShadyCSS.CustomStyleInterface=Zc);(function(){var a=window.customElements,b=window.HTMLImports;window.WebComponents=window.WebComponents||{};if(a&&a.polyfillWrapFlushCallback){var c,d=function(){if(c){var a=c;c=null;a();return!0}},e=b.whenReady;a.polyfillWrapFlushCallback(function(a){c=
-a;e(d)});b.whenReady=function(a){e(function(){d()?b.whenReady(a):a()})}}b.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})})();(function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var b=document.querySelector("head");b.insertBefore(a,b.firstChild)})()})();}).call(this);
+'use strict';var Jb="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;
+(function(){function k(){var a=this;this.s={};this.g=document.documentElement;var b=new Ka;b.rules=[];this.h=t.set(this.g,new t(b));this.i=!1;this.b=this.a=null;Kb(function(){a.c()})}function F(){this.customStyles=[];this.enqueued=!1}function Lb(){}function pa(a){this.cache={};this.c=void 0===a?100:a}function p(){}function t(a,b,c,d,e){this.G=a||null;this.b=b||null;this.ra=c||[];this.P=null;this.Z=e||"";this.a=this.B=this.K=null}function r(){}function Ka(){this.end=this.start=0;this.rules=this.parent=
+this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}function Id(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;n(this)&&(e=[],P(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var g=e[f];1===g.__CE_state&&a.disconnectedCallback(g)}this.ownerDocument.__CE_hasRegistry?a.f(this):a.l(this);
+return b}})}function c(b,c){u(b,"insertAdjacentElement",function(b,d){var e=n(d);b=c.call(this,b,d);e&&a.a(d);n(b)&&a.b(d);return b})}Mb?u(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=Mb.call(this,a)}):console.warn("Custom Elements: `Element#attachShadow` was not patched.");if(La&&La.get)b(Element.prototype,La);else if(Ma&&Ma.get)b(HTMLElement.prototype,Ma);else{var d=Na.call(document,"div");a.v(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return Nb.call(this,
+!0).innerHTML},set:function(a){var b="template"===this.localName?this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)Oa.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)qa.call(b,d.childNodes[0])}})})}u(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return Ob.call(this,b,c);var d=Pa.call(this,b);Ob.call(this,b,c);c=Pa.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});u(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return Pb.call(this,
+b,c,d);var e=ra.call(this,b,c);Pb.call(this,b,c,d);d=ra.call(this,b,c);a.attributeChangedCallback(this,c,e,d,b)});u(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return Qb.call(this,b);var c=Pa.call(this,b);Qb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});u(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return Rb.call(this,b,c);var d=ra.call(this,b,c);Rb.call(this,b,c);var e=ra.call(this,b,c);d!==e&&a.attributeChangedCallback(this,
+c,d,e,b)});Sb?c(HTMLElement.prototype,Sb):Tb?c(Element.prototype,Tb):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");Ub(a,Element.prototype,{Ka:Jd,append:Kd});Ld(a,{kb:Md,jb:Nd,replaceWith:Od,remove:Pd})}function Ld(a,b){var c=Element.prototype;c.before=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&n(a)});b.kb.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(n(this))for(f=0;f<d.length;f++)g=
+d[f],g instanceof Element&&a.b(g)};c.after=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&n(a)});b.jb.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(n(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.replaceWith=function(c){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&n(a)});var g=n(this);b.replaceWith.apply(this,d);for(var h=0;h<f.length;h++)a.a(f[h]);
+if(g)for(a.a(this),f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};c.remove=function(){var c=n(this);b.remove.call(this);c&&a.a(this)}}function Qd(a){function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,h=e.length;if(0<h&&n(this)){c=Array(h);for(var m=0;m<h;m++)c[m]=e[m]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.a(c[b])}}})}
+u(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Vb.call(this,b,d);if(n(this))for(d=0;d<c.length;d++)a.b(c[d]);return b}c=n(b);d=Vb.call(this,b,d);c&&a.a(b);n(this)&&a.b(b);return d});u(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=qa.call(this,b);if(n(this))for(var e=0;e<c.length;e++)a.b(c[e]);return b}c=n(b);e=qa.call(this,b);c&&a.a(b);n(this)&&
+a.b(b);return e});u(Node.prototype,"cloneNode",function(b){b=Nb.call(this,b);this.ownerDocument.__CE_hasRegistry?a.f(b):a.l(b);return b});u(Node.prototype,"removeChild",function(b){var c=n(b),e=Oa.call(this,b);c&&a.a(b);return e});u(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Wb.call(this,b,d);if(n(this))for(a.a(d),d=0;d<c.length;d++)a.b(c[d]);return b}c=n(b);var f=Wb.call(this,b,d),g=n(this);g&&a.a(d);c&&a.a(b);g&&
+a.b(b);return f});Qa&&Qa.get?b(Node.prototype,Qa):a.v(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)Oa.call(this,this.firstChild);qa.call(this,document.createTextNode(a))}})})}function Rd(a){u(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=a.c(b);if(c)return new c.constructor}b=Na.call(this,b);a.g(b);return b});
+u(Document.prototype,"importNode",function(b,c){b=Sd.call(this,b,c);this.__CE_hasRegistry?a.f(b):a.l(b);return b});u(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.c(c);if(d)return new d.constructor}b=Td.call(this,b,c);a.g(b);return b});Ub(a,Document.prototype,{Ka:Ud,append:Vd})}function Ub(a,b,c){b.prepend=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof
+Node&&n(a)});c.Ka.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(n(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)};b.append=function(b){for(var d=[],f=0;f<arguments.length;++f)d[f-0]=arguments[f];f=d.filter(function(a){return a instanceof Node&&n(a)});c.append.apply(this,d);for(var g=0;g<f.length;g++)a.a(f[g]);if(n(this))for(f=0;f<d.length;f++)g=d[f],g instanceof Element&&a.b(g)}}function Wd(a){window.HTMLElement=function(){function b(){var b=this.constructor,d=a.C(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");
+var e=d.constructionStack;if(0===e.length)return e=Na.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,a.g(e),e;d=e.length-1;var f=e[d];if(f===Xb)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");e[d]=Xb;Object.setPrototypeOf(f,b.prototype);a.g(f);return f}b.prototype=Xd.prototype;return b}()}function x(a){this.c=!1;this.a=a;this.h=new Map;this.f=function(a){return a()};this.b=!1;
+this.g=[];this.i=new Ra(a,document)}function Yb(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function Ra(a,b){this.b=a;this.a=b;this.N=void 0;this.b.f(this.a);"loading"===this.a.readyState&&(this.N=new MutationObserver(this.f.bind(this)),this.N.observe(this.a,{childList:!0,subtree:!0}))}function z(){this.u=new Map;this.s=new Map;this.j=[];this.h=!1}function l(a,b,c){if(a!==Zb)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=
+l.prototype;a.D(b,c);return a}function sa(a){if(!a.__shady||void 0===a.__shady.firstChild){a.__shady=a.__shady||{};a.__shady.firstChild=Sa(a);a.__shady.lastChild=Ta(a);$b(a);for(var b=a.__shady.childNodes=U(a),c=0,d;c<b.length&&(d=b[c]);c++)d.__shady=d.__shady||{},d.__shady.parentNode=a,d.__shady.nextSibling=b[c+1]||null,d.__shady.previousSibling=b[c-1]||null,ac(d)}}function Yd(a){var b=a&&a.N;b&&(b.ba.delete(a.ab),b.ba.size||(a.fb.__shady.X=null))}function Zd(a,b){a.__shady=a.__shady||{};a.__shady.X||
+(a.__shady.X=new ta);a.__shady.X.ba.add(b);var c=a.__shady.X;return{ab:b,N:c,fb:a,takeRecords:function(){return c.takeRecords()}}}function ta(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.ba=new Set}function Q(a,b){V[W]=a;V[W+1]=b;W+=2;2===W&&(Ua?Ua(X):$d())}function ae(){return function(){return process.Gb(X)}}function be(){return"undefined"!==typeof Va?function(){Va(X)}:Wa()}function ce(){var a=0,b=new bc(X),c=document.createTextNode("");b.observe(c,{characterData:!0});return function(){c.data=
+a=++a%2}}function de(){var a=new MessageChannel;a.port1.onmessage=X;return function(){return a.port2.postMessage(0)}}function Wa(){var a=setTimeout;return function(){return a(X,1)}}function X(){for(var a=0;a<W;a+=2)(0,V[a])(V[a+1]),V[a]=void 0,V[a+1]=void 0;W=0}function ee(){try{var a=require("vertx");Va=a.Ib||a.Hb;return be()}catch(b){return Wa()}}function Xa(a,b){var c=this,d=new this.constructor(Y);void 0===d[ua]&&cc(d);var e=c.o;if(e){var f=arguments[e-1];Q(function(){return dc(e,d,f,c.m)})}else Ya(c,
+d,a,b);return d}function Za(a){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(Y);ea(b,a);return b}function Y(){}function ec(a){try{return a.then}catch(b){return fa.error=b,fa}}function fe(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function ge(a,b,c){Q(function(a){var d=!1,f=fe(c,b,function(c){d||(d=!0,b!==c?ea(a,c):K(a,c))},function(b){d||(d=!0,A(a,b))});!d&&f&&(d=!0,A(a,f))},a)}function he(a,b){1===b.o?K(a,b.m):2===b.o?A(a,b.m):Ya(b,void 0,function(b){return ea(a,b)},
+function(b){return A(a,b)})}function fc(a,b,c){b.constructor===a.constructor&&c===Xa&&b.constructor.resolve===Za?he(a,b):c===fa?(A(a,fa.error),fa.error=null):void 0===c?K(a,b):"function"===typeof c?ge(a,b,c):K(a,b)}function ea(a,b){if(a===b)A(a,new TypeError("You cannot resolve a promise with itself"));else{var c=typeof b;null===b||"object"!==c&&"function"!==c?K(a,b):fc(a,b,ec(b))}}function ie(a){a.Ba&&a.Ba(a.m);$a(a)}function K(a,b){void 0===a.o&&(a.m=b,a.o=1,0!==a.U.length&&Q($a,a))}function A(a,
+b){void 0===a.o&&(a.o=2,a.m=b,Q(ie,a))}function Ya(a,b,c,d){var e=a.U,f=e.length;a.Ba=null;e[f]=b;e[f+1]=c;e[f+2]=d;0===f&&a.o&&Q($a,a)}function $a(a){var b=a.U,c=a.o;if(0!==b.length){for(var d,e,f=a.m,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?dc(c,d,e,f):e(f);a.U.length=0}}function gc(){this.error=null}function dc(a,b,c,d){var e="function"===typeof c;if(e){try{var f=c(d)}catch(H){ab.error=H,f=ab}if(f===ab){var g=!0;var h=f.error;f.error=null}else var m=!0;if(b===f){A(b,new TypeError("A promises callback cannot return that same promise."));
+return}}else f=d,m=!0;void 0===b.o&&(e&&m?ea(b,f):g?A(b,h):1===a?K(b,f):2===a&&A(b,f))}function je(a,b){try{b(function(b){ea(a,b)},function(b){A(a,b)})}catch(c){A(a,c)}}function cc(a){a[ua]=hc++;a.o=void 0;a.m=void 0;a.U=[]}function ha(a,b){this.eb=a;this.J=new a(Y);this.J[ua]||cc(this.J);ic(b)?(this.$=this.length=b.length,this.m=Array(this.length),0===this.length?K(this.J,this.m):(this.length=this.length||0,this.cb(b),0===this.$&&K(this.J,this.m))):A(this.J,Error("Array Methods must be provided an Array"))}
+function y(a){this[ua]=hc++;this.m=this.o=void 0;this.U=[];if(Y!==a){if("function"!==typeof a)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof y)je(this,a);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}}function Z(a){return a.__shady&&void 0!==a.__shady.firstChild}function I(a){return"ShadyRoot"===a.Wa}function ia(a){a=a.getRootNode();
+if(I(a))return a}function bb(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=Object.getOwnPropertyDescriptor(b,e);f&&Object.defineProperty(a,e,f)}}function cb(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)bb(a,c[d]);return a}function ke(a,b){for(var c in b)a[c]=b[c]}function jc(a){db.push(a);eb.textContent=kc++}function lc(a){fb||(fb=!0,jc(va));ja.push(a)}function va(){fb=!1;for(var a=!!ja.length;ja.length;)ja.shift()();
+return a}function le(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})}function mc(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}
+function nc(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}function gb(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g;e<f&&(g=d[e]);e++){a:{var h=g;var m=a;var H=b;switch(h.nodeType){case Node.ELEMENT_NODE:for(var k=h.localName,l="<"+k,n=h.attributes,p=0;m=n[p];p++)l+=" "+m.name+'="'+m.value.replace(me,mc)+'"';l+=">";h=ne[k]?l:l+gb(h,H)+"</"+k+">";break a;case Node.TEXT_NODE:h=h.data;h=m&&oe[m.localName]?h:h.replace(pe,mc);break a;case Node.COMMENT_NODE:h=
+"\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h),Error("not implemented");}}c+=h}return c}function aa(a){B.currentNode=a;return B.parentNode()}function Sa(a){B.currentNode=a;return B.firstChild()}function Ta(a){B.currentNode=a;return B.lastChild()}function oc(a){B.currentNode=a;return B.previousSibling()}function pc(a){B.currentNode=a;return B.nextSibling()}function U(a){var b=[];B.currentNode=a;for(a=B.firstChild();a;)b.push(a),a=B.nextSibling();return b}function qc(a){C.currentNode=
+a;return C.parentNode()}function rc(a){C.currentNode=a;return C.firstChild()}function sc(a){C.currentNode=a;return C.lastChild()}function tc(a){C.currentNode=a;return C.previousSibling()}function uc(a){C.currentNode=a;return C.nextSibling()}function vc(a){var b=[];C.currentNode=a;for(a=C.firstChild();a;)b.push(a),a=C.nextSibling();return b}function wc(a){return gb(a,function(a){return U(a)})}function xc(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,
+NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}}function M(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function R(a){M(a,yc);M(a,hb);M(a,ib)}function zc(a,b,c){ac(a);c=c||null;a.__shady=a.__shady||{};b.__shady=b.__shady||{};c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;
+var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}function jb(a,b,c){if(b===a)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(c){var d=c.__shady&&c.__shady.parentNode;if(void 0!==d&&
+d!==a||void 0===d&&aa(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.parentNode&&kb(b.parentNode,b);d=ia(a);var e;if(e=d)a:{if(!b.__noInsertionPoint){var f;"slot"===b.localName?f=[b]:b.querySelectorAll&&(f=b.querySelectorAll("slot"));if(f&&f.length){e=f;break a}}e=void 0}f=e;d&&("slot"===a.localName||f)&&d.M();if(Z(a)){e=c;$b(a);a.__shady=a.__shady||{};void 0!==a.__shady.firstChild&&
+(a.__shady.childNodes=null);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var g=b.childNodes,h=0;h<g.length;h++)zc(g[h],a,e);b.__shady=b.__shady||{};e=void 0!==b.__shady.firstChild?null:void 0;b.__shady.firstChild=b.__shady.lastChild=e;b.__shady.childNodes=e}else zc(b,a,e);if(lb(a)){a.__shady.root.M();var m=!0}else a.__shady.root&&(m=!0)}m||(m=I(a)?a.host:a,c?(c=Ac(c),mb.call(m,b,c)):Bc.call(m,b));Cc(a,b);f&&d.$a(f);return b}function kb(a,b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+
+b);var c=ia(b);if(Z(a)){b.__shady=b.__shady||{};a.__shady=a.__shady||{};b===a.__shady.firstChild&&(a.__shady.firstChild=b.__shady.nextSibling);b===a.__shady.lastChild&&(a.__shady.lastChild=b.__shady.previousSibling);var d=b.__shady.previousSibling;var e=b.__shady.nextSibling;d&&(d.__shady=d.__shady||{},d.__shady.nextSibling=e);e&&(e.__shady=e.__shady||{},e.__shady.previousSibling=d);b.__shady.parentNode=b.__shady.previousSibling=b.__shady.nextSibling=void 0;void 0!==a.__shady.childNodes&&(a.__shady.childNodes=
+null);if(lb(a)){a.__shady.root.M();var f=!0}}Dc(b);c&&((e=a&&"slot"===a.localName)&&(f=!0),((d=c.gb(b))||e)&&c.M());f||(f=I(a)?a.host:a,(!a.__shady.root&&"slot"!==b.localName||f===aa(b))&&ka.call(f,b));Cc(a,null,b);return b}function Dc(a){if(a.__shady&&void 0!==a.__shady.sa)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)Dc(e);a.__shady&&(a.__shady.sa=void 0)}function Ac(a){var b=a;a&&"slot"===a.localName&&(b=(b=a.__shady&&a.__shady.V)&&b.length?b[0]:Ac(a.nextSibling));return b}function lb(a){return(a=
+a&&a.__shady&&a.__shady.root)&&a.Aa()}function Ec(a,b){"slot"===b?(a=a.parentNode,lb(a)&&a.__shady.root.M()):"slot"===a.localName&&"name"===b&&(b=ia(a))&&(b.ib(a),b.M())}function Cc(a,b,c){if(a=a.__shady&&a.__shady.X)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),a.vb()}function Fc(a){if(a&&a.nodeType){a.__shady=a.__shady||{};var b=a.__shady.sa;void 0===b&&(I(a)?b=a:b=(b=a.parentNode)?Fc(b):a,document.documentElement.contains(a)&&(a.__shady.sa=b));return b}}function wa(a,b,c){var d=[];Gc(a.childNodes,
+b,c,d);return d}function Gc(a,b,c,d){for(var e=0,f=a.length,g;e<f&&(g=a[e]);e++){var h;if(h=g.nodeType===Node.ELEMENT_NODE){h=g;var m=b,H=c,k=d,l=m(h);l&&k.push(h);H&&H(l)?h=l:(Gc(h.childNodes,m,H,k),h=void 0)}if(h)break}}function Hc(a){a=a.getRootNode();I(a)&&a.Da()}function Ic(a,b,c){xa||(xa=window.ShadyCSS&&window.ShadyCSS.ScopingShim);xa&&"class"===b?xa.setElementClass(a,c):(Jc.call(a,b,c),Ec(a,b))}function Kc(a,b){if(a.ownerDocument!==document)return nb.call(document,a,b);var c=nb.call(document,
+a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=Kc(a[b],!0),c.appendChild(d)}return c}function ob(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===document&&c.push(window);return c}function Lc(a,b){if(!I)return a;a=ob(a,!0);for(var c=0,d,e,f,g;c<b.length;c++)if(d=b[c],f=d===window?window:d.getRootNode(),f!==e&&(g=a.indexOf(f),e=f),!I(f)||
+-1<g)return d}function pb(a){function b(b,d){b=new a(b,d);b.ia=d&&!!d.composed;return b}ke(b,a);b.prototype=a.prototype;return b}function Mc(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&a.target!==a.relatedTarget&&(e.call(b,a),!a.Ua);d++);}function qe(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];Mc(a,d,"capture");if(a.ja)return}Object.defineProperty(a,
+"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=d.__shady&&d.__shady.root;if(0===c||f&&f===e)if(Mc(a,d,"bubble"),d!==window&&(e=d.getRootNode()),a.ja)break}}function Nc(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=a[g],m=h.type,H=h.capture,k=h.once,l=h.passive;if(b===h.node&&c===m&&d===H&&e===k&&f===l)return g}return-1}function Oc(a,b,c){if(b){if("object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var g=c&&c.ka||
+this,h=b[la];if(h){if(-1<Nc(h,g,a,d,e,f))return}else b[la]=[];h=function(d){e&&this.removeEventListener(a,b,c);d.__target||Pc(d);if(g!==this){var f=Object.getOwnPropertyDescriptor(d,"currentTarget");Object.defineProperty(d,"currentTarget",{get:function(){return g},configurable:!0})}if(d.composed||-1<d.composedPath().indexOf(g))if(d.target===d.relatedTarget)d.eventPhase===Event.BUBBLING_PHASE&&d.stopImmediatePropagation();else if(d.eventPhase===Event.CAPTURING_PHASE||d.bubbles||d.target===g){var h=
+"object"===typeof b&&b.handleEvent?b.handleEvent(d):b.call(g,d);g!==this&&(f?(Object.defineProperty(d,"currentTarget",f),f=null):delete d.currentTarget);return h}};b[la].push({node:this,type:a,capture:d,once:e,passive:f,zb:h});qb[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][d?"capture":"bubble"].push(h)):(this instanceof Window?Qc:Rc).call(this,a,h,c)}}function Sc(a,b,c){if(b){if("object"===typeof c){var d=!!c.capture;var e=
+!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var g=c&&c.ka||this,h=void 0;var m=null;try{m=b[la]}catch(H){}m&&(e=Nc(m,g,a,d,e,f),-1<e&&(h=m.splice(e,1)[0].zb,m.length||(b[la]=void 0)));(this instanceof Window?Tc:Uc).call(this,a,h||b,c);h&&qb[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],h=a.indexOf(h),-1<h&&a.splice(h,1))}}function re(){for(var a in qb)window.addEventListener(a,function(a){a.__target||(Pc(a),qe(a))},!0)}function Pc(a){a.__target=a.target;a.ya=
+a.relatedTarget;if(D.W){var b=Vc,c=Object.getPrototypeOf(a);if(!c.hasOwnProperty("__patchProto")){var d=Object.create(c);d.Bb=c;bb(d,b);c.__patchProto=d}a.__proto__=c.__patchProto}else bb(a,Vc)}function ma(a,b){return{index:a,Y:[],aa:b}}function se(a,b,c,d){var e=0,f=0,g=0,h=0,m=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<m;g++)if(a[g]!==c[g])break a;g=m}if(b==a.length&&d==c.length){h=a.length;for(var k=c.length,l=0;l<m-g&&te(a[--h],c[--k]);)l++;h=l}e+=g;f+=g;b-=h;d-=h;if(0==b-e&&0==d-f)return[];
+if(e==b){for(b=ma(e,0);f<d;)b.Y.push(c[f++]);return[b]}if(f==d)return[ma(e,b-e)];m=e;g=f;d=d-g+1;h=b-m+1;b=Array(d);for(k=0;k<d;k++)b[k]=Array(h),b[k][0]=k;for(k=0;k<h;k++)b[0][k]=k;for(k=1;k<d;k++)for(l=1;l<h;l++)if(a[m+l-1]===c[g+k-1])b[k][l]=b[k-1][l-1];else{var n=b[k-1][l]+1,p=b[k][l-1]+1;b[k][l]=n<p?n:p}m=b.length-1;g=b[0].length-1;d=b[m][g];for(a=[];0<m||0<g;)0==m?(a.push(2),g--):0==g?(a.push(3),m--):(h=b[m-1][g-1],k=b[m-1][g],l=b[m][g-1],n=k<l?k<h?k:h:l<h?l:h,n==h?(h==d?a.push(0):(a.push(1),
+d=h),m--,g--):n==k?(a.push(3),m--,d=k):(a.push(2),g--,d=l));a.reverse();b=void 0;m=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(m.push(b),b=void 0);e++;f++;break;case 1:b||(b=ma(e,0));b.aa++;e++;b.Y.push(c[f]);f++;break;case 2:b||(b=ma(e,0));b.aa++;e++;break;case 3:b||(b=ma(e,0)),b.Y.push(c[f]),f++}b&&m.push(b);return m}function te(a,b){return a===b}function Wc(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function Xc(a){Hc(a);return a.__shady&&a.__shady.assignedSlot||null}function N(a,
+b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}}function ue(){var a=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;N(window.Node.prototype,ve);N(window.Window.prototype,we);N(window.Text.prototype,xe);N(window.DocumentFragment.prototype,rb);N(window.Element.prototype,Yc);N(window.Document.prototype,Zc);window.HTMLSlotElement&&N(window.HTMLSlotElement.prototype,
+$c);N(a.prototype,ye);D.W&&(R(window.Node.prototype),R(window.Text.prototype),R(window.DocumentFragment.prototype),R(window.Element.prototype),R(a.prototype),R(window.Document.prototype),window.HTMLSlotElement&&R(window.HTMLSlotElement.prototype))}function ad(a){var b=ze.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function n(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?
+a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function sb(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}function P(a,b,c){c=c?c:new Set;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)P(d,b,c);d=sb(a,e);continue}else if("template"===f){d=sb(a,e);continue}if(e=
+e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)P(e,b,c)}d=d.firstChild?d.firstChild:sb(a,d)}}function u(a,b,c){a[b]=c}function tb(a){a=a.replace(G.mb,"").replace(G.port,"");var b=bd,c=a,d=new Ka;d.start=0;d.end=c.length;for(var e=d,f=0,g=c.length;f<g;f++)if("{"===c[f]){e.rules||(e.rules=[]);var h=e,m=h.rules[h.rules.length-1]||null;e=new Ka;e.start=f+1;e.parent=h;e.previous=m;h.rules.push(e)}else"}"===c[f]&&(e.end=f+1,e=e.parent||d);return b(d,a)}function bd(a,b){var c=b.substring(a.start,
+a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=Ae(c),c=c.replace(G.Ja," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=L.MEDIA_RULE:c.match(G.rb)&&(a.type=L.ha,a.keyframesName=a.selector.split(G.Ja).pop()):a.type=0===c.indexOf("--")?L.ua:L.STYLE_RULE);if(c=a.rules)for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++)bd(f,b);return a}function Ae(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,
+function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}function cd(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var g=e.length,h;f<g&&(h=e[f]);f++)d=cd(h,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(G.Ea,"").replace(G.Ia,""),b=b.replace(G.sb,"").replace(G.xb,"")),(d=b.trim())&&(d="  "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}function dd(a){v=
+a&&a.shimcssproperties?!1:q||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}function ba(a,b){if(!a)return"";"string"===typeof a&&(a=tb(a));b&&ca(a,b);return cd(a,v)}function ya(a){!a.__cssRules&&a.textContent&&(a.__cssRules=tb(a.textContent));return a.__cssRules||null}function ed(a){return!!a.parent&&a.parent.type===L.ha}function ca(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===L.MEDIA_RULE){var g=a.selector.match(Be);
+g&&(window.matchMedia(g[1]).matches||(e=!0))}f===L.STYLE_RULE?b(a):c&&f===L.ha?c(a):f===L.ua&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var h;e<f&&(h=a[e]);e++)ca(h,b,c,d)}}}function ub(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;fd(e,c,d);return e}function fd(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);S?a.compareDocumentPosition(S)===Node.DOCUMENT_POSITION_PRECEDING&&(S=a):S=a}function gd(a,b){var c=a.indexOf("var(");
+if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=gd(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}function za(a,b){q?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}function T(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||
+""):(b=a.is,c=a.extends);return{is:b,Z:c}}function hd(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];if(e.nodeType===Node.ELEMENT_NODE){var f=e.getRootNode();var g=e;var h=[];g.classList?h=Array.from(g.classList):g instanceof window.SVGElement&&g.hasAttribute("class")&&(h=g.getAttribute("class").split(/\s+/));g=h;h=g.indexOf(w.c);(g=-1<h?g[h+1]:"")&&f===e.ownerDocument?w.a(e,g,
+!0):f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f=f.host)&&(f=T(f).is,g!==f&&(g&&w.a(e,g,!0),w.a(e,f)))}}}}function Ce(a){if(a=Aa[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function id(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function De(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,Ee.then(function(){a._applyShimCurrentVersion=
+a._applyShimNextVersion;a.b=!1}))}function Kb(a){requestAnimationFrame(function(){jd?jd(a):(vb||(vb=new Promise(function(a){wb=a}),"complete"===document.readyState?wb():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&wb()})),vb.then(function(){a&&a()}))})}(function(){if(!function(){var a=document.createEvent("Event");a.initEvent("foo",!0,!0);a.preventDefault();return a.defaultPrevented}()){var a=Event.prototype.preventDefault;Event.prototype.preventDefault=
+function(){this.cancelable&&(a.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var b=/Trident/.test(navigator.userAgent);if(!window.CustomEvent||b&&"function"!==typeof window.CustomEvent)window.CustomEvent=function(a,b){b=b||{};var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c},window.CustomEvent.prototype=window.Event.prototype;if(!window.Event||b&&"function"!==typeof window.Event){var c=
+window.Event;window.Event=function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles,!!b.cancelable);return c};if(c)for(var d in c)window.Event[d]=c[d];window.Event.prototype=c.prototype}if(!window.MouseEvent||b&&"function"!==typeof window.MouseEvent){b=window.MouseEvent;window.MouseEvent=function(a,b){b=b||{};var c=document.createEvent("MouseEvent");c.initMouseEvent(a,!!b.bubbles,!!b.cancelable,b.view||window,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,
+b.shiftKey,b.metaKey,b.button,b.relatedTarget);return c};if(b)for(d in b)window.MouseEvent[d]=b[d];window.MouseEvent.prototype=b.prototype}Array.from||(Array.from=function(a){return[].slice.call(a)});Object.assign||(Object.assign=function(a,b){for(var c=[].slice.call(arguments,1),d=0,e;d<c.length;d++)if(e=c[d])for(var f=a,k=e,l=Object.getOwnPropertyNames(k),n=0;n<l.length;n++)e=l[n],f[e]=k[e];return a})})(window.WebComponents);(function(){function a(){}var b="undefined"===typeof HTMLTemplateElement;
+/Trident/.test(navigator.userAgent)&&function(){var a=Document.prototype.importNode;Document.prototype.importNode=function(){var b=a.apply(this,arguments);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=this.createDocumentFragment();c.appendChild(b);return c}return b}}();var c=Node.prototype.cloneNode,d=Document.prototype.createElement,e=Document.prototype.importNode,f=function(){if(!b){var a=document.createElement("template"),c=document.createElement("template");c.content.appendChild(document.createElement("div"));
+a.content.appendChild(c);a=a.cloneNode(!0);return 0===a.content.childNodes.length||0===a.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(b){var g=function(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case "\u00a0":return"&nbsp;"}},h=function(b){Object.defineProperty(b,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=b.nextSibling)a+=b.outerHTML||b.data.replace(r,
+g);return a},set:function(b){m.body.innerHTML=b;for(a.b(m);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;m.body.firstChild;)this.content.appendChild(m.body.firstChild)},configurable:!0})},m=document.implementation.createHTMLDocument("template"),k=!0,l=document.createElement("style");l.textContent="template{display:none;}";var n=document.head;n.insertBefore(l,n.firstElementChild);a.prototype=Object.create(HTMLElement.prototype);var p=!document.createElement("div").hasOwnProperty("innerHTML");
+a.O=function(b){if(!b.content){b.content=m.createDocumentFragment();for(var c;c=b.firstChild;)b.content.appendChild(c);if(p)b.__proto__=a.prototype;else if(b.cloneNode=function(b){return a.a(this,b)},k)try{h(b)}catch(df){k=!1}a.b(b.content)}};h(a.prototype);a.b=function(b){b=b.querySelectorAll("template");for(var c=0,d=b.length,e;c<d&&(e=b[c]);c++)a.O(e)};document.addEventListener("DOMContentLoaded",function(){a.b(document)});Document.prototype.createElement=function(){var b=d.apply(this,arguments);
+"template"===b.localName&&a.O(b);return b};var r=/[&\u00A0<>]/g}if(b||f)a.a=function(a,b){var d=c.call(a,!1);this.O&&this.O(d);b&&(d.content.appendChild(c.call(a.content,!0)),this.qa(d.content,a.content));return d},a.prototype.cloneNode=function(b){return a.a(this,b)},a.qa=function(a,b){if(b.querySelectorAll){b=b.querySelectorAll("template");a=a.querySelectorAll("template");for(var c=0,d=a.length,e,f;c<d;c++)f=b[c],e=a[c],this.O&&this.O(f),e.parentNode.replaceChild(f.cloneNode(!0),e)}},Node.prototype.cloneNode=
+function(b){if(this instanceof DocumentFragment)if(b)var d=this.ownerDocument.importNode(this,!0);else return this.ownerDocument.createDocumentFragment();else d=c.call(this,b);b&&a.qa(d,this);return d},Document.prototype.importNode=function(b,c){if("template"===b.localName)return a.a(b,c);var d=e.call(this,b,c);c&&a.qa(d,b);return d},f&&(window.HTMLTemplateElement.prototype.cloneNode=function(b){return a.a(this,b)});b&&(window.HTMLTemplateElement=a)})();var xb;Array.isArray?xb=Array.isArray:xb=function(a){return"[object Array]"===
+Object.prototype.toString.call(a)};var ic=xb,W=0,Va,Ua,kd="undefined"!==typeof window?window:void 0,ld=kd||{},bc=ld.MutationObserver||ld.WebKitMutationObserver,Fe="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,V=Array(1E3);var $d="undefined"===typeof self&&"undefined"!==typeof process&&"[object process]"==={}.toString.call(process)?ae():bc?ce():Fe?de():kd||"function"!==typeof require?Wa():ee();var ua=Math.random().toString(36).substring(16),
+fa=new gc,ab=new gc,hc=0;ha.prototype.cb=function(a){for(var b=0;void 0===this.o&&b<a.length;b++)this.bb(a[b],b)};ha.prototype.bb=function(a,b){var c=this.eb,d=c.resolve;d===Za?(d=ec(a),d===Xa&&void 0!==a.o?this.na(a.o,b,a.m):"function"!==typeof d?(this.$--,this.m[b]=a):c===y?(c=new c(Y),fc(c,a,d),this.oa(c,b)):this.oa(new c(function(b){return b(a)}),b)):this.oa(d(a),b)};ha.prototype.na=function(a,b,c){var d=this.J;void 0===d.o&&(this.$--,2===a?A(d,c):this.m[b]=c);0===this.$&&K(d,this.m)};ha.prototype.oa=
+function(a,b){var c=this;Ya(a,void 0,function(a){return c.na(1,b,a)},function(a){return c.na(2,b,a)})};y.g=function(a){return(new ha(this,a)).J};y.h=function(a){var b=this;return ic(a)?new b(function(c,d){for(var e=a.length,f=0;f<e;f++)b.resolve(a[f]).then(c,d)}):new b(function(a,b){return b(new TypeError("You must pass an array to race."))})};y.resolve=Za;y.i=function(a){var b=new this(Y);A(b,a);return b};y.f=function(a){Ua=a};y.c=function(a){Q=a};y.b=Q;y.prototype={constructor:y,then:Xa};y.a=function(){if("undefined"!==
+typeof global)var a=global;else if("undefined"!==typeof self)a=self;else try{a=Function("return this")()}catch(d){throw Error("polyfill failed because global object is unavailable in this environment");}var b=a.Promise;if(b){var c=null;try{c=Object.prototype.toString.call(b.resolve())}catch(d){}if("[object Promise]"===c&&!b.Eb)return}a.Promise=y};y.Promise=y;y.a();(function(a){function b(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");
+c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function c(a){if(l)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!h(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=document.querySelectorAll("link[rel=import]:not(import-dependency)"),c=b.length;c?k(b,function(b){return g(b,function(){0===--c&&a()})}):a()}function e(a){function b(){"loading"!==
+document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function f(a){e(function(){return d(function(){return a&&a()})})}function g(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var c=function(d){a.removeEventListener(d.type,c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);x&&"style"===a.localName||a.addEventListener("error",
+c)}}function h(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function m(){var a=this;this.a={};this.b=0;this.f=new MutationObserver(function(b){return a.l(b)});this.f.observe(document.head,{childList:!0,subtree:!0});this.c(document)}function k(a,b,c){var d=a?a.length:0,e=c?-1:1;for(c=c?d-1:0;c<d&&0<=c;c+=e)b(a[c],c)}var l="import"in document.createElement("link"),n=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return n||
+("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var p=/(^\/)|(^#)|(^[\w-\d]*:)/,r=/(url\()([^)]*)(\))/g,t=/(@import[\s]+(?!url\())([^;]*)(;)/g,w=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,q={nb:function(a,b){a.href&&a.setAttribute("href",q.ta(a.getAttribute("href"),b));a.src&&a.setAttribute("src",q.ta(a.getAttribute("src"),b));if("style"===a.localName){var c=q.La(a.textContent,b,r);a.textContent=q.La(c,b,t)}},La:function(a,b,c){return a.replace(c,
+function(a,c,d,e){a=d.replace(/["']/g,"");b&&(a=q.Ma(a,b));return c+"'"+a+"'"+e})},ta:function(a,b){return a&&p.test(a)?a:q.Ma(a,b)},Ma:function(a,b){if(void 0===q.la){q.la=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";q.la="http://a/c%20d"===c.href}catch(ef){}}if(q.la)return(new URL(a,b)).href;c=q.Za;c||(c=document.implementation.createHTMLDocument("temp"),q.Za=c,c.wa=c.createElement("base"),c.head.appendChild(c.wa),c.va=c.createElement("a"));c.wa.href=b;c.va.href=a;return c.va.href||a}},
+y={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a=a.split(",");var d=a[1];d=-1<a[0].indexOf(";base64")?atob(d):decodeURIComponent(d);b(d)}else{var e=new XMLHttpRequest;e.open("GET",a,y.async);e.onload=function(){var a=e.responseURL||e.getResponseHeader("Location");a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var d=e.response||e.responseText;304===e.status||0===e.status||200<=e.status&&300>e.status?b(d,a):c(d)};e.send()}else c("error: href must be specified")}},
+x=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);m.prototype.c=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");k(a,function(a){return b.h(a)})};m.prototype.h=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=this.a[c];d&&d.__loaded&&(a.import=d,this.g(a))}else this.b++,this.a[c]="pending",y.load(c,function(a,d){a=b.s(a,d||c);b.a[c]=a;b.b--;b.c(a);b.i()},function(){b.a[c]=null;b.b--;b.i()})};m.prototype.s=function(a,b){if(!a)return document.createDocumentFragment();
+x&&(a=a.replace(w,function(a,b,c){return-1===a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content;else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=q.ta(c.getAttribute("href"),b),c.removeAttribute("href");c=a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n    style:not([type]), link[rel=stylesheet][href]:not([type]),\n    script:not([type]), script[type="application/javascript"],\n    script[type="text/javascript"]');
+var d=0;k(c,function(a){g(a);q.nb(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};m.prototype.i=function(){var a=this;if(!this.b){this.f.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.c(document),a.b||(a.f.observe(document.head,{childList:!0,subtree:!0}),a.j()))};
+this.v(function(){c=!0;d()});this.u(function(){b=!0;d()})}};m.prototype.flatten=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");k(a,function(a){var c=b.a[a.href];(a.import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(c),a.appendChild(c))})};m.prototype.u=function(a){function b(e){if(e<d){var f=c[e],h=document.createElement("script");f.removeAttribute("import-dependency");k(f.attributes,function(a){return h.setAttribute(a.name,
+a.value)});n=h;f.parentNode.replaceChild(h,f);g(h,function(){n=null;b(e+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};m.prototype.v=function(a){var b=document.querySelectorAll("style[import-dependency],\n    link[rel=stylesheet][import-dependency]"),d=b.length;if(d){var e=x&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");k(b,function(b){g(b,function(){b.removeAttribute("import-dependency");0===--d&&a()});if(e&&b.parentNode!==
+document.head){var f=document.createElement(b.localName);f.__appliedElement=b;f.setAttribute("type","import-placeholder");b.parentNode.insertBefore(f,b.nextSibling);for(f=c(b);f&&c(f);)f=c(f);f.parentNode!==document.head&&(f=null);document.head.insertBefore(b,f);b.removeAttribute("type")}})}else a()};m.prototype.j=function(){var a=this,b=document.querySelectorAll("link[rel=import]");k(b,function(b){return a.g(b)},!0)};m.prototype.g=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState=
+"complete"),a.dispatchEvent(b(a.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))};m.prototype.l=function(a){var b=this;k(a,function(a){return k(a.addedNodes,function(a){a&&a.nodeType===Node.ELEMENT_NODE&&(h(a)?b.h(a):b.c(a))})})};if(l){var v=document.querySelectorAll("link[rel=import]");k(v,function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});v=function(a){a=a.target;h(a)&&(a.__loaded=!0)};document.addEventListener("load",v,!0);document.addEventListener("error",
+v,!0)}else{var u=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!u||u.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=h(this)?this:c(this);return a?a.href:u&&u.get?u.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});e(function(){return new m})}f(function(){return document.dispatchEvent(b("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});a.useNative=l;a.whenReady=f;a.importForElement=
+c})(window.HTMLImports=window.HTMLImports||{});window.WebComponents=window.WebComponents||{flags:{}};var md=document.querySelector('script[src*="webcomponents-lite.js"]'),Ge=/wc-(.+)/,E={};if(!E.noOpts){location.search.slice(1).split("&").forEach(function(a){a=a.split("=");var b;a[0]&&(b=a[0].match(Ge))&&(E[b[1]]=a[1]||!0)});if(md)for(var nd=0,Ba;Ba=md.attributes[nd];nd++)"src"!==Ba.name&&(E[Ba.name]=Ba.value||!0);if(E.log&&E.log.split){var He=E.log.split(",");E.log={};He.forEach(function(a){E.log[a]=
+!0})}else E.log={}}window.WebComponents.flags=E;var od=E.shadydom;od&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=od);var pd=E.register||E.ce;pd&&window.customElements&&(window.customElements.forcePolyfill=pd);var D=window.ShadyDOM||{};D.ob=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var yb=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");D.W=!!(yb&&yb.configurable&&yb.get);D.Ha=D.force||!D.ob;var da=Element.prototype,qd=da.matches||da.matchesSelector||
+da.mozMatchesSelector||da.msMatchesSelector||da.oMatchesSelector||da.webkitMatchesSelector,eb=document.createTextNode(""),kc=0,db=[];(new MutationObserver(function(){for(;db.length;)try{db.shift()()}catch(a){throw eb.textContent=kc++,a;}})).observe(eb,{characterData:!0});var ja=[],fb;va.list=ja;ta.prototype.vb=function(){var a=this;this.a||(this.a=!0,jc(function(){a.b()}))};ta.prototype.b=function(){if(this.a){this.a=!1;var a=this.takeRecords();a.length&&this.ba.forEach(function(b){b(a)})}};ta.prototype.takeRecords=
+function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]};var Bc=Element.prototype.appendChild,mb=Element.prototype.insertBefore,ka=Element.prototype.removeChild,Jc=Element.prototype.setAttribute,rd=Element.prototype.removeAttribute,zb=Element.prototype.cloneNode,nb=Document.prototype.importNode,Rc=Element.prototype.addEventListener,Uc=Element.prototype.removeEventListener,
+Qc=Window.prototype.addEventListener,Tc=Window.prototype.removeEventListener,Ab=Element.prototype.dispatchEvent,Ie=Object.freeze({appendChild:Bc,insertBefore:mb,removeChild:ka,setAttribute:Jc,removeAttribute:rd,cloneNode:zb,importNode:nb,addEventListener:Rc,removeEventListener:Uc,Jb:Qc,Kb:Tc,dispatchEvent:Ab,querySelector:Element.prototype.querySelector,querySelectorAll:Element.prototype.querySelectorAll}),me=/[&\u00A0"]/g,pe=/[&\u00A0<>]/g,ne=nc("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),
+oe=nc("style script xmp iframe noembed noframes plaintext noscript".split(" ")),B=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),C=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Je=Object.freeze({parentNode:aa,firstChild:Sa,lastChild:Ta,previousSibling:oc,nextSibling:pc,childNodes:U,parentElement:qc,firstElementChild:rc,lastElementChild:sc,previousElementSibling:tc,nextElementSibling:uc,children:vc,innerHTML:wc,textContent:xc}),Bb=Object.getOwnPropertyDescriptor(Element.prototype,
+"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),Ca=document.implementation.createHTMLDocument("inert").createElement("div"),Cb=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),yc={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:qc(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode;return void 0!==a?a:aa(this)},configurable:!0},
+nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:pc(this)},configurable:!0},previousSibling:{get:function(){var a=this.__shady&&this.__shady.previousSibling;return void 0!==a?a:oc(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var a=this.nextSibling;a&&a.nodeType!==
+Node.ELEMENT_NODE;)a=a.nextSibling;return a}return uc(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var a=this.previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return tc(this)},configurable:!0}},hb={childNodes:{get:function(){if(Z(this)){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}var b=this.__shady.childNodes}else b=
+U(this);b.item=function(a){return b[a]};return b},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=this.__shady&&this.__shady.firstChild;return void 0!==a?a:Sa(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:Ta(this)},configurable:!0},textContent:{get:function(){if(Z(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&&
+a.push(d.textContent);return a.join("")}return xc(this)},set:function(a){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(a));break;default:this.nodeValue=a}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;
+return a}return rc(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var a=this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return sc(this)},configurable:!0},children:{get:function(){var a;Z(this)?a=Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}):a=vc(this);a.item=function(b){return a[b]};return a},configurable:!0},innerHTML:{get:function(){var a="template"===
+this.localName?this.content:this;return Z(this)?gb(a):wc(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild);for(Bb&&Bb.set?Bb.set.call(Ca,a):Ca.innerHTML=a;Ca.firstChild;)b.appendChild(Ca.firstChild)},configurable:!0}},sd={shadowRoot:{get:function(){return this.__shady&&this.__shady.tb||null},configurable:!0}},ib={activeElement:{get:function(){var a=Cb&&Cb.get?Cb.get.call(document):D.W?void 0:document.activeElement;if(a&&a.nodeType){var b=
+!!I(this);if(this===document||b&&this.host!==a&&this.host.contains(a)){for(b=ia(a);b&&b!==this;)a=b.host,b=ia(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}},ac=D.W?function(){}:function(a){a.__shady&&a.__shady.Xa||(a.__shady=a.__shady||{},a.__shady.Xa=!0,M(a,yc,!0))},$b=D.W?function(){}:function(a){a.__shady&&a.__shady.Va||(a.__shady=a.__shady||{},a.__shady.Va=!0,M(a,hb,!0),M(a,sd,!0))},xa=null,la="__eventWrappers"+Date.now(),Ke=
+{blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,
+dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Vc={get composed(){!1!==this.isTrusted&&void 0===this.ia&&(this.ia=Ke[this.type]);return this.ia||!1},composedPath:function(){this.xa||(this.xa=ob(this.__target,this.composed));return this.xa},get target(){return Lc(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.ya)return null;this.za||(this.za=ob(this.ya,!0));return Lc(this.currentTarget,this.za)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);
+this.ja=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.ja=this.Ua=!0}},qb={focus:!0,blur:!0},Le=pb(window.Event),Me=pb(window.CustomEvent),Ne=pb(window.MouseEvent),Zb={};l.prototype=Object.create(DocumentFragment.prototype);l.prototype.D=function(a,b){this.Wa="ShadyRoot";sa(a);sa(this);this.host=a;this.L=b&&b.mode;a.__shady=a.__shady||{};a.__shady.root=this;a.__shady.tb="closed"!==this.L?this:null;this.T=!1;this.b=[];this.a=null;b=U(a);for(var c=0,
+d=b.length;c<d;c++)ka.call(a,b[c])};l.prototype.M=function(){var a=this;this.T||(this.T=!0,lc(function(){return a.Da()}))};l.prototype.C=function(){for(var a=this,b=this;b;)b.T&&(a=b),b=b.hb();return a};l.prototype.hb=function(){var a=this.host.getRootNode();if(I(a))for(var b=this.host.childNodes,c=0,d;c<b.length;c++)if(d=b[c],this.h(d))return a};l.prototype.Da=function(){this.T&&this.C()._renderRoot()};l.prototype._renderRoot=function(){this.T=!1;this.v();this.s()};l.prototype.v=function(){for(var a=
+0,b;a<this.b.length;a++)b=this.b[a],this.l(b);for(b=this.host.firstChild;b;b=b.nextSibling)this.f(b);for(a=0;a<this.b.length;a++){b=this.b[a];if(!b.__shady.assignedNodes.length)for(var c=b.firstChild;c;c=c.nextSibling)this.f(c,b);c=b.parentNode;(c=c.__shady&&c.__shady.root)&&c.Aa()&&c._renderRoot();this.c(b.__shady.V,b.__shady.assignedNodes);if(c=b.__shady.Ca){for(var d=0;d<c.length;d++)c[d].__shady.ma=null;b.__shady.Ca=null;c.length>b.__shady.assignedNodes.length&&(b.__shady.pa=!0)}b.__shady.pa&&
+(b.__shady.pa=!1,this.g(b))}};l.prototype.f=function(a,b){a.__shady=a.__shady||{};var c=a.__shady.ma;a.__shady.ma=null;b||(b=(b=this.a[a.slot||"__catchall"])&&b[0]);b?(b.__shady.assignedNodes.push(a),a.__shady.assignedSlot=b):a.__shady.assignedSlot=void 0;c!==a.__shady.assignedSlot&&a.__shady.assignedSlot&&(a.__shady.assignedSlot.__shady.pa=!0)};l.prototype.l=function(a){var b=a.__shady.assignedNodes;a.__shady.assignedNodes=[];a.__shady.V=[];if(a.__shady.Ca=b)for(var c=0;c<b.length;c++){var d=b[c];
+d.__shady.ma=d.__shady.assignedSlot;d.__shady.assignedSlot===a&&(d.__shady.assignedSlot=null)}};l.prototype.c=function(a,b){for(var c=0,d;c<b.length&&(d=b[c]);c++)"slot"==d.localName?this.c(a,d.__shady.assignedNodes):a.push(b[c])};l.prototype.g=function(a){Ab.call(a,new Event("slotchange"));a.__shady.assignedSlot&&this.g(a.__shady.assignedSlot)};l.prototype.s=function(){for(var a=this.b,b=[],c=0;c<a.length;c++){var d=a[c].parentNode;d.__shady&&d.__shady.root||!(0>b.indexOf(d))||b.push(d)}for(a=0;a<
+b.length;a++)c=b[a],this.I(c===this?this.host:c,this.u(c))};l.prototype.u=function(a){var b=[];a=a.childNodes;for(var c=0;c<a.length;c++){var d=a[c];if(this.h(d)){d=d.__shady.V;for(var e=0;e<d.length;e++)b.push(d[e])}else b.push(d)}return b};l.prototype.h=function(a){return"slot"==a.localName};l.prototype.I=function(a,b){for(var c=U(a),d=se(b,b.length,c,c.length),e=0,f=0,g;e<d.length&&(g=d[e]);e++){for(var h=0,k;h<g.Y.length&&(k=g.Y[h]);h++)aa(k)===a&&ka.call(a,k),c.splice(g.index+f,1);f-=g.aa}for(e=
+0;e<d.length&&(g=d[e]);e++)for(f=c[g.index],h=g.index;h<g.index+g.aa;h++)k=b[h],mb.call(a,k,f),c.splice(h,0,k)};l.prototype.$a=function(a){this.a=this.a||{};this.b=this.b||[];for(var b=0;b<a.length;b++){var c=a[b];c.__shady=c.__shady||{};sa(c);sa(c.parentNode);var d=this.i(c);if(this.a[d]){var e=e||{};e[d]=!0;this.a[d].push(c)}else this.a[d]=[c];this.b.push(c)}if(e)for(var f in e)this.a[f]=this.j(this.a[f])};l.prototype.i=function(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Ya=
+b};l.prototype.j=function(a){return a.sort(function(a,c){a=Wc(a);for(var b=Wc(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.parentNode.childNodes),a.indexOf(c)-a.indexOf(f)}})};l.prototype.gb=function(a){this.a=this.a||{};this.b=this.b||[];var b=this.a,c;for(c in b)for(var d=b[c],e=0;e<d.length;e++){var f=d[e],g;a:{for(g=f;g;){if(g==a){g=!0;break a}g=g.parentNode}g=void 0}if(g){d.splice(e,1);var h=this.b.indexOf(f);0<=h&&this.b.splice(h,1);e--;this.H(f);h=!0}}return h};l.prototype.ib=
+function(a){var b=a.Ya,c=this.i(a);if(c!==b){b=this.a[b];var d=b.indexOf(a);0<=d&&b.splice(d,1);b=this.a[c]||(this.a[c]=[]);b.push(a);1<b.length&&(this.a[c]=this.j(b))}};l.prototype.H=function(a){if(a=a.__shady.V)for(var b=0;b<a.length;b++){var c=a[b],d=aa(c);d&&ka.call(d,c)}};l.prototype.Aa=function(){return!!this.b.length};l.prototype.addEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.ka=this;this.host.addEventListener(a,b,c)};l.prototype.removeEventListener=function(a,b,
+c){"object"!==typeof c&&(c={capture:!!c});c.ka=this;this.host.removeEventListener(a,b,c)};l.prototype.getElementById=function(a){return wa(this,function(b){return b.id==a},function(a){return!!a})[0]||null};(function(a){M(a,hb,!0);M(a,ib,!0)})(l.prototype);var we={addEventListener:Oc.bind(window),removeEventListener:Sc.bind(window)},ve={addEventListener:Oc,removeEventListener:Sc,appendChild:function(a){return jb(this,a)},insertBefore:function(a,b){return jb(this,a,b)},removeChild:function(a){return kb(this,
+a)},replaceChild:function(a,b){jb(this,a,b);kb(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=zb.call(this,a);else if(b=zb.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0),b.appendChild(d)}return b},getRootNode:function(){return Fc(this)},get isConnected(){var a=this.ownerDocument;if(a&&a.contains&&a.contains(this)||(a=a.documentElement)&&a.contains&&a.contains(this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof
+l?a.host:void 0);return!!(a&&a instanceof Document)},dispatchEvent:function(a){va();return Ab.call(this,a)}},xe={get assignedSlot(){return Xc(this)}},rb={querySelector:function(a){return wa(this,function(b){return qd.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a){return wa(this,function(b){return qd.call(b,a)})}},$c={assignedNodes:function(a){if("slot"===this.localName)return Hc(this),this.__shady?(a&&a.flatten?this.__shady.V:this.__shady.assignedNodes)||[]:[]}},Yc=cb({setAttribute:function(a,
+b){Ic(this,a,b)},removeAttribute:function(a){rd.call(this,a);Ec(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";if(!a)throw"Not enough arguments.";return new l(Zb,this,a)},get slot(){return this.getAttribute("slot")},set slot(a){Ic(this,"slot",a)},get assignedSlot(){return Xc(this)}},rb,$c);Object.defineProperties(Yc,sd);var Zc=cb({importNode:function(a,b){return Kc(a,b)},getElementById:function(a){return wa(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},
+rb);Object.defineProperties(Zc,{_activeElement:ib.activeElement});var Oe=HTMLElement.prototype.blur,ye=cb({blur:function(){var a=this.__shady&&this.__shady.root;(a=a&&a.activeElement)?a.blur():Oe.call(this)}});D.Ha&&(window.ShadyDOM={inUse:D.Ha,patch:function(a){return a},isShadyRoot:I,enqueue:lc,flush:va,settings:D,filterMutations:le,observeChildren:Zd,unobserveChildren:Yd,nativeMethods:Ie,nativeTree:Je},window.Event=Le,window.CustomEvent=Me,window.MouseEvent=Ne,re(),ue(),window.ShadowRoot=l);var ze=
+new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));z.prototype.D=function(a,b){this.u.set(a,b);this.s.set(b.constructor,b)};z.prototype.c=function(a){return this.u.get(a)};z.prototype.C=function(a){return this.s.get(a)};z.prototype.v=function(a){this.h=!0;this.j.push(a)};z.prototype.l=function(a){var b=this;this.h&&P(a,function(a){return b.g(a)})};z.prototype.g=function(a){if(this.h&&!a.__CE_patched){a.__CE_patched=
+!0;for(var b=0;b<this.j.length;b++)this.j[b](a)}};z.prototype.b=function(a){var b=[];P(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var c=b[a];1===c.__CE_state?this.connectedCallback(c):this.i(c)}};z.prototype.a=function(a){var b=[];P(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var c=b[a];1===c.__CE_state&&this.disconnectedCallback(c)}};z.prototype.f=function(a,b){var c=this;b=b?b:{};var d=b.yb||new Set,e=b.Na||function(a){return c.i(a)},f=[];P(a,function(a){if("link"===a.localName&&
+"import"===a.getAttribute("rel")){var b=a.import;b instanceof Node&&"complete"===b.readyState?(b.__CE_isImportDocument=!0,b.__CE_hasRegistry=!0):a.addEventListener("load",function(){var b=a.import;b.__CE_documentLoadHandled||(b.__CE_documentLoadHandled=!0,b.__CE_isImportDocument=!0,b.__CE_hasRegistry=!0,d.delete(b),c.f(b,{yb:d,Na:e}))})}else f.push(a)},d);if(this.h)for(a=0;a<f.length;a++)this.g(f[a]);for(a=0;a<f.length;a++)e(f[a])};z.prototype.i=function(a){if(void 0===a.__CE_state){var b=this.c(a.localName);
+if(b){b.constructionStack.push(a);var c=b.constructor;try{try{if(new c!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{b.constructionStack.pop()}}catch(f){throw a.__CE_state=2,f;}a.__CE_state=1;a.__CE_definition=b;if(b.attributeChangedCallback)for(b=b.observedAttributes,c=0;c<b.length;c++){var d=b[c],e=a.getAttribute(d);null!==e&&this.attributeChangedCallback(a,d,null,e,null)}n(a)&&this.connectedCallback(a)}}};z.prototype.connectedCallback=function(a){var b=
+a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};z.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};z.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};Ra.prototype.c=function(){this.N&&this.N.disconnect()};Ra.prototype.f=function(a){var b=this.a.readyState;"interactive"!==
+b&&"complete"!==b||this.c();for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)this.b.f(c[d])};Yb.prototype.resolve=function(a){if(this.a)throw Error("Already resolved.");this.a=a;this.b&&this.b(a)};x.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!ad(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.a.c(a))throw Error("A custom element with name '"+a+"' has already been defined.");
+if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var g=d("disconnectedCallback");var h=d("adoptedCallback");var k=d("attributeChangedCallback");var l=b.observedAttributes||[]}catch(cf){return}finally{this.c=
+!1}b={localName:a,constructor:b,connectedCallback:f,disconnectedCallback:g,adoptedCallback:h,attributeChangedCallback:k,observedAttributes:l,constructionStack:[]};this.a.D(a,b);this.g.push(b);this.b||(this.b=!0,this.f(function(){return c.j()}))};x.prototype.j=function(){var a=this;if(!1!==this.b){this.b=!1;for(var b=this.g,c=[],d=new Map,e=0;e<b.length;e++)d.set(b[e].localName,[]);this.a.f(document,{Na:function(b){if(void 0===b.__CE_state){var e=b.localName,f=d.get(e);f?f.push(b):a.a.c(e)&&c.push(b)}}});
+for(e=0;e<c.length;e++)this.a.i(c[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=d.get(f.localName);for(var g=0;g<f.length;g++)this.a.i(f[g]);(e=this.h.get(e))&&e.resolve(void 0)}}};x.prototype.get=function(a){if(a=this.a.c(a))return a.constructor};x.prototype.whenDefined=function(a){if(!ad(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.h.get(a);if(b)return b.c;b=new Yb;this.h.set(a,b);this.a.c(a)&&!this.g.some(function(b){return b.localName===
+a})&&b.resolve(void 0);return b.c};x.prototype.l=function(a){this.i.c();var b=this.f;this.f=function(c){return a(function(){return b(c)})}};window.CustomElementRegistry=x;x.prototype.define=x.prototype.define;x.prototype.get=x.prototype.get;x.prototype.whenDefined=x.prototype.whenDefined;x.prototype.polyfillWrapFlushCallback=x.prototype.l;var Na=window.Document.prototype.createElement,Td=window.Document.prototype.createElementNS,Sd=window.Document.prototype.importNode,Ud=window.Document.prototype.prepend,
+Vd=window.Document.prototype.append,Nb=window.Node.prototype.cloneNode,qa=window.Node.prototype.appendChild,Vb=window.Node.prototype.insertBefore,Oa=window.Node.prototype.removeChild,Wb=window.Node.prototype.replaceChild,Qa=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),Mb=window.Element.prototype.attachShadow,La=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Pa=window.Element.prototype.getAttribute,Ob=window.Element.prototype.setAttribute,Qb=window.Element.prototype.removeAttribute,
+ra=window.Element.prototype.getAttributeNS,Pb=window.Element.prototype.setAttributeNS,Rb=window.Element.prototype.removeAttributeNS,Tb=window.Element.prototype.insertAdjacentElement,Jd=window.Element.prototype.prepend,Kd=window.Element.prototype.append,Md=window.Element.prototype.before,Nd=window.Element.prototype.after,Od=window.Element.prototype.replaceWith,Pd=window.Element.prototype.remove,Xd=window.HTMLElement,Ma=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Sb=window.HTMLElement.prototype.insertAdjacentElement,
+Xb=new function(){},Da=window.customElements;if(!Da||Da.forcePolyfill||"function"!=typeof Da.define||"function"!=typeof Da.get){var na=new z;Wd(na);Rd(na);Qd(na);Id(na);document.__CE_hasRegistry=!0;var Pe=new x(na);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:Pe})}var L={STYLE_RULE:1,ha:7,MEDIA_RULE:4,ua:1E3},G={mb:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,Ea:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Ia:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,
+sb:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,xb:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,rb:/^@[^\s]*keyframes/,Ja:/\s+/g},q=!(window.ShadyDOM&&window.ShadyDOM.inUse);if(window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss)var v=window.ShadyCSS.nativeCss;else window.ShadyCSS?(dd(window.ShadyCSS),window.ShadyCSS=void 0):dd(window.WebComponents&&window.WebComponents.flags);var Ea=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,
+Fa=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Qe=/(--[\w-]+)\s*([:,;)]|$)/gi,Re=/(animation\s*:)|(animation-name\s*:)/,Be=/@media\s(.*)/,Se=/\{[^}]*\}/g,S=null;r.prototype.a=function(a,b,c){a.__styleScoped?a.__styleScoped=null:this.i(a,b||"",c)};r.prototype.i=function(a,b,c){a.nodeType===Node.ELEMENT_NODE&&this.C(a,b,c);if(a="template"===a.localName?(a.content||a.Cb).childNodes:a.children||a.childNodes)for(var d=0;d<a.length;d++)this.i(a[d],b,c)};r.prototype.C=function(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),
+a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var d=a.getAttribute(Te);c?d&&(b=d.replace("style-scope","").replace(b,""),za(a,b)):za(a,(d?d+" ":"")+"style-scope "+b)}};r.prototype.b=function(a,b,c){var d=a.__cssBuild;q||"shady"===d?b=ba(b,c):(a=T(a),b=this.I(b,a.is,a.Z,c)+"\n\n");return b.trim()};r.prototype.I=function(a,b,c,d){var e=this.f(b,c);b=this.h(b);var f=this;return ba(a,function(a){a.c||(f.S(a,b,e),a.c=!0);d&&d(a,b,e)})};r.prototype.h=
+function(a){return a?Ue+a:""};r.prototype.f=function(a,b){return b?"[is="+a+"]":a};r.prototype.S=function(a,b,c){this.j(a,this.g,b,c)};r.prototype.j=function(a,b,c,d){a.selector=a.A=this.l(a,b,c,d)};r.prototype.l=function(a,b,c,d){var e=a.selector.split(td);if(!ed(a)){a=0;for(var f=e.length,g;a<f&&(g=e[a]);a++)e[a]=b.call(this,g,c,d)}return e.join(td)};r.prototype.u=function(a){return a.replace(Db,function(a,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,
+"+"));return":"+c+"("+d+")"})};r.prototype.g=function(a,b,c){var d=this,e=!1;a=a.trim();var f=Db.test(a);f&&(a=a.replace(Db,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=this.u(a));a=a.replace(Ve,Eb+" $1");a=a.replace(We,function(a,f,k){e||(a=d.D(k,f,b,c),e=e||a.stop,f=a.lb,k=a.value);return f+k});f&&(a=this.u(a));return a};r.prototype.D=function(a,b,c,d){var e=a.indexOf(Fb);0<=a.indexOf(Eb)?a=this.H(a,d):0!==e&&(a=c?this.s(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Xe,
+function(a,b){return" > "+b}))}a=a.replace(Ye,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,lb:b,stop:f}};r.prototype.s=function(a,b){a=a.split(ud);a[0]+=b;return a.join(ud)};r.prototype.H=function(a,b){var c=a.match(vd);return(c=c&&c[2].trim()||"")?c[0].match(wd)?a.replace(vd,function(a,c,f){return b+f}):c.split(wd)[0]===b?c:Ze:a.replace(Eb,b)};r.prototype.R=function(a){a.selector=a.parsedSelector;this.v(a);this.j(a,this.L)};r.prototype.v=function(a){a.selector===
+$e&&(a.selector="html")};r.prototype.L=function(a){return a.match(Fb)?this.g(a,xd):this.s(a.trim(),xd)};Jb.Object.defineProperties(r.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Db=/:(nth[-\w]+)\(([^)]+)\)/,xd=":not(.style-scope)",td=",",We=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,wd=/[[.:#*]/,Eb=":host",$e=":root",Fb="::slotted",Ve=new RegExp("^("+Fb+")"),vd=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Xe=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ye=
+/(.*):dir\((?:(ltr|rtl))\)/,Ue=".",ud=":",Te="class",Ze="should_not_match",w=new r;t.get=function(a){return a?a.__styleInfo:null};t.set=function(a,b){return a.__styleInfo=b};t.prototype.c=function(){return this.G};t.prototype._getStyleRules=t.prototype.c;var yd=function(a){return a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}(window.Element.prototype),af=navigator.userAgent.match("Trident");p.prototype.R=function(a){var b=this,
+c={},d=[],e=0;ca(a,function(a){b.c(a);a.index=e++;b.I(a.w.cssText,c)},function(a){d.push(a)});a.b=d;a=[];for(var f in c)a.push(f);return a};p.prototype.c=function(a){if(!a.w){var b={},c={};this.b(a,c)&&(b.F=c,a.rules=null);b.cssText=this.H(a);a.w=b}};p.prototype.b=function(a,b){var c=a.w;if(c){if(c.F)return Object.assign(b,c.F),!0}else{c=a.parsedCssText;for(var d;a=Ea.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}};p.prototype.H=function(a){return this.L(a.parsedCssText)};
+p.prototype.L=function(a){return a.replace(Se,"").replace(Ea,"")};p.prototype.I=function(a,b){for(var c;c=Qe.exec(a);){var d=c[1];":"!==c[2]&&(b[d]=!0)}};p.prototype.ea=function(a){for(var b=Object.getOwnPropertyNames(a),c=0,d;c<b.length;c++)d=b[c],a[d]=this.a(a[d],a)};p.prototype.a=function(a,b){if(a)if(0<=a.indexOf(";"))a=this.f(a,b);else{var c=this;a=gd(a,function(a,e,f,g){if(!e)return a+g;(e=c.a(b[e],b))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=c.a(b[f]||f,b)||f;return a+(e||"")+
+g})}return a&&a.trim()||""};p.prototype.f=function(a,b){a=a.split(";");for(var c=0,d,e;c<a.length;c++)if(d=a[c]){Fa.lastIndex=0;if(e=Fa.exec(d))d=this.a(b[e[1]],b);else if(e=d.indexOf(":"),-1!==e){var f=d.substring(e);f=f.trim();f=this.a(f,b)||f;d=d.substring(0,e)+f}a[c]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return a.join(";")};p.prototype.D=function(a,b){var c="";a.w||this.c(a);a.w.cssText&&(c=this.f(a.w.cssText,b));a.cssText=c};p.prototype.C=function(a,b){var c=a.cssText,d=a.cssText;
+null==a.Ga&&(a.Ga=Re.test(c));if(a.Ga)if(null==a.ca){a.ca=[];for(var e in b)d=b[e],d=d(c),c!==d&&(c=d,a.ca.push(e))}else{for(e=0;e<a.ca.length;++e)d=b[a.ca[e]],c=d(c);d=c}a.cssText=d};p.prototype.da=function(a,b){var c={},d=this,e=[];ca(a,function(a){a.w||d.c(a);var f=a.A||a.parsedSelector;b&&a.w.F&&f&&yd.call(b,f)&&(d.b(a,c),a=a.index,f=parseInt(a/32,10),e[f]=(e[f]||0)|1<<a%32)},null,!0);return{F:c,key:e}};p.prototype.ga=function(a,b,c,d){b.w||this.c(b);if(b.w.F){var e=T(a);a=e.is;e=e.Z;e=a?w.f(a,
+e):"html";var f=b.parsedSelector,g=":host > *"===f||"html"===f,h=0===f.indexOf(":host")&&!g;"shady"===c&&(g=f===e+" > *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));"shadow"===c&&(g=":host > *"===f||"html"===f,h=h&&!g);if(g||h)c=e,h&&(q&&!b.A&&(b.A=w.l(b,w.g,w.h(a),e)),c=b.A||e),d({wb:c,qb:h,Fb:g})}};p.prototype.S=function(a,b){var c={},d={},e=this,f=b&&b.__cssBuild;ca(b,function(b){e.ga(a,b,f,function(f){yd.call(a.Db||a,f.wb)&&(f.qb?e.b(b,c):e.b(b,d))})},null,!0);return{ub:d,pb:c}};p.prototype.fa=
+function(a,b,c){var d=this,e=T(a),f=w.f(e.is,e.Z),g=new RegExp("(?:^|[^.#[:])"+(a.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");e=t.get(a).G;var h=this.h(e,c);return w.b(a,e,function(a){d.D(a,b);q||ed(a)||!a.cssText||(d.C(a,h),d.l(a,g,f,c))})};p.prototype.h=function(a,b){a=a.b;var c={};if(!q&&a)for(var d=0,e=a[d];d<a.length;e=a[++d])this.j(e,b),c[e.keyframesName]=this.i(e);return c};p.prototype.i=function(a){return function(b){return b.replace(a.f,a.a)}};p.prototype.j=function(a,b){a.f=new RegExp(a.keyframesName,
+"g");a.a=a.keyframesName+"-"+b;a.A=a.A||a.selector;a.selector=a.A.replace(a.keyframesName,a.a)};p.prototype.l=function(a,b,c,d){a.A=a.A||a.selector;d="."+d;for(var e=a.A.split(","),f=0,g=e.length,h;f<g&&(h=e[f]);f++)e[f]=h.match(b)?h.replace(c,d):d+" "+h;a.selector=e.join(",")};p.prototype.u=function(a,b,c){var d=a.getAttribute("class")||"",e=d;c&&(e=d.replace(new RegExp("\\s*x-scope\\s*"+c+"\\s*","g")," "));e+=(e?" ":"")+"x-scope "+b;d!==e&&za(a,e)};p.prototype.v=function(a,b,c,d){b=d?d.textContent||
+"":this.fa(a,b,c);var e=t.get(a),f=e.a;f&&!q&&f!==d&&(f._useCount--,0>=f._useCount&&f.parentNode&&f.parentNode.removeChild(f));q?e.a?(e.a.textContent=b,d=e.a):b&&(d=ub(b,c,a.shadowRoot,e.b)):d?d.parentNode||(af&&-1<b.indexOf("@media")&&(d.textContent=b),fd(d,null,e.b)):b&&(d=ub(b,c,null,e.b));d&&(d._useCount=d._useCount||0,e.a!=d&&d._useCount++,e.a=d);return d};p.prototype.s=function(a,b){var c=ya(a),d=this;a.textContent=ba(c,function(a){var c=a.cssText=a.parsedCssText;a.w&&a.w.cssText&&(c=c.replace(G.Ea,
+"").replace(G.Ia,""),a.cssText=d.f(c,b))})};Jb.Object.defineProperties(p.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var O=new p,Gb={},Ga=window.customElements;if(Ga&&!q){var bf=Ga.define;Ga.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,(S?S.nextSibling:null)||e.firstChild);S=d;Gb[a]=d;return bf.call(Ga,a,b,c)}}pa.prototype.a=function(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(a.F[e]!==
+b[e])return!1}return!0};pa.prototype.b=function(a,b,c,d){var e=this.cache[a]||[];e.push({F:b,styleElement:c,B:d});e.length>this.c&&e.shift();this.cache[a]=e};pa.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d];if(this.a(e,b,c))return e}};if(!q){var zd=new MutationObserver(hd),Ad=function(a){zd.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)Ad(document);else{var Hb=function(){Ad(document.body)};
+window.HTMLImports?window.HTMLImports.whenReady(Hb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){Hb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else Hb()})}Lb=function(){hd(zd.takeRecords())}}var Aa={},Ee=Promise.resolve(),vb=null,jd=window.HTMLImports&&window.HTMLImports.whenReady||null,wb,Ha=null,oa=null;F.prototype.Fa=function(){!this.enqueued&&oa&&(this.enqueued=!0,Kb(oa))};F.prototype.b=function(a){a.__seenByShadyCSS||
+(a.__seenByShadyCSS=!0,this.customStyles.push(a),this.Fa())};F.prototype.a=function(a){return a.__shadyCSSCachedStyle?a.__shadyCSSCachedStyle:a.getStyle?a.getStyle():a};F.prototype.c=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var c=a[b];if(!c.__shadyCSSCachedStyle){var d=this.a(c);d&&(d=d.__appliedElement||d,Ha&&Ha(d),c.__shadyCSSCachedStyle=d)}}return a};F.prototype.addCustomStyle=F.prototype.b;F.prototype.getStyleForCustomStyle=F.prototype.a;F.prototype.processStyles=F.prototype.c;
+Object.defineProperties(F.prototype,{transformCallback:{get:function(){return Ha},set:function(a){Ha=a}},validateCallback:{get:function(){return oa},set:function(a){var b=!1;oa||(b=!0);oa=a;b&&this.Fa()}}});var Bd=new pa;k.prototype.C=function(){Lb()};k.prototype.S=function(a){var b=this.s[a]=(this.s[a]||0)+1;return a+"-"+b};k.prototype.Ra=function(a){return ya(a)};k.prototype.Ta=function(a){return ba(a)};k.prototype.R=function(a){a=a.content.querySelectorAll("style");for(var b=[],c=0;c<a.length;c++){var d=
+a[c];b.push(d.textContent);d.parentNode.removeChild(d)}return b.join("").trim()};k.prototype.ea=function(a){return(a=a.content.querySelector("style"))?a.getAttribute("css-build")||"":""};k.prototype.prepareTemplate=function(a,b,c){if(!a.f){a.f=!0;a.name=b;a.extends=c;Aa[b]=a;var d=this.ea(a),e=this.R(a);c={is:b,extends:c,Ab:d};q||w.a(a.content,b);this.c();var f=Fa.test(e)||Ea.test(e);Fa.lastIndex=0;Ea.lastIndex=0;e=tb(e);f&&v&&this.a&&this.a.transformRules(e,b);a._styleAst=e;a.g=d;d=[];v||(d=O.R(a._styleAst));
+if(!d.length||v)b=this.da(c,a._styleAst,q?a.content:null,Gb[b]),a.a=b;a.c=d}};k.prototype.da=function(a,b,c,d){b=w.b(a,b);if(b.length)return ub(b,a.is,c,d)};k.prototype.ga=function(a){var b=T(a),c=b.is;b=b.Z;var d=Gb[c];c=Aa[c];if(c){var e=c._styleAst;var f=c.c}return t.set(a,new t(e,d,f,0,b))};k.prototype.H=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=Ce)};k.prototype.I=function(){var a=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&
+(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(b){a.v(b)},this.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.i)&&a.f()})})};k.prototype.c=function(){this.H();this.I()};k.prototype.f=function(){this.c();if(this.b){var a=this.b.processStyles();this.b.enqueued&&(v?this.Pa(a):(this.u(this.g,this.h),this.D(a)),this.b.enqueued=!1,this.i&&!v&&this.styleDocument())}};k.prototype.styleElement=function(a,b){var c=T(a).is,d=t.get(a);d||(d=this.ga(a));
+this.j(a)||(this.i=!0);b&&(d.P=d.P||{},Object.assign(d.P,b));if(v){if(d.P){b=d.P;for(var e in b)null===e?a.style.removeProperty(e):a.style.setProperty(e,b[e])}if(((e=Aa[c])||this.j(a))&&e&&e.a&&!id(e)){if(id(e)||e._applyShimValidatingVersion!==e._applyShimNextVersion)this.c(),this.a&&this.a.transformRules(e._styleAst,c),e.a.textContent=w.b(a,d.G),De(e);q&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=w.b(a,d.G));d.G=e._styleAst}}else this.u(a,d),d.ra&&d.ra.length&&this.L(a,d)};k.prototype.l=
+function(a){return(a=a.getRootNode().host)?t.get(a)?a:this.l(a):this.g};k.prototype.j=function(a){return a===this.g};k.prototype.L=function(a,b){var c=T(a).is,d=Bd.fetch(c,b.K,b.ra),e=d?d.styleElement:null,f=b.B;b.B=d&&d.B||this.S(c);e=O.v(a,b.K,b.B,e);q||O.u(a,b.B,f);d||Bd.b(c,b.K,e,b.B)};k.prototype.u=function(a,b){var c=this.l(a),d=t.get(c);c=Object.create(d.K||null);var e=O.S(a,b.G);a=O.da(d.G,a).F;Object.assign(c,e.pb,a,e.ub);this.fa(c,b.P);O.ea(c);b.K=c};k.prototype.fa=function(a,b){for(var c in b){var d=
+b[c];if(d||0===d)a[c]=d}};k.prototype.styleDocument=function(a){this.styleSubtree(this.g,a)};k.prototype.styleSubtree=function(a,b){var c=a.shadowRoot;(c||this.j(a))&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};k.prototype.Pa=function(a){for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&this.Oa(c)}};k.prototype.D=function(a){for(var b=
+0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&O.s(c,this.h.K)}};k.prototype.v=function(a){var b=this,c=ya(a);ca(c,function(a){q?w.v(a):w.R(a);v&&(b.c(),b.a&&b.a.transformRule(a))});v?a.textContent=ba(c):this.h.G.rules.push(c)};k.prototype.Oa=function(a){if(v&&this.a){var b=ya(a);this.c();this.a.transformRules(b);a.textContent=ba(b)}};k.prototype.getComputedStyleValue=function(a,b){var c;v||(c=(t.get(a)||t.get(this.l(a))).K[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?
+c.trim():""};k.prototype.Sa=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d){d=d.split(/\s/);for(var e=0;e<d.length;e++)if(d[e]===w.c){c=d[e+1];break}}}c&&b.push(w.c,c);v||(c=t.get(a))&&c.B&&b.push(O.g,c.B);za(a,b.join(" "))};k.prototype.Qa=function(a){return t.get(a)};k.prototype.flush=k.prototype.C;k.prototype.prepareTemplate=k.prototype.prepareTemplate;k.prototype.styleElement=k.prototype.styleElement;k.prototype.styleDocument=
+k.prototype.styleDocument;k.prototype.styleSubtree=k.prototype.styleSubtree;k.prototype.getComputedStyleValue=k.prototype.getComputedStyleValue;k.prototype.setElementClass=k.prototype.Sa;k.prototype._styleInfoForNode=k.prototype.Qa;k.prototype.transformCustomStyleForDocument=k.prototype.v;k.prototype.getStyleAst=k.prototype.Ra;k.prototype.styleAstToString=k.prototype.Ta;k.prototype.flushCustomStyles=k.prototype.f;Object.defineProperties(k.prototype,{nativeShadow:{get:function(){return q}},nativeCss:{get:function(){return v}}});
+var J=new k;if(window.ShadyCSS){var Cd=window.ShadyCSS.ApplyShim;var Dd=window.ShadyCSS.CustomStyleInterface}window.ShadyCSS={ScopingShim:J,prepareTemplate:function(a,b,c){J.f();J.prepareTemplate(a,b,c)},styleSubtree:function(a,b){J.f();J.styleSubtree(a,b)},styleElement:function(a){J.f();J.styleElement(a)},styleDocument:function(a){J.f();J.styleDocument(a)},getComputedStyleValue:function(a,b){return J.getComputedStyleValue(a,b)},nativeCss:v,nativeShadow:q};Cd&&(window.ShadyCSS.ApplyShim=Cd);Dd&&(window.ShadyCSS.CustomStyleInterface=
+Dd);var Ib=window.customElements,Ia=window.HTMLImports;window.WebComponents=window.WebComponents||{};if(Ib&&Ib.polyfillWrapFlushCallback){var Ja,Ed=function(){if(Ja){var a=Ja;Ja=null;a();return!0}},Fd=Ia.whenReady;Ib.polyfillWrapFlushCallback(function(a){Ja=a;Fd(Ed)});Ia.whenReady=function(a){Fd(function(){Ed()?Ia.whenReady(a):a()})}}Ia.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})});
+var Gd=document.createElement("style");Gd.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var Hd=document.querySelector("head");Hd.insertBefore(Gd,Hd.firstChild)})();}).call(this);
 
 //# sourceMappingURL=webcomponents-lite.js.map
diff --git a/homeassistant/components/frontend/www_static/webcomponents-lite.js.gz b/homeassistant/components/frontend/www_static/webcomponents-lite.js.gz
index daf3276518ce50410d99add54444017ba6184175..fb59845b7e7d0f4098b9cc640279f6d5a71ddc5a 100644
Binary files a/homeassistant/components/frontend/www_static/webcomponents-lite.js.gz and b/homeassistant/components/frontend/www_static/webcomponents-lite.js.gz differ