function e(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function o(e,o){for(;!Object.prototype.hasOwnProperty.call(e,o)&&null!==(e=t(e)););return e}function r(){return r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=o(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},r.apply(this,arguments)}function i(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o=0;n--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,i[n])(s)||s);e=l.element,this.addElementPlacement(e,t),l.finisher&&r.push(l.finisher);var d=l.extras;if(d){for(var c=0;c=0;r--){var i=this.fromClassDescriptor(e),n=this.toClassDescriptor((0,t[r])(i)||i);if(void 0!==n.finisher&&o.push(n.finisher),void 0!==n.elements){e=n.elements;for(var a=0;anew f("string"==typeof e?e:e+"",g),v=(e,...t)=>{const o=1===e.length?e[0]:t.reduce(((t,o,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[r+1]),e[0]);return new f(o,g)},b=h?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return y(t)})(e):e;var C;const A=window.trustedTypes,H=A?A.emptyScript:"",w=window.reactiveElementPolyfillSupport,k={toAttribute(e,t){switch(t){case Boolean:e=e?H:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=null!==e;break;case Number:o=null===e?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch(e){o=null}}return o}},L=(e,t)=>t!==e&&(t==t||e==e),S={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:L};class V extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,o)=>{const r=this._$Eh(o,t);void 0!==r&&(this._$Eu.set(r,o),e.push(r))})),e}static createProperty(e,t=S){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const o="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,o,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){return{get(){return this[t]},set(r){const i=this[e];this[t]=r,this.requestUpdate(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||S}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of t)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const e of o)t.unshift(b(e))}else void 0!==e&&t.push(b(e));return t}static _$Eh(e,t){const o=t.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,o;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(o=e.hostConnected)||void 0===o||o.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{h?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const o=document.createElement("style"),r=window.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=t.cssText,e.appendChild(o)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ES(e,t,o=S){var r,i;const n=this.constructor._$Eh(e,o);if(void 0!==n&&!0===o.reflect){const a=(null!==(i=null===(r=o.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==i?i:k.toAttribute)(t,o.type);this._$Ei=e,null==a?this.removeAttribute(n):this.setAttribute(n,a),this._$Ei=null}}_$AK(e,t){var o,r,i;const n=this.constructor,a=n._$Eu.get(e);if(void 0!==a&&this._$Ei!==a){const e=n.getPropertyOptions(a),s=e.converter,l=null!==(i=null!==(r=null===(o=s)||void 0===o?void 0:o.fromAttribute)&&void 0!==r?r:"function"==typeof s?s:null)&&void 0!==i?i:k.fromAttribute;this._$Ei=a,this[a]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,o){let r=!0;void 0!==e&&(((o=o||this.constructor.getPropertyOptions(e)).hasChanged||L)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===o.reflect&&this._$Ei!==e&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(e,o))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((e,t)=>this[t]=e)),this._$Et=void 0);let t=!1;const o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),null===(e=this._$Eg)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(o)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(o)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$E_&&(this._$E_.forEach(((e,t)=>this._$ES(t,this[t],e))),this._$E_=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var x;V.finalized=!0,V.elementProperties=new Map,V.elementStyles=[],V.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:V}),(null!==(C=globalThis.reactiveElementVersions)&&void 0!==C?C:globalThis.reactiveElementVersions=[]).push("1.2.1");const M=globalThis.trustedTypes,E=M?M.createPolicy("lit-html",{createHTML:e=>e}):void 0,P=`lit$${(Math.random()+"").slice(9)}$`,z="?"+P,T=`<${z}>`,j=document,N=(e="")=>j.createComment(e),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,I=Array.isArray,R=e=>{var t;return I(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,$=/>/g,F=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,U=/'/g,Z=/"/g,q=/^(?:script|style|textarea)$/i,G=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),K=G(1),Y=G(2),W=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),J=new WeakMap,Q=(e,t,o)=>{var r,i;const n=null!==(r=null==o?void 0:o.renderBefore)&&void 0!==r?r:t;let a=n._$litPart$;if(void 0===a){const e=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:null;n._$litPart$=a=new ne(t.insertBefore(N(),e),e,void 0,null!=o?o:{})}return a._$AI(e),a},ee=j.createTreeWalker(j,129,null,!1),te=(e,t)=>{const o=e.length-1,r=[];let i,n=2===t?"":"",a=D;for(let t=0;t"===l[0]?(a=null!=i?i:D,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?F:'"'===l[3]?Z:U):a===Z||a===U?a=F:a===B||a===$?a=D:(a=F,i=void 0);const p=a===F&&e[t+1].startsWith("/>")?" ":"";n+=a===D?o+T:d>=0?(r.push(s),o.slice(0,d)+"$lit$"+o.slice(d)+P+p):o+P+(-2===d?(r.push(void 0),t):p)}const s=n+(e[o]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==E?E.createHTML(s):s,r]};class oe{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let i=0,n=0;const a=e.length-1,s=this.parts,[l,d]=te(e,t);if(this.el=oe.createElement(l,o),ee.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=ee.nextNode())&&s.length0){r.textContent=M?M.emptyScript:"";for(let o=0;o2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=X}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,o,r){const i=this.strings;let n=!1;if(void 0===i)e=re(this,e,t,0),n=!O(e)||e!==this._$AH&&e!==W,n&&(this._$AH=e);else{const r=e;let a,s;for(e=i[0],a=0;at=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:o,elements:r}=t;return{kind:o,elements:r,finisher(t){window.customElements.define(e,t)}}})(e,t),ve=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(o){o.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(o){o.createProperty(t.key,e)}};function be(e){return(t,o)=>void 0!==o?((e,t,o)=>{t.constructor.createProperty(o,e)})(e,t,o):ve(e,t)}function Ce(e){return be({...e,state:!0})}const Ae=({finisher:e,descriptor:t})=>(o,r)=>{var i;if(void 0===r){const r=null!==(i=o.originalKey)&&void 0!==i?i:o.key,n=null!=t?{kind:"method",placement:"prototype",key:r,descriptor:t(o.key)}:{...o,key:r};return null!=e&&(n.finisher=function(t){e(t,r)}),n}{const i=o.constructor;void 0!==t&&Object.defineProperty(o,r,t(r)),null==e||e(i,r)}};function He(e){return Ae({finisher:(t,o)=>{Object.assign(t.prototype[o],e)}})}function we(e,t){return Ae({descriptor:o=>{const r={get(){var t,o;return null!==(o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==o?o:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof o?Symbol():"__"+o;r.get=function(){var o,r;return void 0===this[t]&&(this[t]=null!==(r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(e))&&void 0!==r?r:null),this[t]}}return r}})}function ke(e){return Ae({descriptor:t=>({async get(){var t;return await this.updateComplete,null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0})})}var Le;const Se=null!=(null===(Le=window.HTMLSlotElement)||void 0===Le?void 0:Le.prototype.assignedElements)?(e,t)=>e.assignedElements(t):(e,t)=>e.assignedNodes(t).filter((e=>e.nodeType===Node.ELEMENT_NODE));function Ve(e){const{slot:t,selector:o}=null!=e?e:{};return Ae({descriptor:r=>({get(){var r;const i="slot"+(t?`[name=${t}]`:":not([name])"),n=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(i),a=null!=n?Se(n,e):[];return o?a.filter((e=>e.matches(o))):a},enumerable:!0,configurable:!0})})}const xe={"primary-background-color":"#111111","card-background-color":"#1c1c1c","secondary-background-color":"#202020","primary-text-color":"#e1e1e1","secondary-text-color":"#9b9b9b","disabled-text-color":"#6f6f6f","app-header-text-color":"#e1e1e1","app-header-background-color":"#101e24","switch-unchecked-button-color":"#999999","switch-unchecked-track-color":"#9b9b9b","divider-color":"rgba(225, 225, 225, .12)","mdc-ripple-color":"#AAAAAA","input-idle-line-color":"rgba(255, 255, 255, 0.42)","input-hover-line-color":"rgba(255, 255, 255, 0.87)","input-disabled-line-color":"rgba(255, 255, 255, 0.06)","input-outlined-idle-border-color":"rgba(255, 255, 255, 0.38)","input-outlined-hover-border-color":"rgba(255, 255, 255, 0.87)","input-outlined-disabled-border-color":"rgba(255, 255, 255, 0.06)","input-fill-color":"rgba(255, 255, 255, 0.05)","input-disabled-fill-color":"rgba(255, 255, 255, 0.02)","input-ink-color":"rgba(255, 255, 255, 0.87)","input-label-ink-color":"rgba(255, 255, 255, 0.6)","input-disabled-ink-color":"rgba(255, 255, 255, 0.37)","input-dropdown-icon-color":"rgba(255, 255, 255, 0.54)","codemirror-keyword":"#C792EA","codemirror-operator":"#89DDFF","codemirror-variable":"#f07178","codemirror-variable-2":"#EEFFFF","codemirror-variable-3":"#DECB6B","codemirror-builtin":"#FFCB6B","codemirror-atom":"#F78C6C","codemirror-number":"#FF5370","codemirror-def":"#82AAFF","codemirror-string":"#C3E88D","codemirror-string-2":"#f07178","codemirror-comment":"#545454","codemirror-tag":"#FF5370","codemirror-meta":"#FFCB6B","codemirror-attribute":"#C792EA","codemirror-property":"#C792EA","codemirror-qualifier":"#DECB6B","codemirror-type":"#DECB6B","energy-grid-return-color":"#a280db","map-filter":"invert(.9) hue-rotate(170deg) brightness(1.5) contrast(1.2) saturate(.3)"},Me={"state-icon-error-color":"var(--error-state-color, var(--error-color))","state-unavailable-color":"var(--state-icon-unavailable-color, var(--disabled-text-color))","sidebar-text-color":"var(--primary-text-color)","sidebar-background-color":"var(--card-background-color)","sidebar-selected-text-color":"var(--primary-color)","sidebar-selected-icon-color":"var(--primary-color)","sidebar-icon-color":"rgba(var(--rgb-primary-text-color), 0.6)","switch-checked-color":"var(--primary-color)","switch-checked-button-color":"var(--switch-checked-color, var(--primary-background-color))","switch-checked-track-color":"var(--switch-checked-color, #000000)","switch-unchecked-button-color":"var(--switch-unchecked-color, var(--primary-background-color))","switch-unchecked-track-color":"var(--switch-unchecked-color, #000000)","slider-color":"var(--primary-color)","slider-secondary-color":"var(--light-primary-color)","slider-track-color":"var(--scrollbar-thumb-color)","label-badge-background-color":"var(--card-background-color)","label-badge-text-color":"rgba(var(--rgb-primary-text-color), 0.8)","paper-listbox-background-color":"var(--card-background-color)","paper-item-icon-color":"var(--state-icon-color)","paper-item-icon-active-color":"var(--state-icon-active-color)","table-row-background-color":"var(--primary-background-color)","table-row-alternative-background-color":"var(--secondary-background-color)","paper-slider-knob-color":"var(--slider-color)","paper-slider-knob-start-color":"var(--slider-color)","paper-slider-pin-color":"var(--slider-color)","paper-slider-pin-start-color":"var(--slider-color)","paper-slider-active-color":"var(--slider-color)","paper-slider-secondary-color":"var(--slider-secondary-color)","paper-slider-container-color":"var(--slider-track-color)","data-table-background-color":"var(--card-background-color)","markdown-code-background-color":"var(--primary-background-color)","mdc-theme-primary":"var(--primary-color)","mdc-theme-secondary":"var(--accent-color)","mdc-theme-background":"var(--primary-background-color)","mdc-theme-surface":"var(--card-background-color)","mdc-theme-on-primary":"var(--text-primary-color)","mdc-theme-on-secondary":"var(--text-primary-color)","mdc-theme-on-surface":"var(--primary-text-color)","mdc-theme-text-disabled-on-light":"var(--disabled-text-color)","mdc-theme-text-primary-on-background":"var(--primary-text-color)","mdc-theme-text-secondary-on-background":"var(--secondary-text-color)","mdc-theme-text-hint-on-background":"var(--secondary-text-color)","mdc-theme-text-icon-on-background":"var(--secondary-text-color)","mdc-theme-error":"var(--error-color)","app-header-text-color":"var(--text-primary-color)","app-header-background-color":"var(--primary-color)","mdc-checkbox-unchecked-color":"rgba(var(--rgb-primary-text-color), 0.54)","mdc-checkbox-disabled-color":"var(--disabled-text-color)","mdc-radio-unchecked-color":"rgba(var(--rgb-primary-text-color), 0.54)","mdc-radio-disabled-color":"var(--disabled-text-color)","mdc-tab-text-label-color-default":"var(--primary-text-color)","mdc-button-disabled-ink-color":"var(--disabled-text-color)","mdc-button-outline-color":"var(--divider-color)","mdc-dialog-scroll-divider-color":"var(--divider-color)","mdc-text-field-idle-line-color":"var(--input-idle-line-color)","mdc-text-field-hover-line-color":"var(--input-hover-line-color)","mdc-text-field-disabled-line-color":"var(--input-disabled-line-color)","mdc-text-field-outlined-idle-border-color":"var(--input-outlined-idle-border-color)","mdc-text-field-outlined-hover-border-color":"var(--input-outlined-hover-border-color)","mdc-text-field-outlined-disabled-border-color":"var(--input-outlined-disabled-border-color)","mdc-text-field-fill-color":"var(--input-fill-color)","mdc-text-field-disabled-fill-color":"var(--input-disabled-fill-color)","mdc-text-field-ink-color":"var(--input-ink-color)","mdc-text-field-label-ink-color":"var(--input-label-ink-color)","mdc-text-field-disabled-ink-color":"var(--input-disabled-ink-color)","mdc-select-idle-line-color":"var(--input-idle-line-color)","mdc-select-hover-line-color":"var(--input-hover-line-color)","mdc-select-outlined-idle-border-color":"var(--input-outlined-idle-border-color)","mdc-select-outlined-hover-border-color":"var(--input-outlined-hover-border-color)","mdc-select-outlined-disabled-border-color":"var(--input-outlined-disabled-border-color)","mdc-select-fill-color":"var(--input-fill-color)","mdc-select-disabled-fill-color":"var(--input-disabled-fill-color)","mdc-select-ink-color":"var(--input-ink-color)","mdc-select-label-ink-color":"var(--input-label-ink-color)","mdc-select-disabled-ink-color":"var(--input-disabled-ink-color)","mdc-select-dropdown-icon-color":"var(--input-dropdown-icon-color)","mdc-select-disabled-dropdown-icon-color":"var(--input-disabled-ink-color)","chip-background-color":"rgba(var(--rgb-primary-text-color), 0.15)","material-body-text-color":"var(--primary-text-color)","material-background-color":"var(--card-background-color)","material-secondary-background-color":"var(--secondary-background-color)","material-secondary-text-color":"var(--secondary-text-color)"},Ee=v` button.link { background: none; color: inherit; border: none; padding: 0; font: inherit; text-align: left; text-decoration: underline; cursor: pointer; outline: none; } `,Pe=v` :host { font-family: var(--paper-font-body1_-_font-family); -webkit-font-smoothing: var(--paper-font-body1_-_-webkit-font-smoothing); font-size: var(--paper-font-body1_-_font-size); font-weight: var(--paper-font-body1_-_font-weight); line-height: var(--paper-font-body1_-_line-height); } app-header-layout, ha-app-layout { background-color: var(--primary-background-color); } app-header, app-toolbar { background-color: var(--app-header-background-color); font-weight: 400; color: var(--app-header-text-color, white); } app-toolbar { height: var(--header-height); border-bottom: var(--app-header-border-bottom); box-sizing: border-box; } app-header div[sticky] { height: 48px; } app-toolbar [main-title] { margin-left: 20px; } h1 { font-family: var(--paper-font-headline_-_font-family); -webkit-font-smoothing: var(--paper-font-headline_-_-webkit-font-smoothing); white-space: var(--paper-font-headline_-_white-space); overflow: var(--paper-font-headline_-_overflow); text-overflow: var(--paper-font-headline_-_text-overflow); font-size: var(--paper-font-headline_-_font-size); font-weight: var(--paper-font-headline_-_font-weight); line-height: var(--paper-font-headline_-_line-height); } h2 { font-family: var(--paper-font-title_-_font-family); -webkit-font-smoothing: var(--paper-font-title_-_-webkit-font-smoothing); white-space: var(--paper-font-title_-_white-space); overflow: var(--paper-font-title_-_overflow); text-overflow: var(--paper-font-title_-_text-overflow); font-size: var(--paper-font-title_-_font-size); font-weight: var(--paper-font-title_-_font-weight); line-height: var(--paper-font-title_-_line-height); } h3 { font-family: var(--paper-font-subhead_-_font-family); -webkit-font-smoothing: var(--paper-font-subhead_-_-webkit-font-smoothing); white-space: var(--paper-font-subhead_-_white-space); overflow: var(--paper-font-subhead_-_overflow); text-overflow: var(--paper-font-subhead_-_text-overflow); font-size: var(--paper-font-subhead_-_font-size); font-weight: var(--paper-font-subhead_-_font-weight); line-height: var(--paper-font-subhead_-_line-height); } a { color: var(--primary-color); } .secondary { color: var(--secondary-text-color); } .error { color: var(--error-color); } .warning { color: var(--error-color); } mwc-button.warning { --mdc-theme-primary: var(--error-color); } ${Ee} .card-actions a { text-decoration: none; } .card-actions .warning { --mdc-theme-primary: var(--error-color); } .layout.horizontal, .layout.vertical { display: flex; } .layout.inline { display: inline-flex; } .layout.horizontal { flex-direction: row; } .layout.vertical { flex-direction: column; } .layout.wrap { flex-wrap: wrap; } .layout.no-wrap { flex-wrap: nowrap; } .layout.center, .layout.center-center { align-items: center; } .layout.bottom { align-items: flex-end; } .layout.center-justified, .layout.center-center { justify-content: center; } .flex { flex: 1; flex-basis: 0.000000001px; } .flex-auto { flex: 1 1 auto; } .flex-none { flex: none; } .layout.justified { justify-content: space-between; } `,ze=v` /* mwc-dialog (ha-dialog) styles */ ha-dialog { --mdc-dialog-min-width: 400px; --mdc-dialog-max-width: 600px; --mdc-dialog-heading-ink-color: var(--primary-text-color); --mdc-dialog-content-ink-color: var(--primary-text-color); --justify-action-buttons: space-between; } ha-dialog .form { color: var(--primary-text-color); } a { color: var(--primary-color); } /* make dialog fullscreen on small screens */ @media all and (max-width: 450px), all and (max-height: 500px) { ha-dialog { --mdc-dialog-min-width: calc( 100vw - env(safe-area-inset-right) - env(safe-area-inset-left) ); --mdc-dialog-max-width: calc( 100vw - env(safe-area-inset-right) - env(safe-area-inset-left) ); --mdc-dialog-min-height: 100%; --mdc-dialog-max-height: 100%; --vertial-align-dialog: flex-end; --ha-dialog-border-radius: 0px; } } mwc-button.warning { --mdc-theme-primary: var(--error-color); } .error { color: var(--error-color); } `;v` .ha-scrollbar::-webkit-scrollbar { width: 0.4rem; height: 0.4rem; } .ha-scrollbar::-webkit-scrollbar-thumb { -webkit-border-radius: 4px; border-radius: 4px; background: var(--scrollbar-thumb-color); } .ha-scrollbar { overflow-y: auto; scrollbar-color: var(--scrollbar-thumb-color) transparent; scrollbar-width: thin; } `,v` body { background-color: var(--primary-background-color); color: var(--primary-text-color); height: calc(100vh - 32px); width: 100vw; } `;const Te=e=>{if(6===(e=e.replace("#","")).length)return e;let t="";for(const o of e)t+=o+o;return t},je=e=>{const t=Math.round(Math.min(Math.max(e,0),255)).toString(16);return 1===t.length?`0${t}`:t},Ne=e=>(e=Te(e),[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]),Oe=e=>`#${je(e[0])}${je(e[1])}${je(e[2])}`,Ie=.137931034,Re=.12841855,De=e=>(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4,Be=e=>e>.008856452?e**(1/3):e/Re+Ie,$e=e=>255*(e<=.00304?12.92*e:1.055*e**(1/2.4)-.055),Fe=e=>e>.206896552?e*e*e:Re*(e-Ie),Ue=e=>{const[t,o,r]=(e=>{let[t,o,r]=e;return t=De(t),o=De(o),r=De(r),[Be((.4124564*t+.3575761*o+.1804375*r)/.95047),Be((.2126729*t+.7151522*o+.072175*r)/1),Be((.0193339*t+.119192*o+.9503041*r)/1.08883)]})(e),i=116*o-16;return[i<0?0:i,500*(t-o),200*(o-r)]},Ze=e=>{const[t,o,r]=e;let i=(t+16)/116,n=isNaN(o)?i:i+o/500,a=isNaN(r)?i:i-r/200;i=1*Fe(i),n=.95047*Fe(n),a=1.08883*Fe(a);return[$e(3.2404542*n-1.5371385*i-.4985314*a),$e(-.969266*n+1.8760108*i+.041556*a),$e(.0556434*n-.2040259*i+1.0572252*a)]},qe=(e,t=1)=>[e[0]-18*t,e[1],e[2]],Ge=e=>{const t=[0,0,0];for(let o=0;o{const o=Ge(e),r=Ge(t);return o>r?(o+.05)/(r+.05):(r+.05)/(o+.05)};let Ye={};const We=(e,t,o,r,i)=>{var n,a;const s=o||(i?t.theme:void 0),l=r&&void 0!==(null==r?void 0:r.dark)?null==r?void 0:r.dark:t.darkMode;let d=s,c={};if(s&&l&&(d=`${d}__dark`,c={...xe}),"default"===s){var p;const t=null==r?void 0:r.primaryColor,o=null==r?void 0:r.accentColor;if(l&&t&&(c["app-header-background-color"]=((e,t,o=50)=>{let r="";e=Te(e),t=Te(t);for(let i=0;i<=5;i+=2){const n=parseInt(e.substr(i,2),16),a=parseInt(t.substr(i,2),16);let s=Math.floor(a+o/100*(n-a)).toString(16);for(;s.length<2;)s="0"+s;r+=s}return`#${r}`})(t,"#121212",8)),t){d=`${d}__primary_${t}`;const e=Ne(t),o=Ue(e);c["primary-color"]=t;const r=Ze(((e,t=1)=>qe(e,-t))(o));c["light-primary-color"]=Oe(r),c["dark-primary-color"]=(e=>{const t=Ze(e);return Oe(t)})(qe(o)),c["text-primary-color"]=Ke(e,[33,33,33])<6?"#fff":"#212121",c["text-light-primary-color"]=Ke(r,[33,33,33])<6?"#fff":"#212121",c["state-icon-color"]=c["dark-primary-color"]}if(o){d=`${d}__accent_${o}`,c["accent-color"]=o;const e=Ne(o);c["text-accent-color"]=Ke(e,[33,33,33])<6?"#fff":"#212121"}if((null===(p=e._themes)||void 0===p?void 0:p.cacheKey)===d)return}if(s&&"default"!==s&&t.themes[s]){const{modes:e,...o}=t.themes[s];c={...c,...o},e&&(c=l?{...c,...e.dark}:{...c,...e.light})}if(!(null!==(n=e._themes)&&void 0!==n&&n.keys||Object.keys(c).length))return;const u=Object.keys(c).length&&d?Ye[d]||Xe(d,c):void 0,m={...null===(a=e._themes)||void 0===a?void 0:a.keys,...null==u?void 0:u.styles};e._themes={cacheKey:d,keys:null==u?void 0:u.keys},e.updateStyles?e.updateStyles(m):window.ShadyCSS&&window.ShadyCSS.styleSubtree(e,m)},Xe=(e,t)=>{if(!t||!Object.keys(t).length)return;const o={...Me,...t},r={},i={};for(const e of Object.keys(o)){const t=`--${e}`,n=String(o[e]);if(r[t]=n,i[t]="",!n.startsWith("#"))continue;const a=`rgb-${e}`;if(void 0===o[a])try{const e=Ne(n).join(","),t=`--${a}`;r[t]=e,i[t]=""}catch(e){continue}}return Ye[e]={styles:r,keys:i},{styles:r,keys:i}},Je="ha-main-window"===window.name?window:"ha-main-window"===parent.name?parent:top,Qe=(e,t,o,r)=>{r=r||{},o=null==o?{}:o;const i=new Event(t,{bubbles:void 0===r.bubbles||r.bubbles,cancelable:Boolean(r.cancelable),composed:void 0===r.composed||r.composed});return i.detail=o,e.dispatchEvent(i),i},et=(e,t,o=true)=>{var r;if(!e||e===document.body)return null;if((e=null!==(r=e.assignedSlot)&&void 0!==r?r:e).parentElement)e=e.parentElement;else{const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:null}return(o?Object.prototype.hasOwnProperty.call(e,t):e&&t in e)?e:et(e,t,o)},tt=(e=document)=>{var t,o;return null!==(t=e.activeElement)&&void 0!==t&&null!==(o=t.shadowRoot)&&void 0!==o&&o.activeElement?tt(e.activeElement.shadowRoot):e.activeElement},ot=()=>new Promise((e=>{var t;t=e,requestAnimationFrame((()=>setTimeout(t,0)))})),rt={},it=Symbol.for("HA focus target"),nt=async(e,t,o,r,i,n=!0)=>{var a;if(!(o in rt)){if(!i)return void(__DEV__&&console.warn("Asked to show dialog that's not loaded and can't be imported"));rt[o]={element:i().then((()=>{const t=document.createElement(o);return e.provideHass(t),t}))}}if(null!==(a=Je.history.state)&&void 0!==a&&a.replaced?(rt[o].closedFocusTargets=rt[Je.history.state.dialog].closedFocusTargets,delete rt[Je.history.state.dialog].closedFocusTargets):rt[o].closedFocusTargets=((e,t,o=!0)=>{const r=new Set;for(;e;)r.add(e),e=et(e,t,o);return r})(tt(),it),n){var s,l;Je.history.replaceState({dialog:o,open:!1,oldState:null!==(s=Je.history.state)&&void 0!==s&&s.open&&(null===(l=Je.history.state)||void 0===l?void 0:l.dialog)!==o?Je.history.state:null},"");try{Je.history.pushState({dialog:o,dialogParams:r,open:!0},"")}catch(e){Je.history.pushState({dialog:o,dialogParams:null,open:!0},"")}}const d=await rt[o].element;d.addEventListener("dialog-closed",at),t.appendChild(d),d.showDialog(r)},at=async e=>{const t=rt[e.detail.dialog].closedFocusTargets;if(delete rt[e.detail.dialog].closedFocusTargets,!t)return;let o=tt();o instanceof HTMLElement&&o.blur(),await ot();for(const e of t)if(e instanceof HTMLElement&&(e.focus(),o=tt(),o&&o!==document.body))return;__DEV__&&console.warn("Failed to focus any targets after closing dialog: %o",t)},st=(e,t)=>{const o=(null==t?void 0:t.replace)||!1;var r;o?Je.history.replaceState(null!==(r=Je.history.state)&&void 0!==r&&r.root?{root:!0}:null,"",e):Je.history.pushState(null,"",e),Qe(Je,"location-changed",{replace:o})},lt=!(window.ShadyDOM&&window.ShadyDOM.inUse);let dt,ct;function pt(e){dt=(!e||!e.shimcssproperties)&&(lt||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(ct=window.ShadyCSS.cssBuild);const ut=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?dt=window.ShadyCSS.nativeCss:window.ShadyCSS?(pt(window.ShadyCSS),window.ShadyCSS=void 0):pt(window.WebComponents&&window.WebComponents.flags);const mt=dt;class ht{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function gt(e){return _t(function(e){let t=new ht;t.start=0,t.end=e.length;let o=t;for(let r=0,i=e.length;r{":root"===e.selector&&(e.selector="html"),this.transformRule(e)})),e.textContent=Et(t),t}transformRules(e,t){this._currentElement=t,zt(e,(e=>{this.transformRule(e)})),this._currentElement=null}transformRule(e){e.cssText=this.transformCssText(e.parsedCssText,e),":root"===e.selector&&(e.selector=":host > *")}transformCssText(e,t){return e=e.replace(kt,((e,o,r,i)=>this._produceCssProperties(e,o,r,i,t))),this._consumeCssProperties(e,t)}_getInitialValueForProperty(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}_fallbacksFromPreviousRules(e){let t=e;for(;t.parent;)t=t.parent;const o={};let r=!1;return zt(t,(t=>{r=r||t===e,r||t.selector===e.selector&&Object.assign(o,this._cssTextToMap(t.parsedCssText))})),o}_consumeCssProperties(e,t){let o=null;for(;o=Lt.exec(e);){let r=o[0],i=o[1],n=o.index,a=n+r.indexOf("@apply"),s=n+r.length,l=e.slice(0,a),d=e.slice(s),c=t?this._fallbacksFromPreviousRules(t):{};Object.assign(c,this._cssTextToMap(l));let p=this._atApplyToCssProperties(i,c);e=`${l}${p}${d}`,Lt.lastIndex=n+p.length}return e}_atApplyToCssProperties(e,t){e=e.replace(Rt,"");let o=[],r=this._map.get(e);if(r||(this._map.set(e,{}),r=this._map.get(e)),r){let i,n,a;this._currentElement&&(r.dependants[this._currentElement]=!0);const s=r.properties;for(i in s)a=t&&t[i],n=[i,": var(",e,"_-_",i],a&&n.push(",",a.replace(Bt,"")),n.push(")"),Bt.test(s[i])&&n.push(" !important"),o.push(n.join(""))}return o.join("; ")}_replaceInitialOrInherit(e,t){let o=Dt.exec(t);return o&&(t=o[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}_cssTextToMap(e,t=!1){let o,r,i=e.split(";"),n={};for(let e,a,s=0;s1&&(o=a[0].trim(),r=a.slice(1).join(":"),t&&(r=this._replaceInitialOrInherit(o,r)),n[o]=r));return n}_invalidateMixinEntry(e){if(Ft)for(let t in e.dependants)t!==this._currentElement&&Ft(t)}_produceCssProperties(e,t,o,r,i){if(o&&Tt(o,((e,t)=>{t&&this._map.get(t)&&(r=`@apply ${t};`)})),!r)return e;let n=this._consumeCssProperties(""+r,i),a=e.slice(0,e.indexOf("--")),s=this._cssTextToMap(n,!0),l=s,d=this._map.get(t),c=d&&d.properties;c?l=Object.assign(Object.create(c),s):this._map.set(t,l);let p,u,m=[],h=!1;for(p in l)u=s[p],void 0===u&&(u="initial"),c&&!(p in c)&&(h=!0),m.push(`${t}_-_${p}: ${u}`);return h&&this._invalidateMixinEntry(d),d&&(d.properties=l),o&&(a=`${e};${a}`),`${a}${m.join("; ")};`}}Ut.prototype.detectMixin=Ut.prototype.detectMixin,Ut.prototype.transformStyle=Ut.prototype.transformStyle,Ut.prototype.transformCustomStyle=Ut.prototype.transformCustomStyle,Ut.prototype.transformRules=Ut.prototype.transformRules,Ut.prototype.transformRule=Ut.prototype.transformRule,Ut.prototype.transformTemplate=Ut.prototype.transformTemplate,Ut.prototype._separator="_-_",Object.defineProperty(Ut.prototype,"invalidCallback",{get:()=>Ft,set(e){Ft=e}});const Zt={},qt="_applyShimCurrentVersion",Gt="_applyShimNextVersion",Kt="_applyShimValidatingVersion",Yt=Promise.resolve();function Wt(e){let t=Zt[e];t&&function(e){e[qt]=e[qt]||0,e[Kt]=e[Kt]||0,e[Gt]=(e[Gt]||0)+1}(t)}function Xt(e){return e[qt]===e[Gt]}let Jt,Qt=null,eo=window.HTMLImports&&window.HTMLImports.whenReady||null;function to(e){requestAnimationFrame((function(){eo?eo(e):(Qt||(Qt=new Promise((e=>{Jt=e})),"complete"===document.readyState?Jt():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&Jt()}))),Qt.then((function(){e&&e()})))}))}const oo="__shadyCSSCachedStyle";let ro=null,io=null;class no{constructor(){this.customStyles=[],this.enqueued=!1,to((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&io&&(this.enqueued=!0,to(io))}addCustomStyle(e){e.__seenByShadyCSS||(e.__seenByShadyCSS=!0,this.customStyles.push(e),this.enqueueDocumentValidation())}getStyleForCustomStyle(e){if(e[oo])return e[oo];let t;return t=e.getStyle?e.getStyle():e,t}processStyles(){const e=this.customStyles;for(let t=0;tro,set(e){ro=e}},validateCallback:{get:()=>io,set(e){let t=!1;io||(t=!0),io=e,t&&this.enqueueDocumentValidation()}}});const ao=new Ut;class so{constructor(){this.customStyleInterface=null,ao.invalidCallback=Wt}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=e=>{ao.transformCustomStyle(e)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(e,t){if(this.ensure(),Nt(e))return;Zt[t]=e;let o=ao.transformTemplate(e,t);e._styleAst=o}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let t=0;t-1?o=t:(r=t,o=e.getAttribute&&e.getAttribute("is")||""):(o=e.is,r=e.extends),{is:o,typeExtension:r}}(e),o=Zt[t];if((!o||!Nt(o))&&o&&!Xt(o)){(function(e){return!Xt(e)&&e[Kt]===e[Gt]})(o)||(this.prepareTemplate(o,t),function(e){e[Kt]=e[Gt],e._validating||(e._validating=!0,Yt.then((function(){e[qt]=e[Gt],e._validating=!1})))}(o));let r=e.shadowRoot;if(r){let e=r.querySelector("style");e&&(e.__cssRules=o._styleAst,e.textContent=Et(o._styleAst))}}}styleDocument(e){this.ensure(),this.styleSubtree(document.body,e)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const e=new so;let t=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(t,o,r){e.flushCustomStyles(),e.prepareTemplate(t,o)},prepareTemplateStyles(e,t,o){window.ShadyCSS.prepareTemplate(e,t,o)},prepareTemplateDom(e,t){},styleSubtree(t,o){e.flushCustomStyles(),e.styleSubtree(t,o)},styleElement(t){e.flushCustomStyles(),e.styleElement(t)},styleDocument(t){e.flushCustomStyles(),e.styleDocument(t)},getComputedStyleValue:(e,t)=>It(e,t),flushCustomStyles(){e.flushCustomStyles()},nativeCss:mt,nativeShadow:lt,cssBuild:ct,disableRuntime:ut},t&&(window.ShadyCSS.CustomStyleInterface=t)}window.ShadyCSS.ApplyShim=ao,window.JSCompiler_renameProperty=function(e,t){return e};let lo,co,po=/(url\()([^)]*)(\))/g,uo=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function mo(e,t){if(e&&uo.test(e))return e;if("//"===e)return e;if(void 0===lo){lo=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",lo="http://a/c%20d"===e.href}catch(e){}}if(t||(t=document.baseURI||window.location.href),lo)try{return new URL(e,t).href}catch(t){return e}return co||(co=document.implementation.createHTMLDocument("temp"),co.base=co.createElement("base"),co.head.appendChild(co.base),co.anchor=co.createElement("a"),co.body.appendChild(co.anchor)),co.base.href=t,co.anchor.href=e,co.anchor.href||e}function ho(e,t){return e.replace(po,(function(e,o,r,i){return o+"'"+mo(r.replace(/["']/g,""),t)+"'"+i}))}function go(e){return e.substring(0,e.lastIndexOf("/")+1)}const _o=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const fo=_o&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const e=new CSSStyleSheet;e.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})();let yo=window.Polymer&&window.Polymer.rootPath||go(document.baseURI||window.location.href),vo=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,bo=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,Co=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Ao=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Ho=window.Polymer&&window.Polymer.legacyOptimizations||!1,wo=window.Polymer&&window.Polymer.legacyWarnings||!1,ko=window.Polymer&&window.Polymer.syncInitialRender||!1,Lo=window.Polymer&&window.Polymer.legacyUndefined||!1,So=window.Polymer&&window.Polymer.orderedComputed||!1,Vo=window.Polymer&&window.Polymer.removeNestedTemplates||!1,xo=window.Polymer&&window.Polymer.fastDomIf||!1,Mo=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Eo=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,Po=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,zo=0;const To=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let o=zo++;return function(r){let i=r.__mixinSet;if(i&&i[o])return r;let n=t,a=n.get(r);if(!a){a=e(r),n.set(r,a);let t=Object.create(a.__mixinSet||i||null);t[o]=!0,a.__mixinSet=t}return a}};let jo={},No={};function Oo(e,t){jo[e]=No[e.toLowerCase()]=t}function Io(e){return jo[e]||No[e.toLowerCase()]}class Ro extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let o=Io(e);return o&&t?o.querySelector(t):o}return null}attributeChangedCallback(e,t,o,r){t!==o&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=mo(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=go(t)}return this.__assetpath}register(e){if(e=e||this.id){if(Co&&void 0!==Io(e))throw Oo(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,Oo(e,this),(t=this).querySelector("style")&&console.warn("dom-module %s has style outside template",t.id)}var t}}Ro.prototype.modules=jo,customElements.define("dom-module",Ro);function Do(e){return Ro.import(e)}function Bo(e){const t=ho((e.body?e.body:e).textContent,e.baseURI),o=document.createElement("style");return o.textContent=t,o}function $o(e){const t=e.trim().split(/\s+/),o=[];for(let e=0;eShadyDOM.patch(e):e=>e;function Ko(e){return e.indexOf(".")>=0}function Yo(e){let t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function Wo(e,t){return 0===e.indexOf(t+".")}function Xo(e,t){return 0===t.indexOf(e+".")}function Jo(e,t,o){return t+o.slice(e.length)}function Qo(e){if(Array.isArray(e)){let t=[];for(let o=0;o1){for(let e=0;ee[1].toUpperCase())))}function sr(e){return rr[e]||(rr[e]=e.replace(nr,"-$1").toLowerCase())}let lr=0,dr=0,cr=[],pr=0,ur=!1,mr=document.createTextNode("");new window.MutationObserver((function(){ur=!1;const e=cr.length;for(let t=0;t{throw e}))}}cr.splice(0,e),dr+=e})).observe(mr,{characterData:!0});const hr={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},gr={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},_r={run:e=>(ur||(ur=!0,mr.textContent=pr++),cr.push(e),lr++),cancel(e){const t=e-dr;if(t>=0){if(!cr[t])throw new Error("invalid async handle: "+e);cr[t]=null}}},fr=_r,yr=To((e=>class extends e{static createProperties(e){const t=this.prototype;for(let o in e)o in t||t._createPropertyAccessor(o)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(e){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let t=this.__dataAttributes[e];return t||(t=this.constructor.attributeNameForProperty(e),this.__dataAttributes[t]=e),t}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this.__data[e]},set:t?function(){}:function(t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t,o){let r=this.__data[e],i=this._shouldPropertyChange(e,t,r);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=r),this.__data[e]=t,this.__dataPending[e]=t),i}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,fr.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const e=this.__data,t=this.__dataPending,o=this.__dataOld;this._shouldPropertiesChange(e,t,o)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,o)),this.__dataCounter--}_shouldPropertiesChange(e,t,o){return Boolean(t)}_propertiesChanged(e,t,o){}_shouldPropertyChange(e,t,o){return o!==t&&(o==o||t==t)}attributeChangedCallback(e,t,o,r){t!==o&&this._attributeToProperty(e,o),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,o,r)}_attributeToProperty(e,t,o){if(!this.__serializing){const r=this.__dataAttributes,i=r&&r[e]||e;this[i]=this._deserializeValue(t,o||this.constructor.typeForProperty(i))}}_propertyToAttribute(e,t,o){this.__serializing=!0,o=arguments.length<3?this[e]:o,this._valueToNodeAttribute(this,o,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,o){const r=this._serializeValue(t);"class"!==o&&"name"!==o&&"slot"!==o||(e=Go(e)),void 0===r?e.removeAttribute(o):e.setAttribute(o,r)}_serializeValue(e){return"boolean"==typeof e?e?"":void 0:null!=e?e.toString():void 0}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}})),vr={};let br=HTMLElement.prototype;for(;br;){let e=Object.getOwnPropertyNames(br);for(let t=0;t{const t=yr(e);return class extends t{static createPropertiesForAttributes(){let e=this.observedAttributes;for(let t=0;tclass extends e{static _parseTemplate(e,t){if(!e._templateInfo){let o=e._templateInfo={};o.nodeInfoList=[],o.nestedTemplate=Boolean(t),o.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,o,{parent:null})}return e._templateInfo}static _parseTemplateContent(e,t,o){return this._parseTemplateNode(e.content,t,o)}static _parseTemplateNode(e,t,o){let r=!1,i=e;return"template"!=i.localName||i.hasAttribute("preserve-content")?"slot"===i.localName&&(t.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(i,t,o)||r,kr(i),i.firstChild&&this._parseTemplateChildNodes(i,t,o),i.hasAttributes&&i.hasAttributes()&&(r=this._parseTemplateNodeAttributes(i,t,o)||r),r||o.noted}static _parseTemplateChildNodes(e,t,o){if("script"!==e.localName&&"style"!==e.localName)for(let r,i=e.firstChild,n=0;i;i=r){if("template"==i.localName&&(i=Lr(i)),r=i.nextSibling,i.nodeType===Node.TEXT_NODE){let o=r;for(;o&&o.nodeType===Node.TEXT_NODE;)i.textContent+=o.textContent,r=o.nextSibling,e.removeChild(o),o=r;if(t.stripWhiteSpace&&!i.textContent.trim()){e.removeChild(i);continue}}let a={parentIndex:n,parentInfo:o};this._parseTemplateNode(i,t,a)&&(a.infoIndex=t.nodeInfoList.push(a)-1),i.parentNode&&n++}}static _parseTemplateNestedTemplate(e,t,o){let r=e,i=this._parseTemplate(r,t);return(i.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),o.templateInfo=i,!0}static _parseTemplateNodeAttributes(e,t,o){let r=!1,i=Array.from(e.attributes);for(let n,a=i.length-1;n=i[a];a--)r=this._parseTemplateNodeAttribute(e,t,o,n.name,n.value)||r;return r}static _parseTemplateNodeAttribute(e,t,o,r,i){return"on-"===r.slice(0,3)?(e.removeAttribute(r),o.events=o.events||[],o.events.push({name:r.slice(3),value:i}),!0):"id"===r&&(o.id=i,!0)}static _contentForTemplate(e){let t=e._templateInfo;return t&&t.content||e.content}_stampTemplate(e,t){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);let o=(t=t||this.constructor._parseTemplate(e)).nodeInfoList,r=t.content||e.content,i=document.importNode(r,!0);i.__noInsertionPoint=!t.hasInsertionPoint;let n=i.nodeList=new Array(o.length);i.$={};for(let e,r=0,a=o.length;r!e.literal)).length+(r.dynamicFn?1:0)}for(let e in r)t[e]||i.push(e);return{counts:o,ready:i,total:n}}(e);for(;r=n.shift();){t.set(r,t.size);const e=o[r];e&&e.forEach((e=>{const t=e.info.methodInfo;--a,0==--i[t]&&n.push(t)}))}if(0!==a){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}(e),a=[];for(let e in t)Gr(e,i,a,n,r);let s;for(;s=a.shift();)Kr(e,"",t,o,s)&&Gr(s.methodInfo,i,a,n,r);Object.assign(o,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let n=t;for(;Or(e,i,n,o,r);)Object.assign(o,e.__dataOld),Object.assign(t,e.__dataPending),n=e.__dataPending,e.__dataPending=null}}const qr=(e,t,o)=>{let r=0,i=t.length-1,n=-1;for(;r<=i;){const a=r+i>>1,s=o.get(t[a].methodInfo)-o.get(e.methodInfo);if(s<0)r=a+1;else{if(!(s>0)){n=a;break}i=a-1}}n<0&&(n=i+1),t.splice(n,0,e)},Gr=(e,t,o,r,i)=>{const n=t[i?Yo(e):e];if(n)for(let t=0;td.source.length&&"property"==l.kind&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){let r=o[t];t=Jo(d.source,l.target,t),s._setPendingPropertyOrPath(t,r,!1,!0)&&e._enqueueClient(s)}else{let a=i.evaluator._evaluateBinding(e,d,t,o,r,n);a!==zr&&function(e,t,o,r,i){i=function(e,t,o,r){if(o.isCompound){let i=e.__dataCompoundStorage[o.target];i[r.compoundIndex]=t,t=i.join("")}"attribute"!==o.kind&&("textContent"!==o.target&&("value"!==o.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t));return t}(t,i,o,r),vo&&(i=vo(i,o.target,o.kind,t));if("attribute"==o.kind)e._valueToNodeAttribute(t,i,o.target);else{let r=o.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?t[Tr.READ_ONLY]&&t[Tr.READ_ONLY][r]||t._setPendingProperty(r,i)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,r,i)}}(e,s,l,d,a)}}function Jr(e,t){if(t.isCompound){let o=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),r=t.parts,i=new Array(r.length);for(let e=0;e="0"&&r<="9"&&(r="#"),r){case"'":case'"':o.value=t.slice(1,-1),o.literal=!0;break;case"#":o.value=Number(t),o.literal=!0}return o.literal||(o.rootProperty=Yo(t),o.structured=Ko(t),o.structured&&(o.wildcard=".*"==t.slice(-2),o.wildcard&&(o.name=t.slice(0,-2)))),o}function si(e,t,o){let r=tr(e,o);return void 0===r&&(r=t[o]),r}function li(e,t,o,r){const i={indexSplices:r};Lo&&!e._overrideLegacyUndefined&&(t.splices=i),e.notifyPath(o+".splices",i),e.notifyPath(o+".length",t.length),Lo&&!e._overrideLegacyUndefined&&(i.indexSplices=[])}function di(e,t,o,r,i,n){li(e,t,o,[{index:r,addedCount:i,removed:n,object:t,type:"splice"}])}const ci=To((e=>{const t=Er(Cr(e));return class extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Tr}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(pi.length){let e=pi[pi.length-1];e._enqueueClient(this),this.__dataHost=e}}_initializeProtoProperties(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}_initializeInstanceProperties(e){let t=this[Tr.READ_ONLY];for(let o in e)t&&t[o]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[o]=this.__dataPending[o]=e[o])}_addPropertyEffect(e,t,o){this._createPropertyAccessor(e,t==Tr.READ_ONLY);let r=Nr(this,t,!0)[e];r||(r=this[t][e]=[]),r.push(o)}_removePropertyEffect(e,t,o){let r=Nr(this,t,!0)[e],i=r.indexOf(o);i>=0&&r.splice(i,1)}_hasPropertyEffect(e,t){let o=this[t];return Boolean(o&&o[e])}_hasReadOnlyEffect(e){return this._hasPropertyEffect(e,Tr.READ_ONLY)}_hasNotifyEffect(e){return this._hasPropertyEffect(e,Tr.NOTIFY)}_hasReflectEffect(e){return this._hasPropertyEffect(e,Tr.REFLECT)}_hasComputedEffect(e){return this._hasPropertyEffect(e,Tr.COMPUTE)}_setPendingPropertyOrPath(e,t,o,r){if(r||Yo(Array.isArray(e)?e[0]:e)!==e){if(!r){let o=tr(this,e);if(!(e=or(this,e,t))||!super._shouldPropertyChange(e,t,o))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,o))return function(e,t,o){let r=e.__dataLinkedPaths;if(r){let i;for(let n in r){let a=r[n];Xo(n,t)?(i=Jo(n,a,t),e._setPendingPropertyOrPath(i,o,!0,!0)):Xo(a,t)&&(i=Jo(a,n,t),e._setPendingPropertyOrPath(i,o,!0,!0))}}}(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,o);this[e]=t}return!1}_setUnmanagedPropertyToNode(e,t,o){o===e[t]&&"object"!=typeof o||("className"===t&&(e=Go(e)),e[t]=o)}_setPendingProperty(e,t,o){let r=this.__dataHasPaths&&Ko(e),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,i[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),r?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(r||this[Tr.NOTIFY]&&this[Tr.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=o),!0)}_setProperty(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(let t=0;t{Or(this,e.propertyEffects,t,o,r,e.nodeList);for(let i=e.firstChild;i;i=i.nextSibling)this._runEffectsForTemplate(i,t,o,r)};e.runEffects?e.runEffects(i,t,r):i(t,r)}linkPaths(e,t){e=Qo(e),t=Qo(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}unlinkPaths(e){e=Qo(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}notifySplices(e,t){let o={path:""};li(this,tr(this,e,o),o.path,t)}get(e,t){return tr(t||this,e)}set(e,t,o){o?or(o,e,t):this[Tr.READ_ONLY]&&this[Tr.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}push(e,...t){let o={path:""},r=tr(this,e,o),i=r.length,n=r.push(...t);return t.length&&di(this,r,o.path,i,t.length,[]),n}pop(e){let t={path:""},o=tr(this,e,t),r=Boolean(o.length),i=o.pop();return r&&di(this,o,t.path,o.length,0,[i]),i}splice(e,t,o,...r){let i,n={path:""},a=tr(this,e,n);return t<0?t=a.length-Math.floor(-t):t&&(t=Math.floor(t)),i=2===arguments.length?a.splice(t):a.splice(t,o,...r),(r.length||i.length)&&di(this,a,n.path,t,r.length,i),i}shift(e){let t={path:""},o=tr(this,e,t),r=Boolean(o.length),i=o.shift();return r&&di(this,o,t.path,0,0,[i]),i}unshift(e,...t){let o={path:""},r=tr(this,e,o),i=r.unshift(...t);return t.length&&di(this,r,o.path,0,t.length,[]),i}notifyPath(e,t){let o;if(1==arguments.length){let r={path:""};t=tr(this,e,r),o=r.path}else o=Array.isArray(e)?Qo(e):e;this._setPendingPropertyOrPath(o,t,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(e,t){var o;this._addPropertyEffect(e,Tr.READ_ONLY),t&&(this["_set"+(o=e,o[0].toUpperCase()+o.substring(1))]=function(t){this._setProperty(e,t)})}_createPropertyObserver(e,t,o){let r={property:e,method:t,dynamicFn:Boolean(o)};this._addPropertyEffect(e,Tr.OBSERVE,{fn:Dr,info:r,trigger:{name:e}}),o&&this._addPropertyEffect(t,Tr.OBSERVE,{fn:Dr,info:r,trigger:{name:t}})}_createMethodObserver(e,t){let o=ni(e);if(!o)throw new Error("Malformed observer expression '"+e+"'");ei(this,o,Tr.OBSERVE,ti,null,t)}_createNotifyingProperty(e){this._addPropertyEffect(e,Tr.NOTIFY,{fn:Fr,info:{eventName:sr(e)+"-changed",property:e}})}_createReflectedProperty(e){let t=this.constructor.attributeNameForProperty(e);"-"===t[0]?console.warn("Property "+e+" cannot be reflected to attribute "+t+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(e,Tr.REFLECT,{fn:Ur,info:{attrName:t}})}_createComputedProperty(e,t,o){let r=ni(t);if(!r)throw new Error("Malformed computed expression '"+t+"'");const i=ei(this,r,Tr.COMPUTE,Kr,e,o);Nr(this,"__computeInfo")[e]=i}_marshalArgs(e,t,o){const r=this.__data,i=[];for(let n=0,a=e.length;n1)return zr;i[n]=d}return i}static addPropertyEffect(e,t,o){this.prototype._addPropertyEffect(e,t,o)}static createPropertyObserver(e,t,o){this.prototype._createPropertyObserver(e,t,o)}static createMethodObserver(e,t){this.prototype._createMethodObserver(e,t)}static createNotifyingProperty(e){this.prototype._createNotifyingProperty(e)}static createReadOnlyProperty(e,t){this.prototype._createReadOnlyProperty(e,t)}static createReflectedProperty(e){this.prototype._createReflectedProperty(e)}static createComputedProperty(e,t,o){this.prototype._createComputedProperty(e,t,o)}static bindTemplate(e){return this.prototype._bindTemplate(e)}_bindTemplate(e,t){let o=this.constructor._parseTemplate(e),r=this.__preBoundTemplateInfo==o;if(!r)for(let e in o.propertyEffects)this._createPropertyAccessor(e);if(t)if(o=Object.create(o),o.wasPreBound=r,this.__templateInfo){const t=e._parentTemplateInfo||this.__templateInfo,r=t.lastChild;o.parent=t,t.lastChild=o,o.previousSibling=r,r?r.nextSibling=o:t.firstChild=o}else this.__templateInfo=o;else this.__preBoundTemplateInfo=o;return o}static _addTemplatePropertyEffect(e,t,o){(e.hostProps=e.hostProps||{})[t]=!0;let r=e.propertyEffects=e.propertyEffects||{};(r[t]=r[t]||[]).push(o)}_stampTemplate(e,t){t=t||this._bindTemplate(e,!0),pi.push(this);let o=super._stampTemplate(e,t);if(pi.pop(),t.nodeList=o.nodeList,!t.wasPreBound){let e=t.childNodes=[];for(let t=o.firstChild;t;t=t.nextSibling)e.push(t)}return o.templateInfo=t,function(e,t){let{nodeList:o,nodeInfoList:r}=t;if(r.length)for(let t=0;ti&&r.push({literal:e.slice(i,o.index)});let n=o[1][0],a=Boolean(o[2]),s=o[3].trim(),l=!1,d="",c=-1;"{"==n&&(c=s.indexOf("::"))>0&&(d=s.substring(c+2),s=s.substring(0,c),l=!0);let p=ni(s),u=[];if(p){let{args:e,methodName:o}=p;for(let t=0;t{const t=yr(e);function o(e){const t=Object.getPrototypeOf(e);return t.prototype instanceof i?t:null}function r(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))){let t=null;if(e.hasOwnProperty(JSCompiler_renameProperty("properties",e))){const o=e.properties;o&&(t=function(e){const t={};for(let o in e){const r=e[o];t[o]="function"==typeof r?{type:r}:r}return t}(o))}e.__ownProperties=t}return e.__ownProperties}class i extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const e=this._properties;this.__observedAttributes=e?Object.keys(e).map((e=>this.prototype._addPropertyToAttributeMap(e))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const e=o(this);e&&e.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const e=r(this);e&&this.createProperties(e)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const e=o(this);this.__properties=Object.assign({},e&&e._properties,r(this))}return this.__properties}static typeForProperty(e){const t=this._properties[e];return t&&t.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i})),mi=window.ShadyCSS&&window.ShadyCSS.cssBuild,hi=To((e=>{const t=ui(ci(e));function o(e,t,o,r){o.computed&&(o.readOnly=!0),o.computed&&(e._hasReadOnlyEffect(t)?console.warn(`Cannot redefine computed property '${t}'.`):e._createComputedProperty(t,o.computed,r)),o.readOnly&&!e._hasReadOnlyEffect(t)?e._createReadOnlyProperty(t,!o.computed):!1===o.readOnly&&e._hasReadOnlyEffect(t)&&console.warn(`Cannot make readOnly property '${t}' non-readOnly.`),o.reflectToAttribute&&!e._hasReflectEffect(t)?e._createReflectedProperty(t):!1===o.reflectToAttribute&&e._hasReflectEffect(t)&&console.warn(`Cannot make reflected property '${t}' non-reflected.`),o.notify&&!e._hasNotifyEffect(t)?e._createNotifyingProperty(t):!1===o.notify&&e._hasNotifyEffect(t)&&console.warn(`Cannot make notify property '${t}' non-notify.`),o.observer&&e._createPropertyObserver(t,o.observer,r[o.observer]),e._addPropertyToAttributeMap(t)}function r(e,t,o,r){if(!mi){const i=t.content.querySelectorAll("style"),n=Uo(t),a=function(e){let t=Do(e);return t?Zo(t):[]}(o),s=t.content.firstElementChild;for(let o=0;o{t+=e.textContent,e.parentNode.removeChild(e)})),e._styleSheet=new CSSStyleSheet,e._styleSheet.replaceSync(t)}}}return class extends t{static get polymerElementVersion(){return"3.4.1"}static _finalizeClass(){t._finalizeClass.call(this);const e=((o=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",o))||(o.__ownObservers=o.hasOwnProperty(JSCompiler_renameProperty("observers",o))?o.observers:null),o.__ownObservers);var o;e&&this.createObservers(e,this._properties),this._prepareTemplate()}static _prepareTemplate(){let e=this.template;e&&("string"==typeof e?(console.error("template getter must return HTMLTemplateElement"),e=null):Ho||(e=e.cloneNode(!0))),this.prototype._template=e}static createProperties(e){for(let t in e)o(this.prototype,t,e[t],e)}static createObservers(e,t){const o=this.prototype;for(let r=0;r{this._timer=null,_i.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),_i.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(e,t,o){return e instanceof gi?e._cancelAsync():e=new gi,e.setConfig(t,o),e}}let _i=new Set;const fi=function(e){_i.add(e)},yi=function(){const e=Boolean(_i.size);return _i.forEach((e=>{try{e.flush()}catch(e){setTimeout((()=>{throw e}))}})),e};let vi="string"==typeof document.head.style.touchAction,bi="__polymerGestures",Ci="__polymerGesturesHandled",Ai="__polymerGesturesTouchAction",Hi=["mousedown","mousemove","mouseup","click"],wi=[0,1,4,2],ki=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function Li(e){return Hi.indexOf(e)>-1}let Si=!1;function Vi(e){if(!Li(e)&&"touchend"!==e)return vi&&Si&&bo?{passive:!0}:void 0}!function(){try{let e=Object.defineProperty({},"passive",{get(){Si=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();let xi=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const Mi=[],Ei={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},Pi={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function zi(e){let t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];let o=e.getRootNode();if(e.id){let r=o.querySelectorAll(`label[for = ${e.id}]`);for(let e=0;e-1}if(r[e]===Oi.mouse.target)return}if(t)return;e.preventDefault(),e.stopPropagation()}};function ji(e){let t=xi?["click"]:Hi;for(let o,r=0;re.composedPath&&e.composedPath()||[],Bi={},$i=[];function Fi(e){const t=Di(e);return t.length>0?t[0]:e.target}function Ui(e){let t,o=e.type,r=e.currentTarget.__polymerGestures;if(!r)return;let i=r[o];if(i){if(!e[Ci]&&(e[Ci]={},"touch"===o.slice(0,5))){let t=e.changedTouches[0];if("touchstart"===o&&1===e.touches.length&&(Oi.touch.id=t.identifier),Oi.touch.id!==t.identifier)return;vi||"touchstart"!==o&&"touchmove"!==o||function(e){let t=e.changedTouches[0],o=e.type;if("touchstart"===o)Oi.touch.x=t.clientX,Oi.touch.y=t.clientY,Oi.touch.scrollDecided=!1;else if("touchmove"===o){if(Oi.touch.scrollDecided)return;Oi.touch.scrollDecided=!0;let o=function(e){let t="auto",o=Di(e);for(let e,r=0;ri:"pan-y"===o&&(r=i>n)),r?e.preventDefault():Wi("track")}}(e)}if(t=e[Ci],!t.skip){for(let o,r=0;r<$i.length;r++)o=$i[r],i[o.name]&&!t[o.name]&&o.flow&&o.flow.start.indexOf(e.type)>-1&&o.reset&&o.reset();for(let r,n=0;n<$i.length;n++)r=$i[n],i[r.name]&&!t[r.name]&&(t[r.name]=!0,r[o](e))}}}function Zi(e,t,o){return!!Bi[t]&&(function(e,t,o){let r=Bi[t],i=r.deps,n=r.name,a=e[bi];a||(e[bi]=a={});for(let t,o,r=0;r{e.style.touchAction=t})),e[Ai]=t}function Yi(e,t,o){let r=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=o,Go(e).dispatchEvent(r),r.defaultPrevented){let e=o.preventer||o.sourceEvent;e&&e.preventDefault&&e.preventDefault()}}function Wi(e){let t=function(e){for(let t,o=0;o<$i.length;o++){t=$i[o];for(let o,r=0;r=5||i>=5}function Qi(e,t,o){if(!t)return;let r,i=e.moves[e.moves.length-2],n=e.moves[e.moves.length-1],a=n.x-e.x,s=n.y-e.y,l=0;i&&(r=n.x-i.x,l=n.y-i.y),Yi(t,"track",{state:e.state,x:o.clientX,y:o.clientY,dx:a,dy:s,ddx:r,ddy:l,sourceEvent:o,hover:function(){return function(e,t){let o=document.elementFromPoint(e,t),r=o;for(;r&&r.shadowRoot&&!window.ShadyDOM;){let i=r;if(r=r.shadowRoot.elementFromPoint(e,t),i===r)break;r&&(o=r)}return o}(o.clientX,o.clientY)}})}function en(e,t,o){let r=Math.abs(t.clientX-e.x),i=Math.abs(t.clientY-e.y),n=Fi(o||t);!n||Pi[n.localName]&&n.hasAttribute("disabled")||(isNaN(r)||isNaN(i)||r<=25&&i<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;let t=Fi(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let o=t.getBoundingClientRect(),r=e.pageX,i=e.pageY;return!(r>=o.left&&r<=o.right&&i>=o.top&&i<=o.bottom)}return!1}(t))&&(e.prevent||Yi(n,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:o}))}Gi({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Ri(this.info)},mousedown:function(e){if(!Ni(e))return;let t=Fi(e),o=this;Ii(this.info,(function(e){Ni(e)||(Xi("up",t,e),Ri(o.info))}),(function(e){Ni(e)&&Xi("up",t,e),Ri(o.info)})),Xi("down",t,e)},touchstart:function(e){Xi("down",Fi(e),e.changedTouches[0],e)},touchend:function(e){Xi("up",Fi(e),e.changedTouches[0],e)}}),Gi({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Ri(this.info)},mousedown:function(e){if(!Ni(e))return;let t=Fi(e),o=this,r=function(e){let r=e.clientX,i=e.clientY;Ji(o.info,r,i)&&(o.info.state=o.info.started?"mouseup"===e.type?"end":"track":"start","start"===o.info.state&&Wi("tap"),o.info.addMove({x:r,y:i}),Ni(e)||(o.info.state="end",Ri(o.info)),t&&Qi(o.info,t,e),o.info.started=!0)};Ii(this.info,r,(function(e){o.info.started&&r(e),Ri(o.info)})),this.info.x=e.clientX,this.info.y=e.clientY},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){let t=Fi(e),o=e.changedTouches[0],r=o.clientX,i=o.clientY;Ji(this.info,r,i)&&("start"===this.info.state&&Wi("tap"),this.info.addMove({x:r,y:i}),Qi(this.info,t,o),this.info.state="track",this.info.started=!0)},touchend:function(e){let t=Fi(e),o=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:o.clientX,y:o.clientY}),Qi(this.info,t,o))}}),Gi({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(e){Ni(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click:function(e){Ni(e)&&en(this.info,e)},touchstart:function(e){const t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend:function(e){en(this.info,e.changedTouches[0],e)}});const tn=To((e=>class extends e{_addEventListenerToNode(e,t,o){Zi(e,t,o)||super._addEventListenerToNode(e,t,o)}_removeEventListenerFromNode(e,t,o){qi(e,t,o)||super._removeEventListenerFromNode(e,t,o)}})),on=/:host\(:dir\((ltr|rtl)\)\)/g,rn=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,nn=/:dir\((?:ltr|rtl)\)/,an=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),sn=[];let ln=null,dn="";function cn(){dn=document.documentElement.getAttribute("dir")}function pn(e){if(!e.__autoDirOptOut){e.setAttribute("dir",dn)}}function un(){cn(),dn=document.documentElement.getAttribute("dir");for(let e=0;e{an||ln||(cn(),ln=new MutationObserver(un),ln.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const t=Cr(e);class o extends t{static _processStyleText(e,o){return e=t._processStyleText.call(this,e,o),!an&&nn.test(e)&&(e=this._replaceDirInCssText(e),this.__activateDir=!0),e}static _replaceDirInCssText(e){let t=e;return t=t.replace(on,':host([dir="$1"])'),t=t.replace(rn,':host([dir="$2"]) $1'),t}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(ln&&ln.takeRecords().length&&un(),sn.push(this),pn(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const e=sn.indexOf(this);e>-1&&sn.splice(e,1)}}}return o.__activateDir=!1,o}));function hn(){document.body.removeAttribute("unresolved")}function gn(e,t,o){return{index:e,removed:t,addedCount:o}}"interactive"===document.readyState||"complete"===document.readyState?hn():window.addEventListener("DOMContentLoaded",hn);function _n(e,t,o,r,i,n){let a,s=0,l=0,d=Math.min(o-t,n-i);if(0==t&&0==i&&(s=function(e,t,o){for(let r=0;r0||o>0;){if(0==t){i.push(2),o--;continue}if(0==o){i.push(3),t--;continue}let n,a=e[t-1][o-1],s=e[t-1][o],l=e[t][o-1];n=svn(e)?Go(e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){vn(this._target)?this._listenSlots([this._target]):Go(this._target).children&&(this._listenSlots(Go(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){vn(this._target)?this._unlistenSlots([this._target]):Go(this._target).children&&(this._unlistenSlots(Go(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,_r.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t{"activeElement"!=t&&(e.prototype[t]=kn.prototype[t])})),Ln(e.prototype,["classList"]),Vn=e,Object.defineProperties(Sn.prototype,{localTarget:{get(){const e=this.event.currentTarget,t=e&&xn(e).getOwnerRoot(),o=this.path;for(let e=0;e{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]};To((e=>{const t=hi(e);let o=zn(t);return class extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return o.call(this).concat("disable-upgrade")}_initializeProperties(){this.hasAttribute("disable-upgrade")?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}attributeChangedCallback(e,t,o,r){"disable-upgrade"==e?this.__isUpgradeDisabled&&null==o&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,Go(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(e,t,o,r)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));let Tn=window.ShadyCSS;const jn=To((e=>{const t=tn(hi(e)),o=mi?t:mn(t),r=zn(o),i={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class n extends o{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(e,t,o){(this.__dataAttributes&&this.__dataAttributes[e]||"disable-upgrade"===e)&&this.attributeChangedCallback(e,t,o,null)}setAttribute(e,t){if(Eo&&!this._legacyForceObservedAttributes){const o=this.getAttribute(e);super.setAttribute(e,t),this.__attributeReaction(e,o,String(t))}else super.setAttribute(e,t)}removeAttribute(e){if(Eo&&!this._legacyForceObservedAttributes){const t=this.getAttribute(e);super.removeAttribute(e),this.__attributeReaction(e,t,null)}else super.removeAttribute(e)}static get observedAttributes(){return Eo&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],this.prototype),this.__observedAttributes):r.call(this).concat("disable-upgrade")}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(e,t,o,r){t!==o&&("disable-upgrade"==e?this.__isUpgradeDisabled&&null==o&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,Go(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(e,t,o,r),this.attributeChanged(e,t,o)))}attributeChanged(e,t,o){}_initializeProperties(){if(Ho&&this.hasAttribute("disable-upgrade"))this.__isUpgradeDisabled=!0;else{let e=Object.getPrototypeOf(this);e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))||(this._registered(),e.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),Eo&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const e=this.attributes;for(let t=0,o=e.length;t{if(!Pn(e,i))return;const t=Array.from(Mn.nativeMethods.querySelectorAll.call(e,"*"));t.push(e);for(let e=0;e{for(let t=0;t0?hr.after(o):_r,t.bind(this))}isDebouncerActive(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];return!(!t||!t.isActive())}flushDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.flush()}cancelDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.cancel()}async(e,t){return t>0?hr.run(e.bind(this),t):~_r.run(e.bind(this))}cancelAsync(e){e<0?_r.cancel(~e):hr.cancel(e)}create(e,t){let o=document.createElement(e);if(t)if(o.setProperties)o.setProperties(t);else for(let e in t)o[e]=t[e];return o}elementMatches(e,t){return wn(t||this,e)}toggleAttribute(e,t){let o=this;return 3===arguments.length&&(o=arguments[2]),1==arguments.length&&(t=!o.hasAttribute(e)),t?(Go(o).setAttribute(e,""),!0):(Go(o).removeAttribute(e),!1)}toggleClass(e,t,o){o=o||this,1==arguments.length&&(t=!o.classList.contains(e)),t?o.classList.add(e):o.classList.remove(e)}transform(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}translate3d(e,t,o,r){r=r||this,this.transform("translate3d("+e+","+t+","+o+")",r)}arrayDelete(e,t){let o;if(Array.isArray(e)){if(o=e.indexOf(t),o>=0)return e.splice(o,1)}else{if(o=tr(this,e).indexOf(t),o>=0)return this.splice(e,o,1)}return null}_logger(e,t){switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e](...t)}}_log(...e){this._logger("log",e)}_warn(...e){this._logger("warn",e)}_error(...e){this._logger("error",e)}_logf(e,...t){return["[%s::%s]",this.is,e,...t]}}return n.prototype.is="",n})),Nn={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},On={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},In=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},On);function Rn(e,t,o,r){!function(e,t,o){const r=e._noAccessors,i=Object.getOwnPropertyNames(e);for(let n=0;n=0;r--){let i=e[r];i?Array.isArray(i)?Dn(i,t):t.indexOf(i)<0&&(!o||o.indexOf(i)<0)&&t.unshift(i):console.warn("behavior is null, check for missing or 404 import")}return t}function Bn(e,t){for(const o in t){const r=e[o],i=t[o];e[o]=!("value"in i)&&r&&"value"in r?Object.assign({value:r.value},i):i}}const $n=jn(HTMLElement);function Fn(e,t,o){let r;const i={};class n extends t{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(r)for(let e,t=0;t=0;t--){const o=e[t];for(let e in o)this._ensureAttribute(e,o[e])}super._ensureAttributes()}ready(){super.ready();let e=i.ready;if(e)for(let t=0;t{r&&function(e,t,o){for(let r=0;rclass extends e{_shouldPropertyChange(e,t,o){return Zn(this,e,t,o,!0)}})),Gn=To((e=>class extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,o){return Zn(this,e,t,o,this.mutableData)}}));qn._mutablePropertyChange=Zn;let Kn=null;function Yn(){return Kn}Yn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Yn,writable:!0}});const Wn=ci(Yn),Xn=qn(Wn);const Jn=ci(class{});function Qn(e,t){for(let o=0;o{e.model=this,o(e)}));else{let r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(e,t,o)}}_showHideChildren(e){Qn(e,this.children)}_setUnmanagedPropertyToNode(e,t,o){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==t?e.__polymerTextContent__=o:super._setUnmanagedPropertyToNode(e,t,o)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}ea.prototype.__dataHost,ea.prototype.__templatizeOptions,ea.prototype._methodHost,ea.prototype.__templatizeOwner,ea.prototype.__hostProps;const ta=qn(ea);function oa(e){let t=e.__dataHost;return t&&t._methodHost||t}function ra(e,t,o){let r=o.mutableData?ta:ea;sa.mixin&&(r=sa.mixin(r));let i=class extends r{};return i.prototype.__templatizeOptions=o,i.prototype._bindTemplate(e),function(e,t,o,r){let i=o.hostProps||{};for(let t in r.instanceProps){delete i[t];let o=r.notifyInstanceProp;o&&e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:aa(t,o)})}if(r.forwardHostProp&&t.__dataHost)for(let t in i)o.hasHostProps||(o.hasHostProps=!0),e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,o){e.__dataHost._setPendingPropertyOrPath("_host_"+t,o[t],!0,!0)}})}(i,e,t,o),i}function ia(e,t,o,r){let i=o.forwardHostProp;if(i&&t.hasHostProps){const n="template"==e.localName;let a=t.templatizeTemplateClass;if(!a){if(n){let e=o.mutableData?Xn:Wn;class r extends e{}a=t.templatizeTemplateClass=r}else{const o=e.constructor;class r extends o{}a=t.templatizeTemplateClass=r}let s=t.hostProps;for(let e in s)a.prototype._addPropertyEffect("_host_"+e,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:na(e,i)}),a.prototype._createNotifyingProperty("_host_"+e);wo&&r&&function(e,t,o){const r=o.constructor._properties,{propertyEffects:i}=e,{instanceProps:n}=t;for(let e in i)if(!(r[e]||n&&n[e])){const t=i[e];for(let o=0;o can only be templatized once");e.__templatizeOwner=t;let r=(t?t.constructor:ea)._parseTemplate(e),i=r.templatizeInstanceClass;i||(i=ra(e,r,o),r.templatizeInstanceClass=i);const n=oa(e);ia(e,r,o,n);let a=class extends i{};return a.prototype._methodHost=n,a.prototype.__dataHost=e,a.prototype.__templatizeOwner=t,a.prototype.__hostProps=r.hostProps,a}let la=!1;function da(){if(Ho&&!_o){if(!la){la=!0;const e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}const ca=tn(Gn(ci(HTMLElement)));customElements.define("dom-bind",class extends ca{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),Co)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,o,r){this.mutableData=!0}connectedCallback(){da()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){Go(Go(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a