diff --git a/.eslintrc b/.eslintrc index 551cba7..4af5e47 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,7 +17,7 @@ "no-param-reassign": ["error", { "props": false }], "function-paren-newline": 0, "import/no-extraneous-dependencies": ["error", {"devDependencies": ["gulp/**", "webpack.config.js"]}], - "import/extensions": ["error", "always"] + "import/extensions": ["error", "ignorePackages"] }, "plugins": [ "import" diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a43fb9..5308a76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +#### 2019-05-18 +* Hotfix for HA 0.94+ + #### 2019-03-24 * Fix for `icon-color` for HA 0.88+ * Fox config panel for HA 0.90+ diff --git a/README.md b/README.md index d3eb86f..cc72497 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ TODO: Add screenshots ## Notes +**CustomUI 2019-05-17 required for HA 0.94+** **CustomUI 2018-12-17 required for HA 0.84.1+** @@ -24,6 +25,9 @@ Please ask questions and post feature requests in the [forum](https://community. ## Changelog +#### 2019-05-18 +* Hotfix for HA 0.94+ + #### 2019-03-24 * Fix for `icon-color` for HA 0.88+ * Fox config panel for HA 0.90+ @@ -31,14 +35,5 @@ Please ask questions and post feature requests in the [forum](https://community. #### 2019-01-13 * Hotfix for `extra_badge` for HA 0.85+ -#### 2018-12-17 -* Hotfix for HA 0.84.1+ - -#### 2018-08-31 -* Fix for icon_color not being applied on HA >0.77 (by Jérôme) -* This version requires HA 0.77+ - -#### 2018-08-06 -* Fix CustomUI attributes not being hidden in more-info. [Full Changelog](CHANGELOG.md) diff --git a/gulp/tasks/build.js b/gulp/tasks/build.js index d811da2..0d979e4 100644 --- a/gulp/tasks/build.js +++ b/gulp/tasks/build.js @@ -17,9 +17,9 @@ function build(minify, transpile) { .pipe(gulp.dest('build/')); } -gulp.task('build', ['build-minify', 'build-dbg', 'build-minify-es5', 'build-dbg-es5']); -gulp.task('build-minify', [], build.bind(null, true, false)); -gulp.task('build-dbg', [], build.bind(null, false, false)); -gulp.task('build-minify-es5', [], build.bind(null, true, true)); -gulp.task('build-dbg-es5', [], build.bind(null, false, true)); +gulp.task('build-minify', build.bind(null, true, false)); +gulp.task('build-dbg', build.bind(null, false, false)); +gulp.task('build-minify-es5', build.bind(null, true, true)); +gulp.task('build-dbg-es5', build.bind(null, false, true)); +gulp.task('build', gulp.series('build-minify', 'build-dbg', 'build-minify-es5', 'build-dbg-es5')); diff --git a/gulp/tasks/compress.js b/gulp/tasks/compress.js index 6a55211..0e991bf 100644 --- a/gulp/tasks/compress.js +++ b/gulp/tasks/compress.js @@ -1,5 +1,5 @@ const gulp = require('gulp'); -const zopfli = require('gulp-zopfli'); +const zopfli = require('gulp-zopfli-green'); gulp.task('compress', () => gulp.src('state-card-custom-ui*.html') diff --git a/gulp/tasks/default.js b/gulp/tasks/default.js index cd67406..f8f44b0 100644 --- a/gulp/tasks/default.js +++ b/gulp/tasks/default.js @@ -1,3 +1,3 @@ const gulp = require('gulp'); -gulp.task('default', ['build']); +gulp.task('default', gulp.series(['build'])); diff --git a/package.json b/package.json index 38a6b5f..8a645c9 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,10 @@ "del": "^3.0.0", "eslint": "^4.13.0", "eslint-config-airbnb-base": "^12.1.0", - "gulp": "^3.9.1", + "gulp": "^4", "gulp-rename": "^1.2.2", - "gulp-zopfli": "^1.0.0", + "gulp-zopfli-green": "^3.0.0", + "lit-element": "^2.1.0", "require-dir": "^0.3.2", "typescript": "^3.2.2", "webpack": "^4.8.3" diff --git a/scripts-dbg-es5.js b/scripts-dbg-es5.js index 67a0fbf..acc4256 100644 --- a/scripts-dbg-es5.js +++ b/scripts-dbg-es5.js @@ -100,7 +100,7 @@ __webpack_require__.r(__webpack_exports__); var DEFAULT_DOMAIN_ICON = "hass:bookmark"; /** Panel to show when no panel is picked. */ -var DEFAULT_PANEL = "states"; +var DEFAULT_PANEL = "lovelace"; /** Domains that have a state card. */ var DOMAINS_WITH_CARD = ["climate", "cover", "configurator", "input_select", "input_number", "input_text", "lock", "media_player", "scene", "script", "timer", "vacuum", "water_heater", "weblink"]; @@ -118,7 +118,7 @@ var DOMAINS_MORE_INFO_NO_HISTORY = ["camera", "configurator", "history_graph", " var STATES_OFF = ["closed", "locked", "off"]; /** Domains where we allow toggle in Lovelace. */ -var DOMAINS_TOGGLE = new Set(["fan", "input_boolean", "light", "switch"]); +var DOMAINS_TOGGLE = new Set(["fan", "input_boolean", "light", "switch", "group", "automation"]); /** Temperature units. */ var UNIT_C = "°C"; @@ -129,9 +129,9 @@ var DEFAULT_VIEW_ENTITY_ID = "group.default_view"; /***/ }), -/***/ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.js": +/***/ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts": /*!***************************************************************************!*\ - !*** ../home-assistant-polymer/src/common/dom/apply_themes_on_element.js ***! + !*** ../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -139,6 +139,10 @@ var DEFAULT_VIEW_ENTITY_ID = "group.default_view"; "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return applyThemesOnElement; }); +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + /** * Apply a theme to an element by setting the CSS variables on it. * @@ -160,7 +164,7 @@ function applyThemesOnElement(element, themes, localTheme) { themeName = localTheme; } - var styles = Object.assign({}, element._themes); + var styles = _objectSpread({}, element._themes); if (themeName !== "default") { var theme = themes.themes[themeName]; @@ -180,7 +184,10 @@ function applyThemesOnElement(element, themes, localTheme) { element, styles); } - if (!updateMeta) return; + if (!updateMeta) { + return; + } + var meta = document.querySelector("meta[name=theme-color]"); if (meta) { @@ -195,9 +202,9 @@ function applyThemesOnElement(element, themes, localTheme) { /***/ }), -/***/ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.js": +/***/ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts": /*!***************************************************************************!*\ - !*** ../home-assistant-polymer/src/common/dom/dynamic_content_updater.js ***! + !*** ../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -468,8 +475,9 @@ __webpack_require__.r(__webpack_exports__); var hassAttributeUtil = {}; hassAttributeUtil.DOMAIN_DEVICE_CLASS = { binary_sensor: ["battery", "cold", "connectivity", "door", "garage_door", "gas", "heat", "light", "lock", "moisture", "motion", "moving", "occupancy", "opening", "plug", "power", "presence", "problem", "safety", "smoke", "sound", "vibration", "window"], - cover: ["garage"], - sensor: ["battery", "humidity", "illuminance", "temperature", "pressure"] + cover: ["awning", "blind", "curtain", "damper", "door", "garage", "shade", "shutter", "window"], + sensor: ["battery", "humidity", "illuminance", "temperature", "pressure", "power", "signal_strength"], + switch: ["switch", "outlet"] }; hassAttributeUtil.UNKNOWN_TYPE = "json"; hassAttributeUtil.ADD_TYPE = "key-value"; @@ -522,7 +530,7 @@ hassAttributeUtil.LOGIC_STATE_ATTRIBUTES = hassAttributeUtil.LOGIC_STATE_ATTRIBU type: "array", options: hassAttributeUtil.DOMAIN_DEVICE_CLASS, description: "Device class", - domains: ["binary_sensor", "cover", "sensor"] + domains: ["binary_sensor", "cover", "sensor", "switch"] }, hidden: { type: "boolean", @@ -745,215 +753,373 @@ var htmlLiteral = function htmlLiteral(strings) { /***/ }), -/***/ "./src/elements/cui-base-element.js": -/*!******************************************!*\ - !*** ./src/elements/cui-base-element.js ***! - \******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/lit-element/lib/css-tag.js": +/*!*************************************************!*\ + !*** ./node_modules/lit-element/lib/css-tag.js ***! + \*************************************************/ +/*! exports provided: supportsAdoptingStyleSheets, CSSResult, unsafeCSS, css */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsAdoptingStyleSheets", function() { return supportsAdoptingStyleSheets; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSResult", function() { return CSSResult; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unsafeCSS", function() { return unsafeCSS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - - /** - * @extends HTMLElement - */ - -var CuiBaseElement = +@license +Copyright (c) 2019 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt 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 +*/ +var supportsAdoptingStyleSheets = 'adoptedStyleSheets' in Document.prototype && 'replace' in CSSStyleSheet.prototype; +var constructionToken = Symbol(); +var CSSResult = /*#__PURE__*/ -function (_Polymer$Element) { - _inherits(CuiBaseElement, _Polymer$Element); - - function CuiBaseElement() { - _classCallCheck(this, CuiBaseElement); - - return _possibleConstructorReturn(this, _getPrototypeOf(CuiBaseElement).apply(this, arguments)); - } +function () { + function CSSResult(cssText, safeToken) { + _classCallCheck(this, CSSResult); - _createClass(CuiBaseElement, [{ - key: "computeExtra", - value: function computeExtra(hass, stateObj) { - var extras = stateObj.attributes.extra_data_template; + if (safeToken !== constructionToken) { + throw new Error('CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'); + } - if (extras) { - if (!Array.isArray(extras)) { - extras = [extras]; - } + this.cssText = cssText; + } // Note, this is a getter so that it's lazy. In practice, this means + // stylesheets are not created until the first element instance is made. - return extras.map(function (extra) { - return window.customUI.computeTemplate(extra, hass, hass.states, stateObj, stateObj.attributes, - /* attribute= */ - undefined, stateObj.state); - }).filter(function (result) { - return result !== null; - }); - } - return []; - } - }, { - key: "showLastChanged", - value: function showLastChanged(stateObj, inDialog, extra) { - if (inDialog) return true; - if (extra.length) return false; - return !!stateObj.attributes.show_last_changed; + _createClass(CSSResult, [{ + key: "toString", + value: function toString() { + return this.cssText; } }, { - key: "hasExtra", - value: function hasExtra(extra) { - return extra.length > 0; - } - }], [{ - key: "properties", + key: "styleSheet", get: function get() { - return { - hass: Object, - inDialog: { - type: Boolean, - value: false - }, - stateObj: Object, - controlElement: String, - extra: { - type: Array, - computed: 'computeExtra(hass, stateObj)' + if (this._styleSheet === undefined) { + // Note, if `adoptedStyleSheets` is supported then we assume CSSStyleSheet + // is constructable. + if (supportsAdoptingStyleSheets) { + this._styleSheet = new CSSStyleSheet(); + + this._styleSheet.replaceSync(this.cssText); + } else { + this._styleSheet = null; } - }; + } + + return this._styleSheet; } }]); - return CuiBaseElement; -}(Polymer.Element); + return CSSResult; +}(); +/** + * Wrap a value for interpolation in a css tagged template literal. + * + * This is unsafe because untrusted CSS text can be used to phone home + * or exfiltrate data to an attacker controlled site. Take care to only use + * this with trusted input. + */ + +var unsafeCSS = function unsafeCSS(value) { + return new CSSResult(String(value), constructionToken); +}; + +var textFromCSSResult = function textFromCSSResult(value) { + if (value instanceof CSSResult) { + return value.cssText; + } else { + throw new Error("Value passed to 'css' function must be a 'css' function result: ".concat(value, ". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")); + } +}; +/** + * Template tag which which can be used with LitElement's `style` property to + * set element styles. For security reasons, only literal string values may be + * used. To incorporate non-literal values `unsafeCSS` may be used inside a + * template string part. + */ + + +var css = function css(strings) { + for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + values[_key - 1] = arguments[_key]; + } -/* harmony default export */ __webpack_exports__["default"] = (CuiBaseElement); + var cssText = values.reduce(function (acc, v, idx) { + return acc + textFromCSSResult(v) + strings[idx + 1]; + }, strings[0]); + return new CSSResult(cssText, constructionToken); +}; /***/ }), -/***/ "./src/elements/dynamic-element.js": -/*!*****************************************!*\ - !*** ./src/elements/dynamic-element.js ***! - \*****************************************/ -/*! no exports provided */ +/***/ "./node_modules/lit-element/lib/decorators.js": +/*!****************************************************!*\ + !*** ./node_modules/lit-element/lib/decorators.js ***! + \****************************************************/ +/*! exports provided: customElement, property, query, queryAll, eventOptions */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/dynamic_content_updater.js */ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.js"); -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "customElement", function() { return customElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "property", function() { return property; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "query", function() { return query; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryAll", function() { return queryAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventOptions", function() { return eventOptions; }); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ +var legacyCustomElement = function legacyCustomElement(tagName, clazz) { + window.customElements.define(tagName, clazz); // Cast as any because TS doesn't recognize the return type as being a + // subtype of the decorated class when clazz is typed as + // `Constructor` for some reason. + // `Constructor` is helpful to make sure the decorator is + // applied to elements however. + // tslint:disable-next-line:no-any + + return clazz; +}; -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +var standardCustomElement = function standardCustomElement(tagName, descriptor) { + var kind = descriptor.kind, + elements = descriptor.elements; + return { + kind: kind, + elements: elements, + // This callback is called once the class is otherwise fully defined + finisher: function finisher(clazz) { + window.customElements.define(tagName, clazz); + } + }; +}; +/** + * Class decorator factory that defines the decorated class as a custom element. + * + * @param tagName the name of the custom element to define + */ -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +var customElement = function customElement(tagName) { + return function (classOrDescriptor) { + return typeof classOrDescriptor === 'function' ? legacyCustomElement(tagName, classOrDescriptor) : standardCustomElement(tagName, classOrDescriptor); + }; +}; -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +var standardProperty = function standardProperty(options, element) { + // When decorating an accessor, pass it through and add property metadata. + // Note, the `hasOwnProperty` check in `createProperty` ensures we don't + // stomp over the user's accessor. + if (element.kind === 'method' && element.descriptor && !('value' in element.descriptor)) { + return Object.assign({}, element, { + finisher: function finisher(clazz) { + clazz.createProperty(element.key, options); + } + }); + } else { + // createProperty() takes care of defining the property, but we still + // must return some kind of descriptor, so return a descriptor for an + // unused prototype field. The finisher calls createProperty(). + return { + kind: 'field', + key: Symbol(), + placement: 'own', + descriptor: {}, + // When @babel/plugin-proposal-decorators implements initializers, + // do this instead of the initializer below. See: + // https://github.com/babel/babel/issues/9260 extras: [ + // { + // kind: 'initializer', + // placement: 'own', + // initializer: descriptor.initializer, + // } + // ], + // tslint:disable-next-line:no-any decorator + initializer: function initializer() { + if (typeof element.initializer === 'function') { + this[element.key] = element.initializer.call(this); + } + }, + finisher: function finisher(clazz) { + clazz.createProperty(element.key, options); + } + }; + } +}; -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +var legacyProperty = function legacyProperty(options, proto, name) { + proto.constructor.createProperty(name, options); +}; +/** + * A property decorator which creates a LitElement property which reflects a + * corresponding attribute value. A `PropertyDeclaration` may optionally be + * supplied to configure property features. + * + * @ExportDecoratedItems + */ -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function property(options) { + // tslint:disable-next-line:no-any decorator + return function (protoOrDescriptor, name) { + return name !== undefined ? legacyProperty(options, protoOrDescriptor, name) : standardProperty(options, protoOrDescriptor); + }; +} +/** + * A property decorator that converts a class property into a getter that + * executes a querySelector on the element's renderRoot. + * + * @ExportDecoratedItems + */ +function query(selector) { + return function (protoOrDescriptor, // tslint:disable-next-line:no-any decorator + name) { + var descriptor = { + get: function get() { + return this.renderRoot.querySelector(selector); + }, + enumerable: true, + configurable: true + }; + return name !== undefined ? legacyQuery(descriptor, protoOrDescriptor, name) : standardQuery(descriptor, protoOrDescriptor); + }; +} /** - * @extends HTMLElement + * A property decorator that converts a class property into a getter + * that executes a querySelectorAll on the element's renderRoot. + * + * @ExportDecoratedItems */ -var DynamicElement = -/*#__PURE__*/ -function (_Polymer$Element) { - _inherits(DynamicElement, _Polymer$Element); +function queryAll(selector) { + return function (protoOrDescriptor, // tslint:disable-next-line:no-any decorator + name) { + var descriptor = { + get: function get() { + return this.renderRoot.querySelectorAll(selector); + }, + enumerable: true, + configurable: true + }; + return name !== undefined ? legacyQuery(descriptor, protoOrDescriptor, name) : standardQuery(descriptor, protoOrDescriptor); + }; +} - function DynamicElement() { - _classCallCheck(this, DynamicElement); +var legacyQuery = function legacyQuery(descriptor, proto, name) { + Object.defineProperty(proto, name, descriptor); +}; - return _possibleConstructorReturn(this, _getPrototypeOf(DynamicElement).apply(this, arguments)); - } +var standardQuery = function standardQuery(descriptor, element) { + return { + kind: 'method', + placement: 'prototype', + key: element.key, + descriptor: descriptor + }; +}; - _createClass(DynamicElement, [{ - key: "observerFunc", - value: function observerFunc(hass, stateObj, elementName, inDialog) { - Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, elementName ? elementName.toUpperCase() : 'DIV', { - hass: hass, - stateObj: stateObj, - inDialog: inDialog - }); - } - }], [{ - key: "properties", - get: function get() { - return { - hass: Object, - stateObj: Object, - elementName: String, - inDialog: { - type: Boolean, - value: false - } - }; - } - }, { - key: "observers", - get: function get() { - return ['observerFunc(hass, stateObj, elementName, inDialog)']; +var standardEventOptions = function standardEventOptions(options, element) { + return Object.assign({}, element, { + finisher: function finisher(clazz) { + Object.assign(clazz.prototype[element.key], options); } - }]); + }); +}; + +var legacyEventOptions = // tslint:disable-next-line:no-any legacy decorator +function legacyEventOptions(options, proto, name) { + Object.assign(proto[name], options); +}; +/** + * Adds event listener options to a method used as an event listener in a + * lit-html template. + * + * @param options An object that specifis event listener options as accepted by + * `EventTarget#addEventListener` and `EventTarget#removeEventListener`. + * + * Current browsers support the `capture`, `passive`, and `once` options. See: + * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters + * + * @example + * + * class MyElement { + * + * clicked = false; + * + * render() { + * return html`
`; + * } + * + * @eventOptions({capture: true}) + * _onClick(e) { + * this.clicked = true; + * } + * } + */ - return DynamicElement; -}(Polymer.Element); -customElements.define('dynamic-element', DynamicElement); +var eventOptions = function eventOptions(options) { + return (// Return value typed as any to prevent TypeScript from complaining that + // standard decorator function signature does not match TypeScript decorator + // signature + // TODO(kschaaf): unclear why it was only failing on this decorator and not + // the others + function (protoOrDescriptor, name) { + return name !== undefined ? legacyEventOptions(options, protoOrDescriptor, name) : standardEventOptions(options, protoOrDescriptor); + } + ); +}; /***/ }), -/***/ "./src/elements/dynamic-with-extra.js": -/*!********************************************!*\ - !*** ./src/elements/dynamic-with-extra.js ***! - \********************************************/ -/*! no exports provided */ +/***/ "./node_modules/lit-element/lib/updating-element.js": +/*!**********************************************************!*\ + !*** ./node_modules/lit-element/lib/updating-element.js ***! + \**********************************************************/ +/*! exports provided: defaultConverter, notEqual, UpdatingElement */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @polymer/polymer/lib/utils/html-tag.js */ "./node_modules/@polymer/polymer/lib/utils/html-tag.js"); -/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.js */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.js"); -/* harmony import */ var _dynamic_element_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dynamic-element.js */ "./src/elements/dynamic-element.js"); -/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultConverter", function() { return defaultConverter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "notEqual", function() { return notEqual; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UpdatingElement", function() { return UpdatingElement; }); +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } -function _templateObject() { - var data = _taggedTemplateLiteral(["\n \n \n
\n \n \n
\n "]); +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - _templateObject = function _templateObject() { - return data; - }; +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - return data; -} +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } -function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -965,87 +1131,3796 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } -function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } +function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } + +function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ +/** + * When using Closure Compiler, JSCompiler_renameProperty(property, object) is + * replaced at compile time by the munged name for object[property]. We cannot + * alias this function, so we have to use a small shim that has the same + * behavior when not compiling. + */ +window.JSCompiler_renameProperty = function (prop, _obj) { + return prop; +}; +var defaultConverter = { + toAttribute: function toAttribute(value, type) { + switch (type) { + case Boolean: + return value ? '' : null; + + case Object: + case Array: + // if the value is `null` or `undefined` pass this through + // to allow removing/no change behavior. + return value == null ? value : JSON.stringify(value); + } -customElements.whenDefined('state-card-display').then(function () { - /** - * @extends HTMLElement - */ - var DynamicWithExtra = - /*#__PURE__*/ - function (_customElements$get) { - _inherits(DynamicWithExtra, _customElements$get); + return value; + }, + fromAttribute: function fromAttribute(value, type) { + switch (type) { + case Boolean: + return value !== null; - function DynamicWithExtra() { - _classCallCheck(this, DynamicWithExtra); + case Number: + return value === null ? null : Number(value); - return _possibleConstructorReturn(this, _getPrototypeOf(DynamicWithExtra).apply(this, arguments)); + case Object: + case Array: + return JSON.parse(value); } - _createClass(DynamicWithExtra, [{ - key: "connectedCallback", - value: function connectedCallback() { - _get(_getPrototypeOf(DynamicWithExtra.prototype), "connectedCallback", this).call(this); + return value; + } +}; +/** + * Change function that returns true if `value` is different from `oldValue`. + * This method is used as the default for a property's `hasChanged` function. + */ - this._attached = true; - } - }, { - key: "disconnectedCallback", - value: function disconnectedCallback() { - this._isAttached = false; +var notEqual = function notEqual(value, old) { + // This ensures (old==NaN, value==NaN) always returns false + return old !== value && (old === old || value === value); +}; +var defaultPropertyDeclaration = { + attribute: true, + type: String, + converter: defaultConverter, + reflect: false, + hasChanged: notEqual +}; +var microtaskPromise = Promise.resolve(true); +var STATE_HAS_UPDATED = 1; +var STATE_UPDATE_REQUESTED = 1 << 2; +var STATE_IS_REFLECTING_TO_ATTRIBUTE = 1 << 3; +var STATE_IS_REFLECTING_TO_PROPERTY = 1 << 4; +var STATE_HAS_CONNECTED = 1 << 5; +/** + * Base element class which manages element properties and attributes. When + * properties change, the `update` method is asynchronously called. This method + * should be supplied by subclassers to render updates as desired. + */ - _get(_getPrototypeOf(DynamicWithExtra.prototype), "disconnectedCallback", this).call(this); - } - }, { - key: "computeExtra", - value: function computeExtra(hass, stateObj, attached) { - var _this = this; +var UpdatingElement = +/*#__PURE__*/ +function (_HTMLElement) { + _inherits(UpdatingElement, _HTMLElement); - if (!stateObj.attributes.extra_badge || !attached) return []; - var extraBadges = stateObj.attributes.extra_badge; + function UpdatingElement() { + var _this; - if (!Array.isArray(extraBadges)) { - extraBadges = [extraBadges]; - } + _classCallCheck(this, UpdatingElement); - return extraBadges.map(function (extraBadge) { - var result = null; + _this = _possibleConstructorReturn(this, _getPrototypeOf(UpdatingElement).call(this)); + _this._updateState = 0; + _this._instanceProperties = undefined; + _this._updatePromise = microtaskPromise; + _this._hasConnectedResolver = undefined; + /** + * Map with keys for any properties that have changed since the last + * update cycle with previous values. + */ - if (extraBadge.entity_id && hass.states[extraBadge.entity_id]) { - result = Object.assign({}, window.customUI.maybeChangeObject(_this, hass.states[extraBadge.entity_id], _this.inDialog, - /* allowHidden= */ - false)); - } else if (extraBadge.attribute && stateObj.attributes[extraBadge.attribute] !== undefined) { - result = { - state: String(stateObj.attributes[extraBadge.attribute]), - entity_id: 'none.none', - attributes: { - unit_of_measurement: extraBadge.unit - } - }; - } + _this._changedProperties = new Map(); + /** + * Map with keys of properties that should be reflected when updated. + */ - if (!result) return null; - var blacklist = extraBadge.blacklist_states; + _this._reflectingProperties = undefined; - if (blacklist !== undefined) { - if (!Array.isArray(blacklist)) { - blacklist = [blacklist]; - } + _this.initialize(); - if (blacklist.some(function (v) { + return _this; + } + /** + * Returns a list of attributes corresponding to the registered properties. + * @nocollapse + */ + + + _createClass(UpdatingElement, [{ + key: "initialize", + + /** + * Performs element initialization. By default captures any pre-set values for + * registered properties. + */ + value: function initialize() { + this._saveInstanceProperties(); // ensures first update will be caught by an early access of `updateComplete` + + + this._requestUpdate(); + } + /** + * Fixes any properties set on the instance before upgrade time. + * Otherwise these would shadow the accessor and break these properties. + * The properties are stored in a Map which is played back after the + * constructor runs. Note, on very old versions of Safari (<=9) or Chrome + * (<=41), properties created for native platform properties like (`id` or + * `name`) may not have default values set in the element constructor. On + * these browsers native properties appear on instances and therefore their + * default value will overwrite any element default (e.g. if the element sets + * this.id = 'id' in the constructor, the 'id' will become '' since this is + * the native platform default). + */ + + }, { + key: "_saveInstanceProperties", + value: function _saveInstanceProperties() { + var _this2 = this; + + // Use forEach so this works even if for/of loops are compiled to for loops + // expecting arrays + this.constructor._classProperties.forEach(function (_v, p) { + if (_this2.hasOwnProperty(p)) { + var value = _this2[p]; + delete _this2[p]; + + if (!_this2._instanceProperties) { + _this2._instanceProperties = new Map(); + } + + _this2._instanceProperties.set(p, value); + } + }); + } + /** + * Applies previously saved instance properties. + */ + + }, { + key: "_applyInstanceProperties", + value: function _applyInstanceProperties() { + var _this3 = this; + + // Use forEach so this works even if for/of loops are compiled to for loops + // expecting arrays + // tslint:disable-next-line:no-any + this._instanceProperties.forEach(function (v, p) { + return _this3[p] = v; + }); + + this._instanceProperties = undefined; + } + }, { + key: "connectedCallback", + value: function connectedCallback() { + this._updateState = this._updateState | STATE_HAS_CONNECTED; // Ensure first connection completes an update. Updates cannot complete before + // connection and if one is pending connection the `_hasConnectionResolver` + // will exist. If so, resolve it to complete the update, otherwise + // requestUpdate. + + if (this._hasConnectedResolver) { + this._hasConnectedResolver(); + + this._hasConnectedResolver = undefined; + } + } + /** + * Allows for `super.disconnectedCallback()` in extensions while + * reserving the possibility of making non-breaking feature additions + * when disconnecting at some point in the future. + */ + + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() {} + /** + * Synchronizes property values when attributes change. + */ + + }, { + key: "attributeChangedCallback", + value: function attributeChangedCallback(name, old, value) { + if (old !== value) { + this._attributeToProperty(name, value); + } + } + }, { + key: "_propertyToAttribute", + value: function _propertyToAttribute(name, value) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultPropertyDeclaration; + var ctor = this.constructor; + + var attr = ctor._attributeNameForProperty(name, options); + + if (attr !== undefined) { + var attrValue = ctor._propertyValueToAttribute(value, options); // an undefined value does not change the attribute. + + + if (attrValue === undefined) { + return; + } // Track if the property is being reflected to avoid + // setting the property again via `attributeChangedCallback`. Note: + // 1. this takes advantage of the fact that the callback is synchronous. + // 2. will behave incorrectly if multiple attributes are in the reaction + // stack at time of calling. However, since we process attributes + // in `update` this should not be possible (or an extreme corner case + // that we'd like to discover). + // mark state reflecting + + + this._updateState = this._updateState | STATE_IS_REFLECTING_TO_ATTRIBUTE; + + if (attrValue == null) { + this.removeAttribute(attr); + } else { + this.setAttribute(attr, attrValue); + } // mark state not reflecting + + + this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_ATTRIBUTE; + } + } + }, { + key: "_attributeToProperty", + value: function _attributeToProperty(name, value) { + // Use tracking info to avoid deserializing attribute value if it was + // just set from a property setter. + if (this._updateState & STATE_IS_REFLECTING_TO_ATTRIBUTE) { + return; + } + + var ctor = this.constructor; + + var propName = ctor._attributeToPropertyMap.get(name); + + if (propName !== undefined) { + var options = ctor._classProperties.get(propName) || defaultPropertyDeclaration; // mark state reflecting + + this._updateState = this._updateState | STATE_IS_REFLECTING_TO_PROPERTY; + this[propName] = // tslint:disable-next-line:no-any + ctor._propertyValueFromAttribute(value, options); // mark state not reflecting + + this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_PROPERTY; + } + } + /** + * This private version of `requestUpdate` does not access or return the + * `updateComplete` promise. This promise can be overridden and is therefore + * not free to access. + */ + + }, { + key: "_requestUpdate", + value: function _requestUpdate(name, oldValue) { + var shouldRequestUpdate = true; // If we have a property key, perform property update steps. + + if (name !== undefined) { + var ctor = this.constructor; + var options = ctor._classProperties.get(name) || defaultPropertyDeclaration; + + if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) { + if (!this._changedProperties.has(name)) { + this._changedProperties.set(name, oldValue); + } // Add to reflecting properties set. + // Note, it's important that every change has a chance to add the + // property to `_reflectingProperties`. This ensures setting + // attribute + property reflects correctly. + + + if (options.reflect === true && !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) { + if (this._reflectingProperties === undefined) { + this._reflectingProperties = new Map(); + } + + this._reflectingProperties.set(name, options); + } + } else { + // Abort the request if the property should not be considered changed. + shouldRequestUpdate = false; + } + } + + if (!this._hasRequestedUpdate && shouldRequestUpdate) { + this._enqueueUpdate(); + } + } + /** + * Requests an update which is processed asynchronously. This should + * be called when an element should update based on some state not triggered + * by setting a property. In this case, pass no arguments. It should also be + * called when manually implementing a property setter. In this case, pass the + * property `name` and `oldValue` to ensure that any configured property + * options are honored. Returns the `updateComplete` Promise which is resolved + * when the update completes. + * + * @param name {PropertyKey} (optional) name of requesting property + * @param oldValue {any} (optional) old value of requesting property + * @returns {Promise} A Promise that is resolved when the update completes. + */ + + }, { + key: "requestUpdate", + value: function requestUpdate(name, oldValue) { + this._requestUpdate(name, oldValue); + + return this.updateComplete; + } + /** + * Sets up the element to asynchronously update. + */ + + }, { + key: "_enqueueUpdate", + value: function () { + var _enqueueUpdate2 = _asyncToGenerator( + /*#__PURE__*/ + regeneratorRuntime.mark(function _callee() { + var _this4 = this; + + var resolve, reject, previousUpdatePromise, result; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + // Mark state updating... + this._updateState = this._updateState | STATE_UPDATE_REQUESTED; + previousUpdatePromise = this._updatePromise; + this._updatePromise = new Promise(function (res, rej) { + resolve = res; + reject = rej; + }); + _context.prev = 3; + _context.next = 6; + return previousUpdatePromise; + + case 6: + _context.next = 10; + break; + + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](3); + + case 10: + if (this._hasConnected) { + _context.next = 13; + break; + } + + _context.next = 13; + return new Promise(function (res) { + return _this4._hasConnectedResolver = res; + }); + + case 13: + _context.prev = 13; + result = this.performUpdate(); // If `performUpdate` returns a Promise, we await it. This is done to + // enable coordinating updates with a scheduler. Note, the result is + // checked to avoid delaying an additional microtask unless we need to. + + if (!(result != null)) { + _context.next = 18; + break; + } + + _context.next = 18; + return result; + + case 18: + _context.next = 23; + break; + + case 20: + _context.prev = 20; + _context.t1 = _context["catch"](13); + reject(_context.t1); + + case 23: + resolve(!this._hasRequestedUpdate); + + case 24: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[3, 8], [13, 20]]); + })); + + function _enqueueUpdate() { + return _enqueueUpdate2.apply(this, arguments); + } + + return _enqueueUpdate; + }() + }, { + key: "performUpdate", + + /** + * Performs an element update. Note, if an exception is thrown during the + * update, `firstUpdated` and `updated` will not be called. + * + * You can override this method to change the timing of updates. If this + * method is overridden, `super.performUpdate()` must be called. + * + * For instance, to schedule updates to occur just before the next frame: + * + * ``` + * protected async performUpdate(): Promise { + * await new Promise((resolve) => requestAnimationFrame(() => resolve())); + * super.performUpdate(); + * } + * ``` + */ + value: function performUpdate() { + // Mixin instance properties once, if they exist. + if (this._instanceProperties) { + this._applyInstanceProperties(); + } + + var shouldUpdate = false; + var changedProperties = this._changedProperties; + + try { + shouldUpdate = this.shouldUpdate(changedProperties); + + if (shouldUpdate) { + this.update(changedProperties); + } + } catch (e) { + // Prevent `firstUpdated` and `updated` from running when there's an + // update exception. + shouldUpdate = false; + throw e; + } finally { + // Ensure element can accept additional updates after an exception. + this._markUpdated(); + } + + if (shouldUpdate) { + if (!(this._updateState & STATE_HAS_UPDATED)) { + this._updateState = this._updateState | STATE_HAS_UPDATED; + this.firstUpdated(changedProperties); + } + + this.updated(changedProperties); + } + } + }, { + key: "_markUpdated", + value: function _markUpdated() { + this._changedProperties = new Map(); + this._updateState = this._updateState & ~STATE_UPDATE_REQUESTED; + } + /** + * Returns a Promise that resolves when the element has completed updating. + * The Promise value is a boolean that is `true` if the element completed the + * update without triggering another update. The Promise result is `false` if + * a property was set inside `updated()`. If the Promise is rejected, an + * exception was thrown during the update. This getter can be implemented to + * await additional state. For example, it is sometimes useful to await a + * rendered element before fulfilling this Promise. To do this, first await + * `super.updateComplete` then any subsequent state. + * + * @returns {Promise} The Promise returns a boolean that indicates if the + * update resolved without triggering another update. + */ + + }, { + key: "shouldUpdate", + + /** + * Controls whether or not `update` should be called when the element requests + * an update. By default, this method always returns `true`, but this can be + * customized to control when to update. + * + * * @param _changedProperties Map of changed properties with old values + */ + value: function shouldUpdate(_changedProperties) { + return true; + } + /** + * Updates the element. This method reflects property values to attributes. + * It can be overridden to render and keep updated element DOM. + * Setting properties inside this method will *not* trigger + * another update. + * + * * @param _changedProperties Map of changed properties with old values + */ + + }, { + key: "update", + value: function update(_changedProperties) { + var _this5 = this; + + if (this._reflectingProperties !== undefined && this._reflectingProperties.size > 0) { + // Use forEach so this works even if for/of loops are compiled to for + // loops expecting arrays + this._reflectingProperties.forEach(function (v, k) { + return _this5._propertyToAttribute(k, _this5[k], v); + }); + + this._reflectingProperties = undefined; + } + } + /** + * Invoked whenever the element is updated. Implement to perform + * post-updating tasks via DOM APIs, for example, focusing an element. + * + * Setting properties inside this method will trigger the element to update + * again after this update cycle completes. + * + * * @param _changedProperties Map of changed properties with old values + */ + + }, { + key: "updated", + value: function updated(_changedProperties) {} + /** + * Invoked when the element is first updated. Implement to perform one time + * work on the element after update. + * + * Setting properties inside this method will trigger the element to update + * again after this update cycle completes. + * + * * @param _changedProperties Map of changed properties with old values + */ + + }, { + key: "firstUpdated", + value: function firstUpdated(_changedProperties) {} + }, { + key: "_hasConnected", + get: function get() { + return this._updateState & STATE_HAS_CONNECTED; + } + }, { + key: "_hasRequestedUpdate", + get: function get() { + return this._updateState & STATE_UPDATE_REQUESTED; + } + }, { + key: "hasUpdated", + get: function get() { + return this._updateState & STATE_HAS_UPDATED; + } + }, { + key: "updateComplete", + get: function get() { + return this._updatePromise; + } + }], [{ + key: "_ensureClassProperties", + + /** + * Ensures the private `_classProperties` property metadata is created. + * In addition to `finalize` this is also called in `createProperty` to + * ensure the `@property` decorator can add property metadata. + */ + + /** @nocollapse */ + value: function _ensureClassProperties() { + var _this6 = this; + + // ensure private storage for property declarations. + if (!this.hasOwnProperty(JSCompiler_renameProperty('_classProperties', this))) { + this._classProperties = new Map(); // NOTE: Workaround IE11 not supporting Map constructor argument. + + var superProperties = Object.getPrototypeOf(this)._classProperties; + + if (superProperties !== undefined) { + superProperties.forEach(function (v, k) { + return _this6._classProperties.set(k, v); + }); + } + } + } + /** + * Creates a property accessor on the element prototype if one does not exist. + * The property setter calls the property's `hasChanged` property option + * or uses a strict identity check to determine whether or not to request + * an update. + * @nocollapse + */ + + }, { + key: "createProperty", + value: function createProperty(name) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultPropertyDeclaration; + + // Note, since this can be called by the `@property` decorator which + // is called before `finalize`, we ensure storage exists for property + // metadata. + this._ensureClassProperties(); + + this._classProperties.set(name, options); // Do not generate an accessor if the prototype already has one, since + // it would be lost otherwise and that would never be the user's intention; + // Instead, we expect users to call `requestUpdate` themselves from + // user-defined accessors. Note that if the super has an accessor we will + // still overwrite it + + + if (options.noAccessor || this.prototype.hasOwnProperty(name)) { + return; + } + + var key = _typeof(name) === 'symbol' ? Symbol() : "__".concat(name); + Object.defineProperty(this.prototype, name, { + // tslint:disable-next-line:no-any no symbol in index + get: function get() { + return this[key]; + }, + set: function set(value) { + // tslint:disable-next-line:no-any no symbol in index + var oldValue = this[name]; // tslint:disable-next-line:no-any no symbol in index + + this[key] = value; + + this._requestUpdate(name, oldValue); + }, + configurable: true, + enumerable: true + }); + } + /** + * Creates property accessors for registered properties and ensures + * any superclasses are also finalized. + * @nocollapse + */ + + }, { + key: "finalize", + value: function finalize() { + if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this)) && this.finalized) { + return; + } // finalize any superclasses + + + var superCtor = Object.getPrototypeOf(this); + + if (typeof superCtor.finalize === 'function') { + superCtor.finalize(); + } + + this.finalized = true; + + this._ensureClassProperties(); // initialize Map populated in observedAttributes + + + this._attributeToPropertyMap = new Map(); // make any properties + // Note, only process "own" properties since this element will inherit + // any properties defined on the superClass, and finalization ensures + // the entire prototype chain is finalized. + + if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) { + var props = this.properties; // support symbols in properties (IE11 does not support this) + + var propKeys = [].concat(_toConsumableArray(Object.getOwnPropertyNames(props)), _toConsumableArray(typeof Object.getOwnPropertySymbols === 'function' ? Object.getOwnPropertySymbols(props) : [])); // This for/of is ok because propKeys is an array + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = propKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var p = _step.value; + // note, use of `any` is due to TypeSript lack of support for symbol in + // index types + // tslint:disable-next-line:no-any no symbol in index + this.createProperty(p, props[p]); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + } + /** + * Returns the property name for the given attribute `name`. + * @nocollapse + */ + + }, { + key: "_attributeNameForProperty", + value: function _attributeNameForProperty(name, options) { + var attribute = options.attribute; + return attribute === false ? undefined : typeof attribute === 'string' ? attribute : typeof name === 'string' ? name.toLowerCase() : undefined; + } + /** + * Returns true if a property should request an update. + * Called when a property value is set and uses the `hasChanged` + * option for the property if present or a strict identity check. + * @nocollapse + */ + + }, { + key: "_valueHasChanged", + value: function _valueHasChanged(value, old) { + var hasChanged = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : notEqual; + return hasChanged(value, old); + } + /** + * Returns the property value for the given attribute value. + * Called via the `attributeChangedCallback` and uses the property's + * `converter` or `converter.fromAttribute` property option. + * @nocollapse + */ + + }, { + key: "_propertyValueFromAttribute", + value: function _propertyValueFromAttribute(value, options) { + var type = options.type; + var converter = options.converter || defaultConverter; + var fromAttribute = typeof converter === 'function' ? converter : converter.fromAttribute; + return fromAttribute ? fromAttribute(value, type) : value; + } + /** + * Returns the attribute value for the given property value. If this + * returns undefined, the property will *not* be reflected to an attribute. + * If this returns null, the attribute will be removed, otherwise the + * attribute will be set to the value. + * This uses the property's `reflect` and `type.toAttribute` property options. + * @nocollapse + */ + + }, { + key: "_propertyValueToAttribute", + value: function _propertyValueToAttribute(value, options) { + if (options.reflect === undefined) { + return; + } + + var type = options.type; + var converter = options.converter; + var toAttribute = converter && converter.toAttribute || defaultConverter.toAttribute; + return toAttribute(value, type); + } + }, { + key: "observedAttributes", + get: function get() { + var _this7 = this; + + // note: piggy backing on this to ensure we're finalized. + this.finalize(); + var attributes = []; // Use forEach so this works even if for/of loops are compiled to for loops + // expecting arrays + + this._classProperties.forEach(function (v, p) { + var attr = _this7._attributeNameForProperty(p, v); + + if (attr !== undefined) { + _this7._attributeToPropertyMap.set(attr, p); + + attributes.push(attr); + } + }); + + return attributes; + } + }]); + + return UpdatingElement; +}(_wrapNativeSuper(HTMLElement)); +/** + * Marks class as having finished creating properties. + */ + +UpdatingElement.finalized = true; + +/***/ }), + +/***/ "./node_modules/lit-element/lit-element.js": +/*!*************************************************!*\ + !*** ./node_modules/lit-element/lit-element.js ***! + \*************************************************/ +/*! exports provided: html, svg, TemplateResult, SVGTemplateResult, LitElement, defaultConverter, notEqual, UpdatingElement, customElement, property, query, queryAll, eventOptions, supportsAdoptingStyleSheets, CSSResult, unsafeCSS, css */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LitElement", function() { return LitElement; }); +/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lit-html */ "./node_modules/lit-html/lit-html.js"); +/* harmony import */ var lit_html_lib_shady_render_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lit-html/lib/shady-render.js */ "./node_modules/lit-html/lib/shady-render.js"); +/* harmony import */ var _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/updating-element.js */ "./node_modules/lit-element/lib/updating-element.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultConverter", function() { return _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["defaultConverter"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "notEqual", function() { return _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["notEqual"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UpdatingElement", function() { return _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["UpdatingElement"]; }); + +/* harmony import */ var _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/decorators.js */ "./node_modules/lit-element/lib/decorators.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customElement", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["customElement"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "property", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["property"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "query", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["query"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queryAll", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["queryAll"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eventOptions", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["eventOptions"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["html"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["svg"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateResult", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["TemplateResult"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SVGTemplateResult", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["SVGTemplateResult"]; }); + +/* harmony import */ var _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/css-tag.js */ "./node_modules/lit-element/lib/css-tag.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsAdoptingStyleSheets", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["supportsAdoptingStyleSheets"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSResult", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["CSSResult"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unsafeCSS", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["unsafeCSS"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "css", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["css"]; }); + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + + + + + + + + // IMPORTANT: do not change the property name or the assignment expression. +// This line will be used in regexes to search for LitElement usage. +// TODO(justinfagnani): inject version number at build time + +(window['litElementVersions'] || (window['litElementVersions'] = [])).push('2.0.1'); +/** + * Minimal implementation of Array.prototype.flat + * @param arr the array to flatten + * @param result the accumlated result + */ + +function arrayFlat(styles) { + var result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + for (var i = 0, length = styles.length; i < length; i++) { + var value = styles[i]; + + if (Array.isArray(value)) { + arrayFlat(value, result); + } else { + result.push(value); + } + } + + return result; +} +/** Deeply flattens styles array. Uses native flat if available. */ + + +var flattenStyles = function flattenStyles(styles) { + return styles.flat ? styles.flat(Infinity) : arrayFlat(styles); +}; + +var LitElement = +/*#__PURE__*/ +function (_UpdatingElement) { + _inherits(LitElement, _UpdatingElement); + + function LitElement() { + _classCallCheck(this, LitElement); + + return _possibleConstructorReturn(this, _getPrototypeOf(LitElement).apply(this, arguments)); + } + + _createClass(LitElement, [{ + key: "initialize", + + /** + * Performs element initialization. By default this calls `createRenderRoot` + * to create the element `renderRoot` node and captures any pre-set values for + * registered properties. + */ + value: function initialize() { + _get(_getPrototypeOf(LitElement.prototype), "initialize", this).call(this); + + this.renderRoot = this.createRenderRoot(); // Note, if renderRoot is not a shadowRoot, styles would/could apply to the + // element's getRootNode(). While this could be done, we're choosing not to + // support this now since it would require different logic around de-duping. + + if (window.ShadowRoot && this.renderRoot instanceof window.ShadowRoot) { + this.adoptStyles(); + } + } + /** + * Returns the node into which the element should render and by default + * creates and returns an open shadowRoot. Implement to customize where the + * element's DOM is rendered. For example, to render into the element's + * childNodes, return `this`. + * @returns {Element|DocumentFragment} Returns a node into which to render. + */ + + }, { + key: "createRenderRoot", + value: function createRenderRoot() { + return this.attachShadow({ + mode: 'open' + }); + } + /** + * Applies styling to the element shadowRoot using the `static get styles` + * property. Styling will apply using `shadowRoot.adoptedStyleSheets` where + * available and will fallback otherwise. When Shadow DOM is polyfilled, + * ShadyCSS scopes styles and adds them to the document. When Shadow DOM + * is available but `adoptedStyleSheets` is not, styles are appended to the + * end of the `shadowRoot` to [mimic spec + * behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets). + */ + + }, { + key: "adoptStyles", + value: function adoptStyles() { + var styles = this.constructor._styles; + + if (styles.length === 0) { + return; + } // There are three separate cases here based on Shadow DOM support. + // (1) shadowRoot polyfilled: use ShadyCSS + // (2) shadowRoot.adoptedStyleSheets available: use it. + // (3) shadowRoot.adoptedStyleSheets polyfilled: append styles after + // rendering + + + if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) { + window.ShadyCSS.ScopingShim.prepareAdoptedCssText(styles.map(function (s) { + return s.cssText; + }), this.localName); + } else if (_lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["supportsAdoptingStyleSheets"]) { + this.renderRoot.adoptedStyleSheets = styles.map(function (s) { + return s.styleSheet; + }); + } else { + // This must be done after rendering so the actual style insertion is done + // in `update`. + this._needsShimAdoptedStyleSheets = true; + } + } + }, { + key: "connectedCallback", + value: function connectedCallback() { + _get(_getPrototypeOf(LitElement.prototype), "connectedCallback", this).call(this); // Note, first update/render handles styleElement so we only call this if + // connected after first update. + + + if (this.hasUpdated && window.ShadyCSS !== undefined) { + window.ShadyCSS.styleElement(this); + } + } + /** + * Updates the element. This method reflects property values to attributes + * and calls `render` to render DOM via lit-html. Setting properties inside + * this method will *not* trigger another update. + * * @param _changedProperties Map of changed properties with old values + */ + + }, { + key: "update", + value: function update(changedProperties) { + var _this = this; + + _get(_getPrototypeOf(LitElement.prototype), "update", this).call(this, changedProperties); + + var templateResult = this.render(); + + if (templateResult instanceof lit_html__WEBPACK_IMPORTED_MODULE_0__["TemplateResult"]) { + this.constructor.render(templateResult, this.renderRoot, { + scopeName: this.localName, + eventContext: this + }); + } // When native Shadow DOM is used but adoptedStyles are not supported, + // insert styling after rendering to ensure adoptedStyles have highest + // priority. + + + if (this._needsShimAdoptedStyleSheets) { + this._needsShimAdoptedStyleSheets = false; + + this.constructor._styles.forEach(function (s) { + var style = document.createElement('style'); + style.textContent = s.cssText; + + _this.renderRoot.appendChild(style); + }); + } + } + /** + * Invoked on each update to perform rendering tasks. This method must return + * a lit-html TemplateResult. Setting properties inside this method will *not* + * trigger the element to update. + */ + + }, { + key: "render", + value: function render() {} + }], [{ + key: "finalize", + + /** @nocollapse */ + value: function finalize() { + _get(_getPrototypeOf(LitElement), "finalize", this).call(this); // Prepare styling that is stamped at first render time. Styling + // is built from user provided `styles` or is inherited from the superclass. + + + this._styles = this.hasOwnProperty(JSCompiler_renameProperty('styles', this)) ? this._getUniqueStyles() : this._styles || []; + } + /** @nocollapse */ + + }, { + key: "_getUniqueStyles", + value: function _getUniqueStyles() { + // Take care not to call `this.styles` multiple times since this generates + // new CSSResults each time. + // TODO(sorvell): Since we do not cache CSSResults by input, any + // shared styles will generate new stylesheet objects, which is wasteful. + // This should be addressed when a browser ships constructable + // stylesheets. + var userStyles = this.styles; + var styles = []; + + if (Array.isArray(userStyles)) { + var flatStyles = flattenStyles(userStyles); // As a performance optimization to avoid duplicated styling that can + // occur especially when composing via subclassing, de-duplicate styles + // preserving the last item in the list. The last item is kept to + // try to preserve cascade order with the assumption that it's most + // important that last added styles override previous styles. + + var styleSet = flatStyles.reduceRight(function (set, s) { + set.add(s); // on IE set.add does not return the set. + + return set; + }, new Set()); // Array.from does not work on Set in IE + + styleSet.forEach(function (v) { + return styles.unshift(v); + }); + } else if (userStyles) { + styles.push(userStyles); + } + + return styles; + } + }]); + + return LitElement; +}(_lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["UpdatingElement"]); +/** + * Ensure this class is marked as `finalized` as an optimization ensuring + * it will not needlessly try to `finalize`. + */ + +LitElement.finalized = true; +/** + * Render method used to render the lit-html TemplateResult to the element's + * DOM. + * @param {TemplateResult} Template to render. + * @param {Element|DocumentFragment} Node into which to render. + * @param {String} Element name. + * @nocollapse + */ + +LitElement.render = lit_html_lib_shady_render_js__WEBPACK_IMPORTED_MODULE_1__["render"]; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/default-template-processor.js": +/*!*****************************************************************!*\ + !*** ./node_modules/lit-html/lib/default-template-processor.js ***! + \*****************************************************************/ +/*! exports provided: DefaultTemplateProcessor, defaultTemplateProcessor */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultTemplateProcessor", function() { return DefaultTemplateProcessor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTemplateProcessor", function() { return defaultTemplateProcessor; }); +/* harmony import */ var _parts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parts.js */ "./node_modules/lit-html/lib/parts.js"); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * Creates Parts when a template is instantiated. + */ + +var DefaultTemplateProcessor = +/*#__PURE__*/ +function () { + function DefaultTemplateProcessor() { + _classCallCheck(this, DefaultTemplateProcessor); + } + + _createClass(DefaultTemplateProcessor, [{ + key: "handleAttributeExpressions", + + /** + * Create parts for an attribute-position binding, given the event, attribute + * name, and string literals. + * + * @param element The element containing the binding + * @param name The attribute name + * @param strings The string literals. There are always at least two strings, + * event for fully-controlled bindings with a single expression. + */ + value: function handleAttributeExpressions(element, name, strings, options) { + var prefix = name[0]; + + if (prefix === '.') { + var _comitter = new _parts_js__WEBPACK_IMPORTED_MODULE_0__["PropertyCommitter"](element, name.slice(1), strings); + + return _comitter.parts; + } + + if (prefix === '@') { + return [new _parts_js__WEBPACK_IMPORTED_MODULE_0__["EventPart"](element, name.slice(1), options.eventContext)]; + } + + if (prefix === '?') { + return [new _parts_js__WEBPACK_IMPORTED_MODULE_0__["BooleanAttributePart"](element, name.slice(1), strings)]; + } + + var comitter = new _parts_js__WEBPACK_IMPORTED_MODULE_0__["AttributeCommitter"](element, name, strings); + return comitter.parts; + } + /** + * Create parts for a text-position binding. + * @param templateFactory + */ + + }, { + key: "handleTextExpression", + value: function handleTextExpression(options) { + return new _parts_js__WEBPACK_IMPORTED_MODULE_0__["NodePart"](options); + } + }]); + + return DefaultTemplateProcessor; +}(); +var defaultTemplateProcessor = new DefaultTemplateProcessor(); + +/***/ }), + +/***/ "./node_modules/lit-html/lib/directive.js": +/*!************************************************!*\ + !*** ./node_modules/lit-html/lib/directive.js ***! + \************************************************/ +/*! exports provided: directive, isDirective */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "directive", function() { return directive; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDirective", function() { return isDirective; }); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ +var directives = new WeakMap(); +/** + * Brands a function as a directive so that lit-html will call the function + * during template rendering, rather than passing as a value. + * + * @param f The directive factory function. Must be a function that returns a + * function of the signature `(part: Part) => void`. The returned function will + * be called with the part object + * + * @example + * + * ``` + * import {directive, html} from 'lit-html'; + * + * const immutable = directive((v) => (part) => { + * if (part.value !== v) { + * part.setValue(v) + * } + * }); + * ``` + */ +// tslint:disable-next-line:no-any + +var directive = function directive(f) { + return function () { + var d = f.apply(void 0, arguments); + directives.set(d, true); + return d; + }; +}; +var isDirective = function isDirective(o) { + return typeof o === 'function' && directives.has(o); +}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/dom.js": +/*!******************************************!*\ + !*** ./node_modules/lit-html/lib/dom.js ***! + \******************************************/ +/*! exports provided: isCEPolyfill, reparentNodes, removeNodes */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCEPolyfill", function() { return isCEPolyfill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reparentNodes", function() { return reparentNodes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeNodes", function() { return removeNodes; }); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * True if the custom elements polyfill is in use. + */ +var isCEPolyfill = window.customElements !== undefined && window.customElements.polyfillWrapFlushCallback !== undefined; +/** + * Reparents nodes, starting from `startNode` (inclusive) to `endNode` + * (exclusive), into another container (could be the same container), before + * `beforeNode`. If `beforeNode` is null, it appends the nodes to the + * container. + */ + +var reparentNodes = function reparentNodes(container, start) { + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var before = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + var node = start; + + while (node !== end) { + var n = node.nextSibling; + container.insertBefore(node, before); + node = n; + } +}; +/** + * Removes nodes, starting from `startNode` (inclusive) to `endNode` + * (exclusive), from `container`. + */ + +var removeNodes = function removeNodes(container, startNode) { + var endNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var node = startNode; + + while (node !== endNode) { + var n = node.nextSibling; + container.removeChild(node); + node = n; + } +}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/modify-template.js": +/*!******************************************************!*\ + !*** ./node_modules/lit-html/lib/modify-template.js ***! + \******************************************************/ +/*! exports provided: removeNodesFromTemplate, insertNodeIntoTemplate */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeNodesFromTemplate", function() { return removeNodesFromTemplate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertNodeIntoTemplate", function() { return insertNodeIntoTemplate; }); +/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./template.js */ "./node_modules/lit-html/lib/template.js"); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * @module shady-render + */ + +var walkerNodeFilter = 133 +/* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */ +; +/** + * Removes the list of nodes from a Template safely. In addition to removing + * nodes from the Template, the Template part indices are updated to match + * the mutated Template DOM. + * + * As the template is walked the removal state is tracked and + * part indices are adjusted as needed. + * + * div + * div#1 (remove) <-- start removing (removing node is div#1) + * div + * div#2 (remove) <-- continue removing (removing node is still div#1) + * div + * div <-- stop removing since previous sibling is the removing node (div#1, + * removed 4 nodes) + */ + +function removeNodesFromTemplate(template, nodesToRemove) { + var content = template.element.content, + parts = template.parts; + var walker = document.createTreeWalker(content, walkerNodeFilter, null, false); + var partIndex = nextActiveIndexInTemplateParts(parts); + var part = parts[partIndex]; + var nodeIndex = -1; + var removeCount = 0; + var nodesToRemoveInTemplate = []; + var currentRemovingNode = null; + + while (walker.nextNode()) { + nodeIndex++; + var node = walker.currentNode; // End removal if stepped past the removing node + + if (node.previousSibling === currentRemovingNode) { + currentRemovingNode = null; + } // A node to remove was found in the template + + + if (nodesToRemove.has(node)) { + nodesToRemoveInTemplate.push(node); // Track node we're removing + + if (currentRemovingNode === null) { + currentRemovingNode = node; + } + } // When removing, increment count by which to adjust subsequent part indices + + + if (currentRemovingNode !== null) { + removeCount++; + } + + while (part !== undefined && part.index === nodeIndex) { + // If part is in a removed node deactivate it by setting index to -1 or + // adjust the index as needed. + part.index = currentRemovingNode !== null ? -1 : part.index - removeCount; // go to the next active part. + + partIndex = nextActiveIndexInTemplateParts(parts, partIndex); + part = parts[partIndex]; + } + } + + nodesToRemoveInTemplate.forEach(function (n) { + return n.parentNode.removeChild(n); + }); +} + +var countNodes = function countNodes(node) { + var count = node.nodeType === 11 + /* Node.DOCUMENT_FRAGMENT_NODE */ + ? 0 : 1; + var walker = document.createTreeWalker(node, walkerNodeFilter, null, false); + + while (walker.nextNode()) { + count++; + } + + return count; +}; + +var nextActiveIndexInTemplateParts = function nextActiveIndexInTemplateParts(parts) { + var startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + + for (var i = startIndex + 1; i < parts.length; i++) { + var part = parts[i]; + + if (Object(_template_js__WEBPACK_IMPORTED_MODULE_0__["isTemplatePartActive"])(part)) { + return i; + } + } + + return -1; +}; +/** + * Inserts the given node into the Template, optionally before the given + * refNode. In addition to inserting the node into the Template, the Template + * part indices are updated to match the mutated Template DOM. + */ + + +function insertNodeIntoTemplate(template, node) { + var refNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var content = template.element.content, + parts = template.parts; // If there's no refNode, then put node at end of template. + // No part indices need to be shifted in this case. + + if (refNode === null || refNode === undefined) { + content.appendChild(node); + return; + } + + var walker = document.createTreeWalker(content, walkerNodeFilter, null, false); + var partIndex = nextActiveIndexInTemplateParts(parts); + var insertCount = 0; + var walkerIndex = -1; + + while (walker.nextNode()) { + walkerIndex++; + var walkerNode = walker.currentNode; + + if (walkerNode === refNode) { + insertCount = countNodes(node); + refNode.parentNode.insertBefore(node, refNode); + } + + while (partIndex !== -1 && parts[partIndex].index === walkerIndex) { + // If we've inserted the node, simply adjust all subsequent parts + if (insertCount > 0) { + while (partIndex !== -1) { + parts[partIndex].index += insertCount; + partIndex = nextActiveIndexInTemplateParts(parts, partIndex); + } + + return; + } + + partIndex = nextActiveIndexInTemplateParts(parts, partIndex); + } + } +} + +/***/ }), + +/***/ "./node_modules/lit-html/lib/part.js": +/*!*******************************************!*\ + !*** ./node_modules/lit-html/lib/part.js ***! + \*******************************************/ +/*! exports provided: noChange, nothing */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noChange", function() { return noChange; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nothing", function() { return nothing; }); +/** + * @license + * Copyright (c) 2018 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * A sentinel value that signals that a value was handled by a directive and + * should not be written to the DOM. + */ +var noChange = {}; +/** + * A sentinel value that signals a NodePart to fully clear its content. + */ + +var nothing = {}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/parts.js": +/*!********************************************!*\ + !*** ./node_modules/lit-html/lib/parts.js ***! + \********************************************/ +/*! exports provided: isPrimitive, AttributeCommitter, AttributePart, NodePart, BooleanAttributePart, PropertyCommitter, PropertyPart, EventPart */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPrimitive", function() { return isPrimitive; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttributeCommitter", function() { return AttributeCommitter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttributePart", function() { return AttributePart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NodePart", function() { return NodePart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanAttributePart", function() { return BooleanAttributePart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyCommitter", function() { return PropertyCommitter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyPart", function() { return PropertyPart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventPart", function() { return EventPart; }); +/* harmony import */ var _directive_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./directive.js */ "./node_modules/lit-html/lib/directive.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom.js */ "./node_modules/lit-html/lib/dom.js"); +/* harmony import */ var _part_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./part.js */ "./node_modules/lit-html/lib/part.js"); +/* harmony import */ var _template_instance_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./template-instance.js */ "./node_modules/lit-html/lib/template-instance.js"); +/* harmony import */ var _template_result_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./template-result.js */ "./node_modules/lit-html/lib/template-result.js"); +/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./template.js */ "./node_modules/lit-html/lib/template.js"); +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * @module lit-html + */ + + + + + + +var isPrimitive = function isPrimitive(value) { + return value === null || !(_typeof(value) === 'object' || typeof value === 'function'); +}; +/** + * Sets attribute values for AttributeParts, so that the value is only set once + * even if there are multiple parts for an attribute. + */ + +var AttributeCommitter = +/*#__PURE__*/ +function () { + function AttributeCommitter(element, name, strings) { + _classCallCheck(this, AttributeCommitter); + + this.dirty = true; + this.element = element; + this.name = name; + this.strings = strings; + this.parts = []; + + for (var i = 0; i < strings.length - 1; i++) { + this.parts[i] = this._createPart(); + } + } + /** + * Creates a single part. Override this to create a differnt type of part. + */ + + + _createClass(AttributeCommitter, [{ + key: "_createPart", + value: function _createPart() { + return new AttributePart(this); + } + }, { + key: "_getValue", + value: function _getValue() { + var strings = this.strings; + var l = strings.length - 1; + var text = ''; + + for (var i = 0; i < l; i++) { + text += strings[i]; + var part = this.parts[i]; + + if (part !== undefined) { + var v = part.value; + + if (v != null && (Array.isArray(v) || // tslint:disable-next-line:no-any + typeof v !== 'string' && v[Symbol.iterator])) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = v[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var t = _step.value; + text += typeof t === 'string' ? t : String(t); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } else { + text += typeof v === 'string' ? v : String(v); + } + } + } + + text += strings[l]; + return text; + } + }, { + key: "commit", + value: function commit() { + if (this.dirty) { + this.dirty = false; + this.element.setAttribute(this.name, this._getValue()); + } + } + }]); + + return AttributeCommitter; +}(); +var AttributePart = +/*#__PURE__*/ +function () { + function AttributePart(comitter) { + _classCallCheck(this, AttributePart); + + this.value = undefined; + this.committer = comitter; + } + + _createClass(AttributePart, [{ + key: "setValue", + value: function setValue(value) { + if (value !== _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"] && (!isPrimitive(value) || value !== this.value)) { + this.value = value; // If the value is a not a directive, dirty the committer so that it'll + // call setAttribute. If the value is a directive, it'll dirty the + // committer if it calls setValue(). + + if (!Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(value)) { + this.committer.dirty = true; + } + } + } + }, { + key: "commit", + value: function commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this.value)) { + var directive = this.value; + this.value = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + if (this.value === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + this.committer.commit(); + } + }]); + + return AttributePart; +}(); +var NodePart = +/*#__PURE__*/ +function () { + function NodePart(options) { + _classCallCheck(this, NodePart); + + this.value = undefined; + this._pendingValue = undefined; + this.options = options; + } + /** + * Inserts this part into a container. + * + * This part must be empty, as its contents are not automatically moved. + */ + + + _createClass(NodePart, [{ + key: "appendInto", + value: function appendInto(container) { + this.startNode = container.appendChild(Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + this.endNode = container.appendChild(Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + } + /** + * Inserts this part between `ref` and `ref`'s next sibling. Both `ref` and + * its next sibling must be static, unchanging nodes such as those that appear + * in a literal section of a template. + * + * This part must be empty, as its contents are not automatically moved. + */ + + }, { + key: "insertAfterNode", + value: function insertAfterNode(ref) { + this.startNode = ref; + this.endNode = ref.nextSibling; + } + /** + * Appends this part into a parent part. + * + * This part must be empty, as its contents are not automatically moved. + */ + + }, { + key: "appendIntoPart", + value: function appendIntoPart(part) { + part._insert(this.startNode = Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + + part._insert(this.endNode = Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + } + /** + * Appends this part after `ref` + * + * This part must be empty, as its contents are not automatically moved. + */ + + }, { + key: "insertAfterPart", + value: function insertAfterPart(ref) { + ref._insert(this.startNode = Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + + this.endNode = ref.endNode; + ref.endNode = this.startNode; + } + }, { + key: "setValue", + value: function setValue(value) { + this._pendingValue = value; + } + }, { + key: "commit", + value: function commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this._pendingValue)) { + var directive = this._pendingValue; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + var value = this._pendingValue; + + if (value === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + if (isPrimitive(value)) { + if (value !== this.value) { + this._commitText(value); + } + } else if (value instanceof _template_result_js__WEBPACK_IMPORTED_MODULE_4__["TemplateResult"]) { + this._commitTemplateResult(value); + } else if (value instanceof Node) { + this._commitNode(value); + } else if (Array.isArray(value) || // tslint:disable-next-line:no-any + value[Symbol.iterator]) { + this._commitIterable(value); + } else if (value === _part_js__WEBPACK_IMPORTED_MODULE_2__["nothing"]) { + this.value = _part_js__WEBPACK_IMPORTED_MODULE_2__["nothing"]; + this.clear(); + } else { + // Fallback, will render the string representation + this._commitText(value); + } + } + }, { + key: "_insert", + value: function _insert(node) { + this.endNode.parentNode.insertBefore(node, this.endNode); + } + }, { + key: "_commitNode", + value: function _commitNode(value) { + if (this.value === value) { + return; + } + + this.clear(); + + this._insert(value); + + this.value = value; + } + }, { + key: "_commitText", + value: function _commitText(value) { + var node = this.startNode.nextSibling; + value = value == null ? '' : value; + + if (node === this.endNode.previousSibling && node.nodeType === 3 + /* Node.TEXT_NODE */ + ) { + // If we only have a single text node between the markers, we can just + // set its value, rather than replacing it. + // TODO(justinfagnani): Can we just check if this.value is primitive? + node.data = value; + } else { + this._commitNode(document.createTextNode(typeof value === 'string' ? value : String(value))); + } + + this.value = value; + } + }, { + key: "_commitTemplateResult", + value: function _commitTemplateResult(value) { + var template = this.options.templateFactory(value); + + if (this.value instanceof _template_instance_js__WEBPACK_IMPORTED_MODULE_3__["TemplateInstance"] && this.value.template === template) { + this.value.update(value.values); + } else { + // Make sure we propagate the template processor from the TemplateResult + // so that we use its syntax extension, etc. The template factory comes + // from the render function options so that it can control template + // caching and preprocessing. + var instance = new _template_instance_js__WEBPACK_IMPORTED_MODULE_3__["TemplateInstance"](template, value.processor, this.options); + + var fragment = instance._clone(); + + instance.update(value.values); + + this._commitNode(fragment); + + this.value = instance; + } + } + }, { + key: "_commitIterable", + value: function _commitIterable(value) { + // For an Iterable, we create a new InstancePart per item, then set its + // value to the item. This is a little bit of overhead for every item in + // an Iterable, but it lets us recurse easily and efficiently update Arrays + // of TemplateResults that will be commonly returned from expressions like: + // array.map((i) => html`${i}`), by reusing existing TemplateInstances. + // If _value is an array, then the previous render was of an + // iterable and _value will contain the NodeParts from the previous + // render. If _value is not an array, clear this part and make a new + // array for NodeParts. + if (!Array.isArray(this.value)) { + this.value = []; + this.clear(); + } // Lets us keep track of how many items we stamped so we can clear leftover + // items from a previous render + + + var itemParts = this.value; + var partIndex = 0; + var itemPart; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var item = _step2.value; + // Try to reuse an existing part + itemPart = itemParts[partIndex]; // If no existing part, create a new one + + if (itemPart === undefined) { + itemPart = new NodePart(this.options); + itemParts.push(itemPart); + + if (partIndex === 0) { + itemPart.appendIntoPart(this); + } else { + itemPart.insertAfterPart(itemParts[partIndex - 1]); + } + } + + itemPart.setValue(item); + itemPart.commit(); + partIndex++; + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return != null) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + if (partIndex < itemParts.length) { + // Truncate the parts array so _value reflects the current state + itemParts.length = partIndex; + this.clear(itemPart && itemPart.endNode); + } + } + }, { + key: "clear", + value: function clear() { + var startNode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.startNode; + Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["removeNodes"])(this.startNode.parentNode, startNode.nextSibling, this.endNode); + } + }]); + + return NodePart; +}(); +/** + * Implements a boolean attribute, roughly as defined in the HTML + * specification. + * + * If the value is truthy, then the attribute is present with a value of + * ''. If the value is falsey, the attribute is removed. + */ + +var BooleanAttributePart = +/*#__PURE__*/ +function () { + function BooleanAttributePart(element, name, strings) { + _classCallCheck(this, BooleanAttributePart); + + this.value = undefined; + this._pendingValue = undefined; + + if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') { + throw new Error('Boolean attributes can only contain a single expression'); + } + + this.element = element; + this.name = name; + this.strings = strings; + } + + _createClass(BooleanAttributePart, [{ + key: "setValue", + value: function setValue(value) { + this._pendingValue = value; + } + }, { + key: "commit", + value: function commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this._pendingValue)) { + var directive = this._pendingValue; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + if (this._pendingValue === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + var value = !!this._pendingValue; + + if (this.value !== value) { + if (value) { + this.element.setAttribute(this.name, ''); + } else { + this.element.removeAttribute(this.name); + } + } + + this.value = value; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + } + }]); + + return BooleanAttributePart; +}(); +/** + * Sets attribute values for PropertyParts, so that the value is only set once + * even if there are multiple parts for a property. + * + * If an expression controls the whole property value, then the value is simply + * assigned to the property under control. If there are string literals or + * multiple expressions, then the strings are expressions are interpolated into + * a string first. + */ + +var PropertyCommitter = +/*#__PURE__*/ +function (_AttributeCommitter) { + _inherits(PropertyCommitter, _AttributeCommitter); + + function PropertyCommitter(element, name, strings) { + var _this; + + _classCallCheck(this, PropertyCommitter); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(PropertyCommitter).call(this, element, name, strings)); + _this.single = strings.length === 2 && strings[0] === '' && strings[1] === ''; + return _this; + } + + _createClass(PropertyCommitter, [{ + key: "_createPart", + value: function _createPart() { + return new PropertyPart(this); + } + }, { + key: "_getValue", + value: function _getValue() { + if (this.single) { + return this.parts[0].value; + } + + return _get(_getPrototypeOf(PropertyCommitter.prototype), "_getValue", this).call(this); + } + }, { + key: "commit", + value: function commit() { + if (this.dirty) { + this.dirty = false; // tslint:disable-next-line:no-any + + this.element[this.name] = this._getValue(); + } + } + }]); + + return PropertyCommitter; +}(AttributeCommitter); +var PropertyPart = +/*#__PURE__*/ +function (_AttributePart) { + _inherits(PropertyPart, _AttributePart); + + function PropertyPart() { + _classCallCheck(this, PropertyPart); + + return _possibleConstructorReturn(this, _getPrototypeOf(PropertyPart).apply(this, arguments)); + } + + return PropertyPart; +}(AttributePart); // Detect event listener options support. If the `capture` property is read +// from the options object, then options are supported. If not, then the thrid +// argument to add/removeEventListener is interpreted as the boolean capture +// value so we should only pass the `capture` property. + +var eventOptionsSupported = false; + +try { + var options = { + get capture() { + eventOptionsSupported = true; + return false; + } + + }; // tslint:disable-next-line:no-any + + window.addEventListener('test', options, options); // tslint:disable-next-line:no-any + + window.removeEventListener('test', options, options); +} catch (_e) {} + +var EventPart = +/*#__PURE__*/ +function () { + function EventPart(element, eventName, eventContext) { + var _this2 = this; + + _classCallCheck(this, EventPart); + + this.value = undefined; + this._pendingValue = undefined; + this.element = element; + this.eventName = eventName; + this.eventContext = eventContext; + + this._boundHandleEvent = function (e) { + return _this2.handleEvent(e); + }; + } + + _createClass(EventPart, [{ + key: "setValue", + value: function setValue(value) { + this._pendingValue = value; + } + }, { + key: "commit", + value: function commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this._pendingValue)) { + var directive = this._pendingValue; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + if (this._pendingValue === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + var newListener = this._pendingValue; + var oldListener = this.value; + var shouldRemoveListener = newListener == null || oldListener != null && (newListener.capture !== oldListener.capture || newListener.once !== oldListener.once || newListener.passive !== oldListener.passive); + var shouldAddListener = newListener != null && (oldListener == null || shouldRemoveListener); + + if (shouldRemoveListener) { + this.element.removeEventListener(this.eventName, this._boundHandleEvent, this._options); + } + + if (shouldAddListener) { + this._options = getOptions(newListener); + this.element.addEventListener(this.eventName, this._boundHandleEvent, this._options); + } + + this.value = newListener; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + } + }, { + key: "handleEvent", + value: function handleEvent(event) { + if (typeof this.value === 'function') { + this.value.call(this.eventContext || this.element, event); + } else { + this.value.handleEvent(event); + } + } + }]); + + return EventPart; +}(); // We copy options because of the inconsistent behavior of browsers when reading +// the third argument of add/removeEventListener. IE11 doesn't support options +// at all. Chrome 41 only reads `capture` if the argument is an object. + +var getOptions = function getOptions(o) { + return o && (eventOptionsSupported ? { + capture: o.capture, + passive: o.passive, + once: o.once + } : o.capture); +}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/render.js": +/*!*********************************************!*\ + !*** ./node_modules/lit-html/lib/render.js ***! + \*********************************************/ +/*! exports provided: parts, render */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parts", function() { return parts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/lit-html/lib/dom.js"); +/* harmony import */ var _parts_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parts.js */ "./node_modules/lit-html/lib/parts.js"); +/* harmony import */ var _template_factory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./template-factory.js */ "./node_modules/lit-html/lib/template-factory.js"); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * @module lit-html + */ + + + +var parts = new WeakMap(); +/** + * Renders a template to a container. + * + * To update a container with new values, reevaluate the template literal and + * call `render` with the new result. + * + * @param result a TemplateResult created by evaluating a template tag like + * `html` or `svg`. + * @param container A DOM parent to render to. The entire contents are either + * replaced, or efficiently updated if the same result type was previous + * rendered there. + * @param options RenderOptions for the entire render tree rendered to this + * container. Render options must *not* change between renders to the same + * container, as those changes will not effect previously rendered DOM. + */ + +var render = function render(result, container, options) { + var part = parts.get(container); + + if (part === undefined) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeNodes"])(container, container.firstChild); + parts.set(container, part = new _parts_js__WEBPACK_IMPORTED_MODULE_1__["NodePart"](Object.assign({ + templateFactory: _template_factory_js__WEBPACK_IMPORTED_MODULE_2__["templateFactory"] + }, options))); + part.appendInto(container); + } + + part.setValue(result); + part.commit(); +}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/shady-render.js": +/*!***************************************************!*\ + !*** ./node_modules/lit-html/lib/shady-render.js ***! + \***************************************************/ +/*! exports provided: html, svg, TemplateResult, render */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/lit-html/lib/dom.js"); +/* harmony import */ var _modify_template_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modify-template.js */ "./node_modules/lit-html/lib/modify-template.js"); +/* harmony import */ var _render_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./render.js */ "./node_modules/lit-html/lib/render.js"); +/* harmony import */ var _template_factory_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./template-factory.js */ "./node_modules/lit-html/lib/template-factory.js"); +/* harmony import */ var _template_instance_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./template-instance.js */ "./node_modules/lit-html/lib/template-instance.js"); +/* harmony import */ var _template_result_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./template-result.js */ "./node_modules/lit-html/lib/template-result.js"); +/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./template.js */ "./node_modules/lit-html/lib/template.js"); +/* harmony import */ var _lit_html_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lit-html.js */ "./node_modules/lit-html/lit-html.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return _lit_html_js__WEBPACK_IMPORTED_MODULE_7__["html"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return _lit_html_js__WEBPACK_IMPORTED_MODULE_7__["svg"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateResult", function() { return _lit_html_js__WEBPACK_IMPORTED_MODULE_7__["TemplateResult"]; }); + +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * Module to add shady DOM/shady CSS polyfill support to lit-html template + * rendering. See the [[render]] method for details. + * + * @module shady-render + * @preferred + */ + +/** + * Do not remove this comment; it keeps typedoc from misplacing the module + * docs. + */ + + + + + + + + // Get a key to lookup in `templateCaches`. + +var getTemplateCacheKey = function getTemplateCacheKey(type, scopeName) { + return "".concat(type, "--").concat(scopeName); +}; + +var compatibleShadyCSSVersion = true; + +if (typeof window.ShadyCSS === 'undefined') { + compatibleShadyCSSVersion = false; +} else if (typeof window.ShadyCSS.prepareTemplateDom === 'undefined') { + console.warn("Incompatible ShadyCSS version detected." + "Please update to at least @webcomponents/webcomponentsjs@2.0.2 and" + "@webcomponents/shadycss@1.3.1."); + compatibleShadyCSSVersion = false; +} +/** + * Template factory which scopes template DOM using ShadyCSS. + * @param scopeName {string} + */ + + +var shadyTemplateFactory = function shadyTemplateFactory(scopeName) { + return function (result) { + var cacheKey = getTemplateCacheKey(result.type, scopeName); + var templateCache = _template_factory_js__WEBPACK_IMPORTED_MODULE_3__["templateCaches"].get(cacheKey); + + if (templateCache === undefined) { + templateCache = { + stringsArray: new WeakMap(), + keyString: new Map() + }; + _template_factory_js__WEBPACK_IMPORTED_MODULE_3__["templateCaches"].set(cacheKey, templateCache); + } + + var template = templateCache.stringsArray.get(result.strings); + + if (template !== undefined) { + return template; + } + + var key = result.strings.join(_template_js__WEBPACK_IMPORTED_MODULE_6__["marker"]); + template = templateCache.keyString.get(key); + + if (template === undefined) { + var element = result.getTemplateElement(); + + if (compatibleShadyCSSVersion) { + window.ShadyCSS.prepareTemplateDom(element, scopeName); + } + + template = new _template_js__WEBPACK_IMPORTED_MODULE_6__["Template"](result, element); + templateCache.keyString.set(key, template); + } + + templateCache.stringsArray.set(result.strings, template); + return template; + }; +}; + +var TEMPLATE_TYPES = ['html', 'svg']; +/** + * Removes all style elements from Templates for the given scopeName. + */ + +var removeStylesFromLitTemplates = function removeStylesFromLitTemplates(scopeName) { + TEMPLATE_TYPES.forEach(function (type) { + var templates = _template_factory_js__WEBPACK_IMPORTED_MODULE_3__["templateCaches"].get(getTemplateCacheKey(type, scopeName)); + + if (templates !== undefined) { + templates.keyString.forEach(function (template) { + var content = template.element.content; // IE 11 doesn't support the iterable param Set constructor + + var styles = new Set(); + Array.from(content.querySelectorAll('style')).forEach(function (s) { + styles.add(s); + }); + Object(_modify_template_js__WEBPACK_IMPORTED_MODULE_1__["removeNodesFromTemplate"])(template, styles); + }); + } + }); +}; + +var shadyRenderSet = new Set(); +/** + * For the given scope name, ensures that ShadyCSS style scoping is performed. + * This is done just once per scope name so the fragment and template cannot + * be modified. + * (1) extracts styles from the rendered fragment and hands them to ShadyCSS + * to be scoped and appended to the document + * (2) removes style elements from all lit-html Templates for this scope name. + * + * Note, \n \n
\n \n \n
\n "]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + + + + + +customElements.whenDefined('state-card-display').then(function () { + /** + * @extends HTMLElement + */ + var DynamicWithExtra = + /*#__PURE__*/ + function (_customElements$get) { + _inherits(DynamicWithExtra, _customElements$get); + + function DynamicWithExtra() { + _classCallCheck(this, DynamicWithExtra); + + return _possibleConstructorReturn(this, _getPrototypeOf(DynamicWithExtra).apply(this, arguments)); + } + + _createClass(DynamicWithExtra, [{ + key: "connectedCallback", + value: function connectedCallback() { + _get(_getPrototypeOf(DynamicWithExtra.prototype), "connectedCallback", this).call(this); + + this._attached = true; + } + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + this._isAttached = false; + + _get(_getPrototypeOf(DynamicWithExtra.prototype), "disconnectedCallback", this).call(this); + } + }, { + key: "computeExtra", + value: function computeExtra(hass, stateObj, attached) { + var _this = this; + + if (!stateObj.attributes.extra_badge || !attached) return []; + var extraBadges = stateObj.attributes.extra_badge; + + if (!Array.isArray(extraBadges)) { + extraBadges = [extraBadges]; + } + + return extraBadges.map(function (extraBadge) { + var result = null; + + if (extraBadge.entity_id && hass.states[extraBadge.entity_id]) { + result = Object.assign({}, window.customUI.maybeChangeObject(_this, hass.states[extraBadge.entity_id], _this.inDialog, + /* allowHidden= */ + false)); + } else if (extraBadge.attribute && stateObj.attributes[extraBadge.attribute] !== undefined) { + result = { + state: String(stateObj.attributes[extraBadge.attribute]), + entity_id: 'none.none', + attributes: { + unit_of_measurement: extraBadge.unit + } + }; + } + + if (!result) return null; + var blacklist = extraBadge.blacklist_states; + + if (blacklist !== undefined) { + if (!Array.isArray(blacklist)) { + blacklist = [blacklist]; + } + + if (blacklist.some(function (v) { return RegExp(v).test(result.state.toString()); })) { return null; @@ -1116,7 +4991,7 @@ customElements.whenDefined('state-card-display').then(function () { key: "applyThemes", value: function applyThemes(hass, element, stateObj) { var themeName = stateObj.attributes.theme || 'default'; - Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element, hass.themes || { + Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_1__["default"])(element, hass.themes || { default_theme: 'default', themes: {} }, themeName); @@ -1176,13 +5051,12 @@ customElements.whenDefined('state-card-display').then(function () { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @polymer/polymer/lib/utils/html-tag.js */ "./node_modules/@polymer/polymer/lib/utils/html-tag.js"); -/* harmony import */ var _mixins_events_mixin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/events-mixin.js */ "./src/mixins/events-mixin.js"); -/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); +/* harmony import */ var lit_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lit-element */ "./node_modules/lit-element/lit-element.js"); +/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _templateObject() { - var data = _taggedTemplateLiteral(["\n \n \n \n \n \n
Custom UI settings
\n
\n
\n\n \n \n
\n Set device name so that you can reference it in per-device settings\n \n
\n
\n
\n
\n "]); + var data = _taggedTemplateLiteral(["\n \n \n \n \n \n
Custom UI settings
\n
\n
\n\n \n \n
\n Set device name so that you can reference it in per-device settings\n \n
\n
\n
\n
\n "]); _templateObject = function _templateObject() { return data; @@ -1215,15 +5089,14 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func - /** * @extends HTMLElement */ var HaConfigCustomUi = /*#__PURE__*/ -function (_EventsMixin) { - _inherits(HaConfigCustomUi, _EventsMixin); +function (_LitElement) { + _inherits(HaConfigCustomUi, _LitElement); function HaConfigCustomUi() { _classCallCheck(this, HaConfigCustomUi); @@ -1232,9 +5105,23 @@ function (_EventsMixin) { } _createClass(HaConfigCustomUi, [{ - key: "ready", - value: function ready() { - _get(_getPrototypeOf(HaConfigCustomUi.prototype), "ready", this).call(this); + key: "render", + value: function render() { + return Object(lit_element__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject(), this._backHandler, this.isWide); + } + }, { + key: "attributeChangedCallback", + value: function attributeChangedCallback(name, oldval, newval) { + if (name === 'name') { + this.nameChanged(newval); + } + + _get(_getPrototypeOf(HaConfigCustomUi.prototype), "attributeChangedCallback", this).call(this, name, oldval, newval); + } + }, { + key: "connectedCallback", + value: function connectedCallback() { + _get(_getPrototypeOf(HaConfigCustomUi.prototype), "connectedCallback", this).call(this); this.name = window.customUI.getName(); } @@ -1247,20 +5134,20 @@ function (_EventsMixin) { key: "_backHandler", value: function _backHandler() { window.history.back(); - this.fire('location-changed'); + var event = new CustomEvent('location-changed'); + this.dispatchEvent(event); } }], [{ - key: "template", - get: function get() { - return Object(_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject()); - } - }, { key: "properties", get: function get() { return { - isWide: Boolean, + isWide: { + type: Boolean, + attribute: 'is-wide' + }, name: { type: String, + reflect: true, observer: 'nameChanged' } }; @@ -1268,7 +5155,7 @@ function (_EventsMixin) { }]); return HaConfigCustomUi; -}(Object(_mixins_events_mixin_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Polymer.Element)); +}(lit_element__WEBPACK_IMPORTED_MODULE_0__["LitElement"]); customElements.define('ha-config-custom-ui', HaConfigCustomUi); @@ -1287,7 +5174,7 @@ __webpack_require__.r(__webpack_exports__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _templateObject() { - var data = _taggedTemplateLiteral(["\n \n\n \n \n "]); + var data = _taggedTemplateLiteral(["\n \n\n \n \n "]); _templateObject = function _templateObject() { return data; @@ -1319,127 +5206,144 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -/** - * @extends HTMLElement - */ -var HaThemedSlider = -/*#__PURE__*/ -function (_Polymer$Element) { - _inherits(HaThemedSlider, _Polymer$Element); +function loadCustomUI() { + /** + * @extends HTMLElement + */ + var HaThemedSlider = + /*#__PURE__*/ + function (_Polymer$Element) { + _inherits(HaThemedSlider, _Polymer$Element); - function HaThemedSlider() { - _classCallCheck(this, HaThemedSlider); + function HaThemedSlider() { + _classCallCheck(this, HaThemedSlider); - return _possibleConstructorReturn(this, _getPrototypeOf(HaThemedSlider).apply(this, arguments)); - } + return _possibleConstructorReturn(this, _getPrototypeOf(HaThemedSlider).apply(this, arguments)); + } - _createClass(HaThemedSlider, [{ - key: "ready", - value: function ready() { - _get(_getPrototypeOf(HaThemedSlider.prototype), "ready", this).call(this); + _createClass(HaThemedSlider, [{ + key: "ready", + value: function ready() { + _get(_getPrototypeOf(HaThemedSlider.prototype), "ready", this).call(this); - this.disableOffWhenMin = !this._computeAttribute(this.theme, 'off_when_min', !this.disableOffWhenMin); - this.computeEnabledThemedReportWhenNotChanged(this.theme, this.disableReportWhenNotChanged); - } - }, { - key: "computeEnabledThemedReportWhenNotChanged", - value: function computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged) { - this._enabledThemedReportWhenNotChanged = this._computeAttribute(theme, 'report_when_not_changed', !disableReportWhenNotChanged); - } - }, { - key: "_computeAttribute", - value: function _computeAttribute(theme, attr, def) { - if (theme) { - if (attr in theme) { - return theme[attr]; - } + this.disableOffWhenMin = !this._computeAttribute(this.theme, 'off_when_min', !this.disableOffWhenMin); + this.computeEnabledThemedReportWhenNotChanged(this.theme, this.disableReportWhenNotChanged); } + }, { + key: "connectedCallback", + value: function connectedCallback() { + _get(_getPrototypeOf(HaThemedSlider.prototype), "connectedCallback", this).call(this); - return def; - } - }, { - key: "computeClass", - value: function computeClass(theme, isOn, themedMin) { - var result = ''; + this.$.slider._keyBindings = this.$.slider._keyBindings || {}; + } + }, { + key: "computeEnabledThemedReportWhenNotChanged", + value: function computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged) { + this._enabledThemedReportWhenNotChanged = this._computeAttribute(theme, 'report_when_not_changed', !disableReportWhenNotChanged); + } + }, { + key: "_computeAttribute", + value: function _computeAttribute(theme, attr, def) { + if (theme) { + if (attr in theme) { + return theme[attr]; + } + } - if (isOn) { - result += 'is-on '; + return def; } + }, { + key: "computeClass", + value: function computeClass(theme, isOn, themedMin) { + var result = ''; + + if (isOn) { + result += 'is-on '; + } - if (this._computeAttribute(theme, 'off_when_min', !this.disableOffWhenMin) || themedMin === 0) { - // If offWhenMin is enabled don't customize. - return ''; + if (this._computeAttribute(theme, 'off_when_min', !this.disableOffWhenMin) || themedMin === 0) { + // If offWhenMin is enabled don't customize. + return ''; + } + + return "".concat(result, "disable-off-when-min"); } + }, { + key: "valueChanged", + value: function valueChanged(ev) { + if (!this._enabledThemedReportWhenNotChanged && this.value === ev.target.value) { + ev.stopPropagation(); + return; + } - return "".concat(result, "disable-off-when-min"); - } - }, { - key: "valueChanged", - value: function valueChanged(ev) { - if (!this._enabledThemedReportWhenNotChanged && this.value === ev.target.value) { - ev.stopPropagation(); - return; + this.value = ev.target.value; + } + }], [{ + key: "template", + get: function get() { + return Object(_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject()); + } + }, { + key: "properties", + get: function get() { + return { + min: { + type: Number, + value: 0 + }, + max: { + type: Number, + value: 100 + }, + pin: { + type: Boolean, + value: false + }, + isOn: { + type: Boolean, + value: false + }, + disableOffWhenMin: { + type: Boolean, + value: false, + notify: true + }, + disableReportWhenNotChanged: { + type: Boolean, + value: false + }, + theme: Object, + value: { + type: Number, + notify: true + }, + _themedMin: { + type: Number, + computed: '_computeAttribute(theme, "min", min)' + } + }; + } + }, { + key: "observers", + get: function get() { + return ['computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged)']; } + }]); - this.value = ev.target.value; - } - }], [{ - key: "template", - get: function get() { - return Object(_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject()); - } - }, { - key: "properties", - get: function get() { - return { - min: { - type: Number, - value: 0 - }, - max: { - type: Number, - value: 100 - }, - pin: { - type: Boolean, - value: false - }, - isOn: { - type: Boolean, - value: false - }, - disableOffWhenMin: { - type: Boolean, - value: false, - notify: true - }, - disableReportWhenNotChanged: { - type: Boolean, - value: false - }, - theme: Object, - value: { - type: Number, - notify: true - }, - _themedMin: { - type: Number, - computed: '_computeAttribute(theme, "min", min)' - } - }; - } - }, { - key: "observers", - get: function get() { - return ['computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged)']; - } - }]); + return HaThemedSlider; + }(Polymer.Element); - return HaThemedSlider; -}(Polymer.Element); + customElements.define('ha-themed-slider', HaThemedSlider); +} -customElements.define('ha-themed-slider', HaThemedSlider); +if (Polymer && Polymer.Element && customElements.get('home-assistant')) { + loadCustomUI(); +} else { + customElements.whenDefined('home-assistant').then(function () { + return loadCustomUI(); + }); +} /***/ }), @@ -1452,9 +5356,9 @@ customElements.define('ha-themed-slider', HaThemedSlider); "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.js */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.js"); +/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts"); /* harmony import */ var _home_assistant_polymer_src_common_entity_compute_state_domain_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/entity/compute_state_domain.ts */ "../home-assistant-polymer/src/common/entity/compute_state_domain.ts"); -/* harmony import */ var _home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/dynamic_content_updater.js */ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.js"); +/* harmony import */ var _home_assistant_polymer_src_common_dom_dynamic_content_updater_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts */ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts"); /* harmony import */ var _home_assistant_polymer_src_common_entity_state_card_type_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/entity/state_card_type.ts */ "../home-assistant-polymer/src/common/entity/state_card_type.ts"); /* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); /* harmony import */ var _state_card_with_slider_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./state-card-with-slider.js */ "./src/elements/state-card-with-slider.js"); @@ -1488,311 +5392,322 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func -var SHOW_LAST_CHANGED_BLACKLISTED_CARDS = ['configurator']; -var DOMAIN_TO_SLIDER_SUPPORT = { - light: 1, - // SUPPORT_BRIGHTNESS - cover: 4, - // SUPPORT_SET_POSITION - climate: 1 // SUPPORT_TARGET_TEMPERATURE -}; -var TYPE_TO_CONTROL = { - toggle: 'ha-entity-toggle', - display: '', - cover: 'ha-cover-controls' -}; -/** - * @extends HTMLElement - */ +function loadCustomUI() { + var SHOW_LAST_CHANGED_BLACKLISTED_CARDS = ['configurator']; + var DOMAIN_TO_SLIDER_SUPPORT = { + light: 1, + // SUPPORT_BRIGHTNESS + cover: 4, + // SUPPORT_SET_POSITION + climate: 1 // SUPPORT_TARGET_TEMPERATURE -var StateCardCustomUi = -/*#__PURE__*/ -function (_Polymer$Element) { - _inherits(StateCardCustomUi, _Polymer$Element); + }; + var TYPE_TO_CONTROL = { + toggle: 'ha-entity-toggle', + display: '', + cover: 'ha-cover-controls' + }; + /** + * @extends HTMLElement + */ - function StateCardCustomUi() { - _classCallCheck(this, StateCardCustomUi); + var StateCardCustomUi = + /*#__PURE__*/ + function (_Polymer$Element) { + _inherits(StateCardCustomUi, _Polymer$Element); - return _possibleConstructorReturn(this, _getPrototypeOf(StateCardCustomUi).apply(this, arguments)); - } + function StateCardCustomUi() { + _classCallCheck(this, StateCardCustomUi); - _createClass(StateCardCustomUi, [{ - key: "connectedCallback", - value: function connectedCallback() { - _get(_getPrototypeOf(StateCardCustomUi.prototype), "connectedCallback", this).call(this); + return _possibleConstructorReturn(this, _getPrototypeOf(StateCardCustomUi).apply(this, arguments)); + } - var container = this.parentNode.parentNode; + _createClass(StateCardCustomUi, [{ + key: "connectedCallback", + value: function connectedCallback() { + _get(_getPrototypeOf(StateCardCustomUi.prototype), "connectedCallback", this).call(this); - if (container.tagName === 'DIV' && (container.classList.contains('state') || container.classList.contains('child-card'))) { - this._container = container; // Since this doesn't actually change the background - no need to clear it. + var container = this.parentNode.parentNode; - container.style.setProperty('background-color', 'var(--paper-card-background-color, inherit)'); // Polyfill 'updateStyles'. + if (container.tagName === 'DIV' && (container.classList.contains('state') || container.classList.contains('child-card'))) { + this._container = container; // Since this doesn't actually change the background - no need to clear it. - if (!container.updateStyles) { - container.updateStyles = function (styles) { - Object.keys(styles).forEach(function (key) { - container.style.setProperty(key, styles[key]); - }); - }; + container.style.setProperty('background-color', 'var(--paper-card-background-color, inherit)'); // Polyfill 'updateStyles'. + + if (!container.updateStyles) { + container.updateStyles = function (styles) { + Object.keys(styles).forEach(function (key) { + container.style.setProperty(key, styles[key]); + }); + }; + } } + + this._isAttached = true; + this.inputChanged(this.hass, this.inDialog, this.stateObj); } + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + this._isAttached = false; - this._isAttached = true; - this.inputChanged(this.hass, this.inDialog, this.stateObj); - } - }, { - key: "disconnectedCallback", - value: function disconnectedCallback() { - this._isAttached = false; + if (this._container) { + this._container.updateStyles({ + display: '', + margin: '', + padding: '' + }); - if (this._container) { - this._container.updateStyles({ - display: '', - margin: '', - padding: '' - }); + Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__["default"])(this._container, this.hass.themes || { + default_theme: 'default', + themes: {} + }, 'default'); + this._container = null; + } - Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._container, this.hass.themes || { - default_theme: 'default', - themes: {} - }, 'default'); - this._container = null; + _get(_getPrototypeOf(StateCardCustomUi.prototype), "disconnectedCallback", this).call(this); } + }, { + key: "badgeMode", + value: function badgeMode(hass, stateObj, domain) { + var _this = this; - _get(_getPrototypeOf(StateCardCustomUi.prototype), "disconnectedCallback", this).call(this); - } - }, { - key: "badgeMode", - value: function badgeMode(hass, stateObj, domain) { - var _this = this; + var states = []; - var states = []; + if (domain === 'group') { + stateObj.attributes.entity_id.forEach(function (id) { + var state = hass.states[id]; - if (domain === 'group') { - stateObj.attributes.entity_id.forEach(function (id) { - var state = hass.states[id]; + if (!state) { + /* eslint-disable no-console */ + console.warn("Unknown ID ".concat(id, " in group ").concat(stateObj.entity_id)); + /* eslint-enable no-console */ - if (!state) { - /* eslint-disable no-console */ - console.warn("Unknown ID ".concat(id, " in group ").concat(stateObj.entity_id)); - /* eslint-enable no-console */ + return; + } - return; - } + if (!stateObj.attributes.badges_list || stateObj.attributes.badges_list.includes(state.entity_id)) { + states.push(window.customUI.maybeChangeObject(_this, state, false + /* inDialog */ + , false + /* allowHidden */ + )); + } + }); + } else { + states.push(stateObj); - if (!stateObj.attributes.badges_list || stateObj.attributes.badges_list.includes(state.entity_id)) { - states.push(window.customUI.maybeChangeObject(_this, state, false - /* inDialog */ - , false - /* allowHidden */ - )); - } - }); - } else { - states.push(stateObj); + if (this._container) { + this._container.style.display = 'inline-block'; + var params = { + display: 'inline-block' + }; - if (this._container) { - this._container.style.display = 'inline-block'; - var params = { - display: 'inline-block' - }; + if (this._container.classList.contains('state')) { + params.margin = 'var(--ha-badges-card-margin, 0)'; + } - if (this._container.classList.contains('state')) { - params.margin = 'var(--ha-badges-card-margin, 0)'; + this.updateStyles(params); } + } + + Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_ts__WEBPACK_IMPORTED_MODULE_2__["default"])(this, 'HA-BADGES-CARD', { + hass: hass, + states: states + }); - this.updateStyles(params); + if (this._container) { + this._container.updateStyles({ + width: 'var(--ha-badges-card-width, initial)', + 'text-align': 'var(--ha-badges-card-text-align, initial)' + }); } - } - Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this, 'HA-BADGES-CARD', { - hass: hass, - states: states - }); + this.lastChild.style.fontSize = '85%'; // Since this variable only affects badges mode - no need to clean it up. - if (this._container) { - this._container.updateStyles({ - width: 'var(--ha-badges-card-width, initial)', - 'text-align': 'var(--ha-badges-card-text-align, initial)' - }); + this.style.setProperty('--ha-state-label-badge-margin-bottom', '0'); } + }, { + key: "cleanBadgeStyle", + value: function cleanBadgeStyle() { + if (this._container) { + this._container.updateStyles({ + display: '', + width: '', + 'text-align': '' + }); + } - this.lastChild.style.fontSize = '85%'; // Since this variable only affects badges mode - no need to clean it up. - - this.style.setProperty('--ha-state-label-badge-margin-bottom', '0'); - } - }, { - key: "cleanBadgeStyle", - value: function cleanBadgeStyle() { - if (this._container) { - this._container.updateStyles({ + this.updateStyles({ display: '', - width: '', - 'text-align': '' + margin: '' }); } + }, { + key: "applyThemes", + value: function applyThemes(hass, modifiedObj) { + var themeTarget = this; + var themeName = 'default'; - this.updateStyles({ - display: '', - margin: '' - }); - } - }, { - key: "applyThemes", - value: function applyThemes(hass, modifiedObj) { - var themeTarget = this; - var themeName = 'default'; + if (this._container) { + themeTarget = this._container; + } - if (this._container) { - themeTarget = this._container; - } + if (modifiedObj.attributes.theme) { + themeName = modifiedObj.attributes.theme; + } - if (modifiedObj.attributes.theme) { - themeName = modifiedObj.attributes.theme; + Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__["default"])(themeTarget, hass.themes || { + default_theme: 'default', + themes: {} + }, themeName); } + }, { + key: "maybeHideEntity", + value: function maybeHideEntity(modifiedObj) { + if (!modifiedObj) { + if (this.lastChild) { + this.removeChild(this.lastChild); + } - Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__["default"])(themeTarget, hass.themes || { - default_theme: 'default', - themes: {} - }, themeName); - } - }, { - key: "maybeHideEntity", - value: function maybeHideEntity(modifiedObj) { - if (!modifiedObj) { - if (this.lastChild) { - this.removeChild(this.lastChild); + if (this._container) { + this._container.updateStyles({ + margin: '0', + padding: '0' + }); + } + + return true; } if (this._container) { this._container.updateStyles({ - margin: '0', - padding: '0' + margin: '', + padding: '' }); } - return true; + return false; } - - if (this._container) { - this._container.updateStyles({ - margin: '', - padding: '' - }); + }, { + key: "sliderEligible_", + value: function sliderEligible_(domain, obj, inDialog) { + if (inDialog) return false; + return DOMAIN_TO_SLIDER_SUPPORT[domain] && DOMAIN_TO_SLIDER_SUPPORT[domain] & obj.attributes.supported_features && obj.attributes.state_card_mode && obj.attributes.state_card_mode !== 'no-slider'; } + }, { + key: "inputChanged", + value: function inputChanged(hass, inDialog, stateObj) { + if (!stateObj || !hass || !this._isAttached) return; + var domain = Object(_home_assistant_polymer_src_common_entity_compute_state_domain_ts__WEBPACK_IMPORTED_MODULE_1__["default"])(stateObj); + var modifiedObj = window.customUI.maybeChangeObject(this, stateObj, inDialog, true + /* allowHidden */ + ); + if (this.maybeHideEntity(modifiedObj)) return; + this.applyThemes(hass, modifiedObj); - return false; - } - }, { - key: "sliderEligible_", - value: function sliderEligible_(domain, obj, inDialog) { - if (inDialog) return false; - return DOMAIN_TO_SLIDER_SUPPORT[domain] && DOMAIN_TO_SLIDER_SUPPORT[domain] & obj.attributes.supported_features && obj.attributes.state_card_mode && obj.attributes.state_card_mode !== 'no-slider'; - } - }, { - key: "inputChanged", - value: function inputChanged(hass, inDialog, stateObj) { - if (!stateObj || !hass || !this._isAttached) return; - var domain = Object(_home_assistant_polymer_src_common_entity_compute_state_domain_ts__WEBPACK_IMPORTED_MODULE_1__["default"])(stateObj); - var modifiedObj = window.customUI.maybeChangeObject(this, stateObj, inDialog, true - /* allowHidden */ - ); - if (this.maybeHideEntity(modifiedObj)) return; - this.applyThemes(hass, modifiedObj); - - if (!inDialog && modifiedObj.attributes.state_card_mode === 'badges') { - this.badgeMode(hass, modifiedObj, domain); - } else { - this.regularMode_(hass, inDialog, modifiedObj, domain); - } - } - }, { - key: "regularMode_", - value: function regularMode_(hass, inDialog, stateObj, domain) { - this.cleanBadgeStyle(); - var params = { - hass: hass, - stateObj: stateObj, - inDialog: inDialog - }; - var originalStateCardType = Object(_home_assistant_polymer_src_common_entity_state_card_type_ts__WEBPACK_IMPORTED_MODULE_3__["default"])(hass, stateObj); - var customStateCardType; - var secondaryStateCardType = stateObj.attributes.state_card_custom_ui_secondary; - - if (domain === 'light' && this.sliderEligible_(domain, stateObj, inDialog)) { - Object.assign(params, { - controlElement: 'ha-entity-toggle', - serviceMin: 'turn_off', - serviceMax: 'turn_on', - valueName: 'brightness', - domain: domain - }); - customStateCardType = 'state-card-with-slider'; - } else if (domain === 'cover' && this.sliderEligible_(domain, stateObj, inDialog)) { - Object.assign(params, { - controlElement: 'ha-cover-controls', - max: 100, - serviceMin: 'close_cover', - serviceMax: 'set_cover_position', - setValueName: 'position', - valueName: 'current_position', - nameOn: 'open', - domain: domain - }); - customStateCardType = 'state-card-with-slider'; - } else if (domain === 'climate' && this.sliderEligible_(domain, stateObj, inDialog)) { - Object.assign(params, { - controlElement: 'ha-climate-state', - min: stateObj.attributes.min_temp || -100, - max: stateObj.attributes.max_temp || 200, - serviceMin: 'set_temperature', - serviceMax: 'set_temperature', - valueName: 'temperature', - nameOn: '', - domain: domain - }); - customStateCardType = 'state-card-with-slider'; - } else if (TYPE_TO_CONTROL[originalStateCardType] !== undefined) { - params.controlElement = TYPE_TO_CONTROL[originalStateCardType]; - customStateCardType = 'state-card-without-slider'; - } else if (stateObj.attributes.show_last_changed && !SHOW_LAST_CHANGED_BLACKLISTED_CARDS.includes(originalStateCardType)) { - params.inDialog = true; + if (!inDialog && modifiedObj.attributes.state_card_mode === 'badges') { + this.badgeMode(hass, modifiedObj, domain); + } else { + this.regularMode_(hass, inDialog, modifiedObj, domain); + } } + }, { + key: "regularMode_", + value: function regularMode_(hass, inDialog, stateObj, domain) { + this.cleanBadgeStyle(); + var params = { + hass: hass, + stateObj: stateObj, + inDialog: inDialog + }; + var originalStateCardType = Object(_home_assistant_polymer_src_common_entity_state_card_type_ts__WEBPACK_IMPORTED_MODULE_3__["default"])(hass, stateObj); + var customStateCardType; + var secondaryStateCardType = stateObj.attributes.state_card_custom_ui_secondary; + + if (domain === 'light' && this.sliderEligible_(domain, stateObj, inDialog)) { + Object.assign(params, { + controlElement: 'ha-entity-toggle', + serviceMin: 'turn_off', + serviceMax: 'turn_on', + valueName: 'brightness', + domain: domain + }); + customStateCardType = 'state-card-with-slider'; + } else if (domain === 'cover' && this.sliderEligible_(domain, stateObj, inDialog)) { + Object.assign(params, { + controlElement: 'ha-cover-controls', + max: 100, + serviceMin: 'close_cover', + serviceMax: 'set_cover_position', + setValueName: 'position', + valueName: 'current_position', + nameOn: 'open', + domain: domain + }); + customStateCardType = 'state-card-with-slider'; + } else if (domain === 'climate' && this.sliderEligible_(domain, stateObj, inDialog)) { + Object.assign(params, { + controlElement: 'ha-climate-state', + min: stateObj.attributes.min_temp || -100, + max: stateObj.attributes.max_temp || 200, + serviceMin: 'set_temperature', + serviceMax: 'set_temperature', + valueName: 'temperature', + nameOn: '', + domain: domain + }); + customStateCardType = 'state-card-with-slider'; + } else if (TYPE_TO_CONTROL[originalStateCardType] !== undefined) { + params.controlElement = TYPE_TO_CONTROL[originalStateCardType]; + customStateCardType = 'state-card-without-slider'; + } else if (stateObj.attributes.show_last_changed && !SHOW_LAST_CHANGED_BLACKLISTED_CARDS.includes(originalStateCardType)) { + params.inDialog = true; + } + + if (stateObj.state === 'unavailable') { + params.controlElement = ''; + } + + if (stateObj.attributes.control_element !== undefined) { + params.controlElement = stateObj.attributes.control_element; + } - if (stateObj.state === 'unavailable') { - params.controlElement = ''; + Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_ts__WEBPACK_IMPORTED_MODULE_2__["default"])(this, (secondaryStateCardType || customStateCardType || "STATE-CARD-".concat(originalStateCardType)).toUpperCase(), params); + } + }], [{ + key: "properties", + get: function get() { + return { + hass: Object, + inDialog: { + type: Boolean, + value: false + }, + stateObj: Object + }; } - - if (stateObj.attributes.control_element !== undefined) { - params.controlElement = stateObj.attributes.control_element; + }, { + key: "observers", + get: function get() { + return ['inputChanged(hass, inDialog, stateObj)']; } + }]); - Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this, (secondaryStateCardType || customStateCardType || "STATE-CARD-".concat(originalStateCardType)).toUpperCase(), params); - } - }], [{ - key: "properties", - get: function get() { - return { - hass: Object, - inDialog: { - type: Boolean, - value: false - }, - stateObj: Object - }; - } - }, { - key: "observers", - get: function get() { - return ['inputChanged(hass, inDialog, stateObj)']; - } - }]); + return StateCardCustomUi; + }(Polymer.Element); - return StateCardCustomUi; -}(Polymer.Element); + customElements.define('state-card-custom-ui', StateCardCustomUi); +} -customElements.define('state-card-custom-ui', StateCardCustomUi); +if (Polymer && Polymer.Element && customElements.get('home-assistant')) { + loadCustomUI(); +} else { + customElements.whenDefined('home-assistant').then(function () { + return loadCustomUI(); + }); +} /***/ }), @@ -1812,7 +5727,7 @@ __webpack_require__.r(__webpack_exports__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _templateObject() { - var data = _taggedTemplateLiteral(["\n \n \n\n
\n
\n \n \n \n \n
\n \n
\n "]); + var data = _taggedTemplateLiteral(["\n \n \n\n
\n
\n \n \n \n \n
\n \n
\n "]); _templateObject = function _templateObject() { return data; @@ -1855,287 +5770,297 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func -/** - * @extends HTMLElement - */ - -var StateCardWithSlider = -/*#__PURE__*/ -function (_CuiBaseElement) { - _inherits(StateCardWithSlider, _CuiBaseElement); - - function StateCardWithSlider() { - _classCallCheck(this, StateCardWithSlider); - return _possibleConstructorReturn(this, _getPrototypeOf(StateCardWithSlider).apply(this, arguments)); - } +function loadCustomUI() { + /** + * @extends HTMLElement + */ + var StateCardWithSlider = + /*#__PURE__*/ + function (_CuiBaseElement) { + _inherits(StateCardWithSlider, _CuiBaseElement); - _createClass(StateCardWithSlider, [{ - key: "ready", - value: function ready() { - _get(_getPrototypeOf(StateCardWithSlider.prototype), "ready", this).call(this); + function StateCardWithSlider() { + _classCallCheck(this, StateCardWithSlider); - this._onIronResize = this._onIronResize.bind(this); + return _possibleConstructorReturn(this, _getPrototypeOf(StateCardWithSlider).apply(this, arguments)); } - }, { - key: "connectedCallback", - value: function connectedCallback() { - _get(_getPrototypeOf(StateCardWithSlider.prototype), "connectedCallback", this).call(this); - this._isConnected = true; - window.addEventListener('resize', this._onIronResize); - - this._waitForLayout(); - } - }, { - key: "disconnectedCallback", - value: function disconnectedCallback() { - window.removeEventListener('resize', this._onIronResize); - this._isConnected = false; + _createClass(StateCardWithSlider, [{ + key: "ready", + value: function ready() { + _get(_getPrototypeOf(StateCardWithSlider.prototype), "ready", this).call(this); - _get(_getPrototypeOf(StateCardWithSlider.prototype), "disconnectedCallback", this).call(this); - } - }, { - key: "_waitForLayout", - value: function _waitForLayout() { - var _this = this; + this._onIronResize = this._onIronResize.bind(this); + } + }, { + key: "connectedCallback", + value: function connectedCallback() { + _get(_getPrototypeOf(StateCardWithSlider.prototype), "connectedCallback", this).call(this); - if (!this._isConnected) return; + this._isConnected = true; + window.addEventListener('resize', this._onIronResize); - this._setMode(); + this._waitForLayout(); + } + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + window.removeEventListener('resize', this._onIronResize); + this._isConnected = false; - if (this._frameId) return; - this.readyToCompute = false; - this._frameId = window.requestAnimationFrame(function () { - _this._frameId = null; - _this.readyToCompute = true; + _get(_getPrototypeOf(StateCardWithSlider.prototype), "disconnectedCallback", this).call(this); + } + }, { + key: "_waitForLayout", + value: function _waitForLayout() { + var _this = this; - _this._onIronResize(); - }); - } - }, { - key: "_setMode", - value: function _setMode() { - var obj = { - hideSlider: this.mode === 'hide-slider' && this.lineTooLong, - breakSlider: (this.mode === 'break-slider' || this.mode === 'hide-slider') && this.lineTooLong - }; + if (!this._isConnected) return; - if (!this.showSlider) { - obj.breakSlider = true; - } + this._setMode(); - this.setProperties(obj); - } - }, { - key: "_onIronResize", - value: function _onIronResize() { - if (!this.readyToCompute) return; + if (this._frameId) return; + this.readyToCompute = false; + this._frameId = window.requestAnimationFrame(function () { + _this._frameId = null; + _this.readyToCompute = true; - if (this.mode === 'no-slider') { - this.setProperties({ - hideSlider: true, - breakSlider: true + _this._onIronResize(); }); - return; } + }, { + key: "_setMode", + value: function _setMode() { + var obj = { + hideSlider: this.mode === 'hide-slider' && this.lineTooLong, + breakSlider: (this.mode === 'break-slider' || this.mode === 'hide-slider') && this.lineTooLong + }; - var prevBreakSlider = this.breakSlider; - var prevHideSlider = this.hideSlider; - this.setProperties({ - lineTooLong: false, - hideSlider: false, - breakSlider: false - }); - var container = this.$.container; - var containerWidth = container.clientWidth; - if (containerWidth === 0) return; - - if (containerWidth <= this.minLineBreak) { - this.lineTooLong = true; - } else if (containerWidth >= this.maxLineBreak) { - this.lineTooLong = false; - } else { - if (prevHideSlider && this.mode === 'hide-slider') { - // We need to unhide the slider in order to recalculate height. - this._waitForLayout(); + if (!this.showSlider) { + obj.breakSlider = true; + } + this.setProperties(obj); + } + }, { + key: "_onIronResize", + value: function _onIronResize() { + if (!this.readyToCompute) return; + + if (this.mode === 'no-slider') { + this.setProperties({ + hideSlider: true, + breakSlider: true + }); return; } - var containerHeight = container.clientHeight; - var stateHeight = this.root.querySelector('.state-info').clientHeight; - this.lineTooLong = containerHeight > stateHeight * 1.5; + var prevBreakSlider = this.breakSlider; + var prevHideSlider = this.hideSlider; + this.setProperties({ + lineTooLong: false, + hideSlider: false, + breakSlider: false + }); + var container = this.$.container; + var containerWidth = container.clientWidth; + if (containerWidth === 0) return; + + if (containerWidth <= this.minLineBreak) { + this.lineTooLong = true; + } else if (containerWidth >= this.maxLineBreak) { + this.lineTooLong = false; + } else { + if (prevHideSlider && this.mode === 'hide-slider') { + // We need to unhide the slider in order to recalculate height. + this._waitForLayout(); + + return; + } - if (this.lineTooLong) { - this.minLineBreak = containerWidth; - } else if (!prevBreakSlider) { - this.maxLineBreak = containerWidth; + var containerHeight = container.clientHeight; + var stateHeight = this.root.querySelector('.state-info').clientHeight; + this.lineTooLong = containerHeight > stateHeight * 1.5; + + if (this.lineTooLong) { + this.minLineBreak = containerWidth; + } else if (!prevBreakSlider) { + this.maxLineBreak = containerWidth; + } } - } - this._setMode(); - } - }, { - key: "_computeWrapClass", - value: function _computeWrapClass(mode, stretchSlider, lineTooLong, inDialog) { - if (inDialog) { - return ''; + this._setMode(); } + }, { + key: "_computeWrapClass", + value: function _computeWrapClass(mode, stretchSlider, lineTooLong, inDialog) { + if (inDialog) { + return ''; + } - if (mode === 'single-line') { - return 'nowrap'; - } + if (mode === 'single-line') { + return 'nowrap'; + } - if (stretchSlider && lineTooLong) { - return 'stretch wrap'; - } + if (stretchSlider && lineTooLong) { + return 'stretch wrap'; + } - return 'wrap'; - } - }, { - key: "_showSlider", - value: function _showSlider(inDialog, stateObj, hideSlider) { - if (inDialog || hideSlider) { - return false; + return 'wrap'; } + }, { + key: "_showSlider", + value: function _showSlider(inDialog, stateObj, hideSlider) { + if (inDialog || hideSlider) { + return false; + } - return true; - } - }, { - key: "sliderChanged", - value: function sliderChanged(ev) { - var value = parseInt(ev.target.value, 10); - var param = { - entity_id: this.stateObj.entity_id - }; - if (Number.isNaN(value)) return; - var target = this.root.querySelector('#slider'); + return true; + } + }, { + key: "sliderChanged", + value: function sliderChanged(ev) { + var value = parseInt(ev.target.value, 10); + var param = { + entity_id: this.stateObj.entity_id + }; + if (Number.isNaN(value)) return; + var target = this.root.querySelector('#slider'); - if (ev.target !== target) { - // No Shadow DOM - we have access to original target. - target = ev.target; - } else if (ev.path) { - var _ev$path = _slicedToArray(ev.path, 1); + if (ev.target !== target) { + // No Shadow DOM - we have access to original target. + target = ev.target; + } else if (ev.path) { + var _ev$path = _slicedToArray(ev.path, 1); - target = _ev$path[0]; - } else if (ev.composedPath) { - var _ev$composedPath = ev.composedPath(); + target = _ev$path[0]; + } else if (ev.composedPath) { + var _ev$composedPath = ev.composedPath(); - var _ev$composedPath2 = _slicedToArray(_ev$composedPath, 1); + var _ev$composedPath2 = _slicedToArray(_ev$composedPath, 1); - target = _ev$composedPath2[0]; - } + target = _ev$composedPath2[0]; + } - if (value === 0 || value <= target.min && !this.disableOffWhenMin) { - this.hass.callService(this.domain, this.serviceMin, param); - } else { - param[this.setValueName || this.valueName] = value; - this.hass.callService(this.domain, this.serviceMax, param); + if (value === 0 || value <= target.min && !this.disableOffWhenMin) { + this.hass.callService(this.domain, this.serviceMin, param); + } else { + param[this.setValueName || this.valueName] = value; + this.hass.callService(this.domain, this.serviceMax, param); + } } - } - }, { - key: "stateObjChanged", - value: function stateObjChanged(stateObj, nameOn, valueName) { - var obj = { - sliderValue: this.isOn(stateObj, nameOn) ? stateObj.attributes[valueName] : 0 - }; + }, { + key: "stateObjChanged", + value: function stateObjChanged(stateObj, nameOn, valueName) { + var obj = { + sliderValue: this.isOn(stateObj, nameOn) ? stateObj.attributes[valueName] : 0 + }; - if (stateObj) { - Object.assign(obj, { - minLineBreak: 0, - maxLineBreak: 999, - hideSlider: false, - breakSlider: false, - lineTooLong: false, - mode: stateObj.attributes.state_card_mode, - stretchSlider: !!stateObj.attributes.stretch_slider - }); - } + if (stateObj) { + Object.assign(obj, { + minLineBreak: 0, + maxLineBreak: 999, + hideSlider: false, + breakSlider: false, + lineTooLong: false, + mode: stateObj.attributes.state_card_mode, + stretchSlider: !!stateObj.attributes.stretch_slider + }); + } - this.setProperties(obj); + this.setProperties(obj); - if (stateObj) { - this._waitForLayout(); - } - } - }, { - key: "isOn", - value: function isOn(stateObj, nameOn) { - return stateObj && (!nameOn || stateObj.state === nameOn); - } - }, { - key: "stopPropagation", - value: function stopPropagation(ev) { - ev.stopPropagation(); - } - }], [{ - key: "template", - get: function get() { - return Object(_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject()); - } - }, { - key: "properties", - get: function get() { - return { - domain: String, - serviceMin: String, - serviceMax: String, - valueName: String, - setValueName: String, - nameOn: { - type: String, - value: 'on' - }, - min: { - type: Number, - value: 0 - }, - max: { - type: Number, - value: 255 - }, - sliderValue: { - type: Number, - value: 0 - }, - disableOffWhenMin: Boolean, - mode: String, - stretchSlider: { - type: Boolean, - value: false - }, - breakSlider: { - type: Boolean, - value: false - }, - hideSlider: { - type: Boolean, - value: false - }, - lineTooLong: { - type: Boolean, - value: false - }, - minLineBreak: Number, - maxLineBreak: Number, - showSlider: { - type: Number, - computed: '_showSlider(inDialog, stateObj, hideSlider)' + if (stateObj) { + this._waitForLayout(); } - }; - } - }, { - key: "observers", - get: function get() { - return ['stateObjChanged(stateObj, nameOn, valueName)']; - } - }]); + } + }, { + key: "isOn", + value: function isOn(stateObj, nameOn) { + return stateObj && (!nameOn || stateObj.state === nameOn); + } + }, { + key: "stopPropagation", + value: function stopPropagation(ev) { + ev.stopPropagation(); + } + }], [{ + key: "template", + get: function get() { + return Object(_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject()); + } + }, { + key: "properties", + get: function get() { + return { + domain: String, + serviceMin: String, + serviceMax: String, + valueName: String, + setValueName: String, + nameOn: { + type: String, + value: 'on' + }, + min: { + type: Number, + value: 0 + }, + max: { + type: Number, + value: 255 + }, + sliderValue: { + type: Number, + value: 0 + }, + disableOffWhenMin: Boolean, + mode: String, + stretchSlider: { + type: Boolean, + value: false + }, + breakSlider: { + type: Boolean, + value: false + }, + hideSlider: { + type: Boolean, + value: false + }, + lineTooLong: { + type: Boolean, + value: false + }, + minLineBreak: Number, + maxLineBreak: Number, + showSlider: { + type: Number, + computed: '_showSlider(inDialog, stateObj, hideSlider)' + } + }; + } + }, { + key: "observers", + get: function get() { + return ['stateObjChanged(stateObj, nameOn, valueName)']; + } + }]); + + return StateCardWithSlider; + }(Object(_cui_base_element_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Polymer.Element)); - return StateCardWithSlider; -}(_cui_base_element_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + customElements.define('state-card-with-slider', StateCardWithSlider); +} -customElements.define('state-card-with-slider', StateCardWithSlider); +if (Polymer && Polymer.Element && customElements.get('home-assistant')) { + loadCustomUI(); +} else { + customElements.whenDefined('home-assistant').then(function () { + return loadCustomUI(); + }); +} /***/ }), @@ -2154,7 +6079,7 @@ __webpack_require__.r(__webpack_exports__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _templateObject() { - var data = _taggedTemplateLiteral(["\n \n \n\n
\n \n \n \n \n \n
\n "]); + var data = _taggedTemplateLiteral(["\n \n \n\n
\n \n \n \n \n \n
\n "]); _templateObject = function _templateObject() { return data; @@ -2184,32 +6109,42 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func -/** - * @extends HTMLElement - */ - -var StateCardWithoutSlider = -/*#__PURE__*/ -function (_CuiBaseElement) { - _inherits(StateCardWithoutSlider, _CuiBaseElement); - function StateCardWithoutSlider() { - _classCallCheck(this, StateCardWithoutSlider); +function loadCustomUI() { + /** + * @extends HTMLElement + */ + var StateCardWithoutSlider = + /*#__PURE__*/ + function (_CuiBaseElement) { + _inherits(StateCardWithoutSlider, _CuiBaseElement); - return _possibleConstructorReturn(this, _getPrototypeOf(StateCardWithoutSlider).apply(this, arguments)); - } + function StateCardWithoutSlider() { + _classCallCheck(this, StateCardWithoutSlider); - _createClass(StateCardWithoutSlider, null, [{ - key: "template", - get: function get() { - return Object(_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject()); + return _possibleConstructorReturn(this, _getPrototypeOf(StateCardWithoutSlider).apply(this, arguments)); } - }]); - return StateCardWithoutSlider; -}(_cui_base_element_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + _createClass(StateCardWithoutSlider, null, [{ + key: "template", + get: function get() { + return Object(_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"])(_templateObject()); + } + }]); + + return StateCardWithoutSlider; + }(Object(_cui_base_element_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Polymer.Element)); + + customElements.define('state-card-without-slider', StateCardWithoutSlider); +} -customElements.define('state-card-without-slider', StateCardWithoutSlider); +if (Polymer && Polymer.Element && customElements.get('home-assistant')) { + loadCustomUI(); +} else { + customElements.whenDefined('home-assistant').then(function () { + return loadCustomUI(); + }); +} /***/ }), @@ -2225,118 +6160,6 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _elements_state_card_custom_ui_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../elements/state-card-custom-ui.js */ "./src/elements/state-card-custom-ui.js"); -/***/ }), - -/***/ "./src/mixins/events-mixin.js": -/*!************************************!*\ - !*** ./src/mixins/events-mixin.js ***! - \************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } - -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } - -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -// Polymer legacy event helpers used courtesy of the Polymer project. -// -// Copyright (c) 2017 The Polymer Authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -/* harmony default export */ __webpack_exports__["default"] = (function (superClass) { - /** - * @extends HTMLElement - */ - var EventsMixin = - /*#__PURE__*/ - function (_superClass) { - _inherits(EventsMixin, _superClass); - - function EventsMixin() { - _classCallCheck(this, EventsMixin); - - return _possibleConstructorReturn(this, _getPrototypeOf(EventsMixin).apply(this, arguments)); - } - - _createClass(EventsMixin, [{ - key: "fire", - - /** - * Dispatches a custom event with an optional detail value. - * - * @param {string} type Name of event type. - * @param {*=} detail Detail value containing event-specific - * payload. - * @param {{ bubbles: (boolean|undefined), - cancelable: (boolean|undefined), - composed: (boolean|undefined) }=} - * options Object specifying options. These may include: - * `bubbles` (boolean, defaults to `true`), - * `cancelable` (boolean, defaults to false), and - * `node` on which to fire the event (HTMLElement, defaults to `this`). - * @return {Event} The new event that was fired. - */ - value: function fire(type) { - var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var event = new Event(type, { - bubbles: options.bubbles === undefined ? true : options.bubbles, - cancelable: Boolean(options.cancelable), - composed: options.composed === undefined ? true : options.composed - }); - event.detail = detail; - var node = options.node || this; - node.dispatchEvent(event); - return event; - } - }]); - - return EventsMixin; - }(superClass); - - return EventsMixin; -}); - /***/ }), /***/ "./src/utils/hass-attribute-util.js": @@ -2425,7 +6248,7 @@ Object.assign(window.hassAttributeUtil.LOGIC_STATE_ATTRIBUTES, customUiAttribute "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.js */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.js"); +/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts"); /* harmony import */ var _home_assistant_polymer_src_common_entity_compute_state_domain_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/entity/compute_state_domain.ts */ "../home-assistant-polymer/src/common/entity/compute_state_domain.ts"); /* harmony import */ var _home_assistant_polymer_src_common_entity_get_view_entities_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/entity/get_view_entities.ts */ "../home-assistant-polymer/src/common/entity/get_view_entities.ts"); /* harmony import */ var _elements_ha_config_custom_ui_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../elements/ha-config-custom-ui.js */ "./src/elements/ha-config-custom-ui.js"); @@ -2916,7 +6739,7 @@ window.customUI = window.customUI || { this.hass._themeWaiters.push(this); } else { - Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, this.hass.themes || { + Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__["default"])(this, this.hass.themes || { default_theme: 'default', themes: {} }, stateObj.attributes.theme || 'default'); @@ -3107,9 +6930,9 @@ window.customUI.init(); "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = ('20190324'); +/* harmony default export */ __webpack_exports__["default"] = ('20190518'); /***/ }) /******/ }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4uL2hvbWUtYXNzaXN0YW50LXBvbHltZXIvc3JjL2NvbW1vbi9jb25zdC50cyIsIndlYnBhY2s6Ly8vLi4vaG9tZS1hc3Npc3RhbnQtcG9seW1lci9zcmMvY29tbW9uL2RvbS9hcHBseV90aGVtZXNfb25fZWxlbWVudC5qcyIsIndlYnBhY2s6Ly8vLi4vaG9tZS1hc3Npc3RhbnQtcG9seW1lci9zcmMvY29tbW9uL2RvbS9keW5hbWljX2NvbnRlbnRfdXBkYXRlci5qcyIsIndlYnBhY2s6Ly8vLi4vaG9tZS1hc3Npc3RhbnQtcG9seW1lci9zcmMvY29tbW9uL2VudGl0eS9jYW5fdG9nZ2xlX2RvbWFpbi50cyIsIndlYnBhY2s6Ly8vLi4vaG9tZS1hc3Npc3RhbnQtcG9seW1lci9zcmMvY29tbW9uL2VudGl0eS9jYW5fdG9nZ2xlX3N0YXRlLnRzI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gICAgICAgICBib3R0b206IDA7XG4gICAgICAgICAgdGV4dC1hbGlnbjogcmlnaHQ7XG4gICAgICAgICAgei1pbmRleDogMTtcbiAgICAgICAgfVxuICAgICAgICAjbG9jayB7XG4gICAgICAgICAgbWFyZ2luLXRvcDogOHB4O1xuICAgICAgICAgIG9wYWNpdHk6IDAuMztcbiAgICAgICAgICBtYXJnaW4tcmlnaHQ6IDdweDtcbiAgICAgICAgfVxuICAgICAgICAjbG9jay5oYS1jb3Zlci1jb250cm9scyB7XG4gICAgICAgICAgbWFyZ2luLXJpZ2h0OiA1MnB4O1xuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHdoaXRlO1xuICAgICAgICB9XG4gICAgICAgIC5leHRyYSB7XG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogLTE2cHg7XG4gICAgICAgICAgLS1oYS1sYWJlbC1iYWRnZS1zaXplOiAzNnB4O1xuICAgICAgICAgIC0taGEtbGFiZWwtYmFkZ2UtZm9udC1zaXplOiAxLjJlbTtcbiAgICAgICAgfVxuICAgICAgICAuc3RhdGUge1xuICAgICAgICAgIEBhcHBseSAtLXBhcGVyLWZvbnQtYm9keTE7XG4gICAgICAgICAgY29sb3I6IHZhcigtLXByaW1hcnktdGV4dC1jb2xvcik7XG4gICAgICAgICAgbWFyZ2luLWxlZnQ6IDE2cHg7XG4gICAgICAgICAgdGV4dC1hbGlnbjogcmlnaHQ7XG4gICAgICAgICAgbGluZS1oZWlnaHQ6IDQwcHg7XG4gICAgICAgIH1cbiAgICAgIDwvc3R5bGU+XG4gICAgICA8ZGl2IGNsYXNzJD0nW1tleHRyYUNsYXNzKGV4dHJhT2JqVmlzaWJsZSldXSBob3Jpem9udGFsIGxheW91dCc+XG4gICAgICAgIDx0ZW1wbGF0ZSBpcz0nZG9tLWlmJyBpZj0nW1tleHRyYU9ialZpc2libGVdXSc+XG4gICAgICAgICAgPHRlbXBsYXRlIGlzPSdkb20tcmVwZWF0J1xuICAgICAgICAgICAgICAgIC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X3Nob3dfbG9ja11dJz5cbiAgICAgICAgICAgICAgICAgICAgPGlyb24taWNvbiBpZD1cImxvY2tcIiBjbGFzcyQ9XCJbW2NvbnRyb2xFbGVtZW50XV1cIiBpY29uPVwibWRpOmxvY2stb3V0bGluZVwiPjwvaXJvbi1pY29uPlxuICAgICAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgPC90ZW1wbGF0ZT5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgPHRlbXBsYXRlIGlzPSdkb20taWYnIGlmPSdbWyFjb250cm9sRWxlbWVudF1dJz5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9J3N0YXRlJz5bW2NvbXB1dGVTdGF0ZURpc3BsYXkoc3RhdGVPYmopXV08L2Rpdj5cbiAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgPC9kaXY+XG4gICAgICBgO1xuICAgIH1cblxuICAgIHN0YXRpYyBnZXQgcHJvcGVydGllcygpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIGhhc3M6IE9iamVjdCxcbiAgICAgICAgaW5EaWFsb2c6IHtcbiAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgIHZhbHVlOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAgc3RhdGVPYmo6IE9iamVjdCxcbiAgICAgICAgY29udHJvbEVsZW1lbnQ6IFN0cmluZyxcbiAgICAgICAgZXh0cmFPYmo6IHtcbiAgICAgICAgICB0eXBlOiBBcnJheSxcbiAgICAgICAgICBjb21wdXRlZDogJ2NvbXB1dGVFeHRyYShoYXNzLCBzdGF0ZU9iaiwgX2F0dGFjaGVkKScsXG4gICAgICAgIH0sXG4gICAgICAgIF9hdHRhY2hlZDogQm9vbGVhbixcbiAgICAgICAgZXh0cmFPYmpWaXNp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nZ2xlLCAuc3RhdGUtaW5mbyB7XG4gICAgICAgIG1heC13aWR0aDogMTAwJTtcbiAgICAgIH1cbiAgICAgIC5ub3dyYXAgLnN0YXRlLWFuZC10b2dnbGUge1xuICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICBmbGV4LWdyb3c6IDA7XG4gICAgICB9XG4gICAgICAubm93cmFwIC5zZWNvbmQtbGluZSB7XG4gICAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgICB9XG5cbiAgICAgIC5zZWNvbmQtbGluZSB7XG4gICAgICAgIHBhZGRpbmctdG9wOiAyMHB4O1xuICAgICAgICBwYWRkaW5nLWJvdHRvbTogMTZweDtcbiAgICAgICAgbWFyZ2luLXRvcDogLTIwcHg7XG4gICAgICAgIG1hcmdpbi1ib3R0b206IC0xNnB4O1xuICAgICAgfVxuICAgICAgLnN0cmV0Y2ggLnNlY29uZC1saW5lLCAuc3RyZXRjaCBoYS10aGVtZWQtc2xpZGVyIHtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIC0taGEtcGFwZXItc2xpZGVyLXdpZHRoOiAxMDAlO1xuICAgICAgfVxuICAgICAgLm5vd3JhcCAuc3RhdGUtaW5mbyB7XG4gICAgICAgIG1pbi13aWR0aDogaW5pdGlhbDtcbiAgICAgIH1cbiAgICAgIGhhLXRoZW1lZC1zbGlkZXIsIC50b3Atd3JhcHBlciB7XG4gICAgICAgIG1pbi13aWR0aDogMTAwcHg7XG4gICAgICAgIG1heC13aWR0aDogMTAwJTtcbiAgICAgIH1cbiAgICAgIC50b3Atd3JhcHBlci5zdHJldGNoIHtcbiAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICB9XG5cbiAgICAgIC5oaWRkZW4ge1xuICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgICAgfVxuICAgIDwvc3R5bGU+XG5cbiAgICA8ZGl2IGlkPSdjb250YWluZXInIGNsYXNzJD0naG9yaXpvbnRhbCBsYXlvdX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SBuby1uZXctZnVuYyAqL1xuICAgICAgY29uc3QgZnVuYyA9IG5ldyBGdW5jdGlvbihcbiAgICAgICAgJ2hhc3MnLCAnZW50aXRpZXMnLCAnZW50aXR5JywgJ2F0dHJpYnV0ZXMnLCAnYXR0cmlidXRlJywgJ3N0YXRlJywgZnVuY3Rpb25Cb2R5KTtcbiAgICAgIC8qIGVzbGludC1lbmFibGUgbm8tbmV3LWZ1bmMgKi9cbiAgICAgIHJldHVybiBmdW5jKGhhc3MsIGVudGl0aWVzLCBlbnRpdHksIGF0dHJpYnV0ZXMsIGF0dHJpYnV0ZSwgc3RhdGUpO1xuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgIC8qIGVzbGludC1kaXNhYmxlIG5vLWNvbnNvbGUgKi9cbiAgICAgIGlmICgoZSBpbnN0YW5jZW9mIFN5bnRheEVycm9yKSB8fCBlIGluc3RhbmNlb2YgUmVmZXJlbmNlRXJyb3IpIHtcbiAgICAgICAgY29uc29sZS53YXJuKGAke2UubmFtZX06ICR7ZS5tZXNzYWdlfSBpbiB0ZW1wbGF0ZSAke2Z1bmN0aW9uQm9keX1gKTtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICAvKiBlc2xpbnQtZW5hYmxlIG5vLWNvbnNvbGUgKi9cbiAgICAgIHRocm93IGU7XG4gICAgfVxuICB9LFxufTtcbndpbmRvdy5jdXN0b21VSS5pbml0KCk7XG4iLCJleHBvcnQgZGVmYXVsdCAnMjAxOTAzMjQnO1xuIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4uL2hvbWUtYXNzaXN0YW50LXBvbHltZXIvc3JjL2NvbW1vbi9jb25zdC50cyIsIndlYnBhY2s6Ly8vLi4vaG9tZS1hc3Np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LlxuICAgICAgICAgICAgaWYgKHN0cmluZ3NbbGFzdEluZGV4XSA9PT0gJycpIHtcbiAgICAgICAgICAgICAgcGFyZW50Lmluc2VydEJlZm9yZShjcmVhdGVNYXJrZXIoKSwgbm9kZSk7XG4gICAgICAgICAgICAgIG5vZGVzVG9SZW1vdmUucHVzaChub2RlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIChub2RlIGFzIFRleHQpLmRhdGEgPSBzdHJpbmdzW2xhc3RJbmRleF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBXZSBoYXZlIGEgcGFydCBmb3IgZWFjaCBtYXRjaCBmb3VuZFxuICAgICAgICAgICAgcGFydEluZGV4ICs9IGxhc3RJbmRleDtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobm9kZS5ub2RlVHlwZSA9PT0gOCAvKiBOb2RlLkNPTU1FTlRfTk9ERSAqLykge1xuICAgICAgICAgIGlmICgobm9kZSBhcyBDb21tZW50KS5kYXRhID09PSBtYXJrZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IHBhcmVudCA9IG5vZGUucGFyZW50Tm9kZSE7XG4gICAgICAgICAgICAvLyBBZGQgYSBuZXcgbWFya2VyIG5vZGUgdG8gYmUgdGhlIHN0YXJ0Tm9kZSBvZiB0aGUgUGFydCBpZiBhbnkgb2ZcbiAgICAgICAgICAgIC8vIHRoZSBmb2xsb3dpbmcgYXJlIHRydWU6XG4gICAgICAgICAgICAvLyAgKiBXZSBkb24ndCBoYXZlIGEgcHJldmlvdXNTaWJsaW5nXG4gICAgICAgICAgICAvLyAgKiBUaGUgcHJldmlvdXNTaWJsaW5nIGlzIGFscmVhZHkgdGhlIHN0YXJ0IG9mIGEgcHJldmlvdXMgcGFydFxuICAgICAgICAgICAgaWYgKG5vZGUucHJldmlvdXNTaWJsaW5nID09PSBudWxsIHx8IGluZGV4ID09PSBsYXN0UGFydEluZGV4KSB7XG4gICAgICAgICAgICAgIGluZGV4Kys7XG4gICAgICAgICAgICAgIHBhcmVudC5pbnNlcnRCZWZvcmUoY3JlYXRlTWFya2VyKCksIG5vZGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFzdFBhcnRJbmRleCA9IGluZGV4O1xuICAgICAgICAgICAgdGhpcy5wYXJ0cy5wdXNoKHt0eXBlOiAnbm9kZScsIGluZGV4fSk7XG4gICAgICAgICAgICAvLyBJZiB3ZSBkb24ndCBoYXZlIGEgbmV4dFNpYmxpbmcsIGtlZXAgdGhpcyBub2RlIHNvIHdlIGhhdmUgYW4gZW5kLlxuICAgICAgICAgICAgLy8gRWxzZSwgd2UgY2FuIHJlbW92ZSBpdCB0byBzYXZlIGZ1dHVyZSBjb3N0cy5cbiAgICAgICAgICAgIGlmIChub2RlLm5leHRTaWJsaW5nID09PSBudWxsKSB7XG4gICAgICAgICAgICAgIChub2RlIGFzIENvbW1lbnQpLmRhdGEgPSAnJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIG5vZGVzVG9SZW1vdmUucHVzaChub2RlKTtcbiAgICAgICAgICAgICAgaW5kZXgtLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBhcnRJbmRleCsrO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsZXQgaSA9IC0xO1xuICAgICAgICAgICAgd2hpbGUgKChpID0gKG5vZGUgYXMgQ29tbWVudCkuZGF0YSEuaW5kZXhPZihtYXJrZXIsIGkgKyAxKSkgIT09XG4gICAgICAgICAgICAgICAgICAgLTEpIHtcbiAgICAgICAgICAgICAgLy8gQ29tbWVudCBub2RlIGhhcyBhIGJpbmRpbmcgbWFya2VyIGluc2lkZSwgbWFrZSBhbiBpbmFjdGl2ZSBwYXJ0XG4gICAgICAgICAgICAgIC8vIFRoZSBiaW5kaW5nIHdvbid0IHdvcmssIGJ1dCBzdWJzZXF1ZW50IGJpbmRpbmdzIHdpbGxcbiAgICAgICAgICAgIC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YW1pYy1lbGVtZW50IHtcbiAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgICB0ZXh0LWFsaWduOiByaWdodDtcbiAgICAgICAgfVxuICAgICAgICAjb3ZlcmxheSB7XG4gICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgIGxlZnQ6IDA7XG4gICAgICAgICAgcmlnaHQ6IDA7XG4gICAgICAgICAgdG9wOiAwO1xuICAgICAgICAgIGJvdHRvbTogMDtcbiAgICAgICAgICB0ZXh0LWFsaWduOiByaWdodDtcbiAgICAgICAgICB6LWluZGV4OiAxO1xuICAgICAgICB9XG4gICAgICAgICNsb2NrIHtcbiAgICAgICAgICBtYXJnaW4tdG9wOiA4cHg7XG4gICAgICAgICAgb3BhY2l0eTogMC4zO1xuICAgICAgICAgIG1hcmdpbi1yaWdodDogN3B4O1xuICAgICAgICB9XG4gICAgICAgICNsb2NrLmhhLWNvdmVyLWNvbnRyb2xzIHtcbiAgICAgICAgICBtYXJnaW4tcmlnaHQ6IDUycHg7XG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gICAgICAgIH1cbiAgICAgICAgLmV4dHJhIHtcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiAtMTZweDtcbiAgICAgICAgICAtLWhhLWxhYmVsLWJhZGdlLXNpemU6IDM2cHg7XG4gICAgICAgICAgLS1oYS1sYWJlbC1iYWRnZS1mb250LXNpemU6IDEuMmVtO1xuICAgICAgICB9XG4gICAgICAgIC5zdGF0ZSB7XG4gICAgICAgICAgQGFwcGx5IC0tcGFwZXItZm9udC1ib2R5MTtcbiAgICAgICAgICBjb2xvcjogdmFyKC0tcHJpbWFyeS10ZXh0LWNvbG9yKTtcbiAgICAgICAgICBtYXJnaW4tbGVmdDogMTZweDtcbiAgICAgICAgICB0ZXh0LWFsaWduOiByaWdodDtcbiAgICAgICAgICBsaW5lLWhlaWdodDogNDBweDtcbiAgICAgICAgfVxuICAgICAgPC9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gICAgICAgICB2YWx1ZTogZmFsc2UsXG4gICAgICAgIH0sXG4gICAgICAgIGlzT246IHtcbiAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgIHZhbHVlOiBmYWxzZSxcbiAgICAgICAgfSxcbiAgICAgICAgZGlzYWJsZU9mZldoZW5NaW46IHtcbiAgICAgICAgICB0eXBlOiBCb29sZWFuLFxuICAgICAgICAgIHZhbHVlOiBmYWxzZSxcbiAgICAgICAgICBub3RpZnk6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIGRpc2FibGVSZXBvcnRXaGVuTm90Q2hhbmdlZDoge1xuICAgICAgICAgIHR5cGU6IEJvb2xlYW4sXG4gICAgICAgICAgdmFsdWU6IGZhbHNlLFxuICAgICAgICB9LFxuXG4gICAgICAgIHRoZW1lOiBPYmplY3QsXG4gICAgICAgIHZhbHVlOiB7XG4gICAgICAgICAgdHlwZTogTnVtYmVyLFxuICAgICAgICAgIG5vdGlmeTogdHJ1ZSxcbiAgICAgICAgfSxcbiAgICAgICAgX3RoZW1lZE1pbjoge1xuICAgICAgICAgIHR5cGU6IE51bWJlcixcbiAgICAgICAgICBjb21wdXRlZDogJ19jb21wdXRlQXR0cmlidXRlKHRoZW1lLCBcIm1pblwiLCBtaW4pJyxcbiAgICAgICAgfSxcbiAgICAgIH07XG4gICAgfVxuXG4gICAgc3RhdGljIGdldCBvYnNlcnZlcnMoKSB7XG4gICAgICByZXR1cm4gW1xuICAgICAgICAnY29tcHV0ZUVuYWJsZWRUaGVtZWRSZXBvcnRXaGVuTm90Q2hhbmdlZCh0aGVtZSwgZGlzYWJsZVJlcG9ydFdoZW5Ob3RDaGFuZ2VkKScsXG4gICAgICBdO1xuICAgIH1cblxuICAgIGNvbXB1dGVFbmFibGVkVGhlbWVkUmVwb3J0V2hlbk5vdENoYW5nZWQodGhlbWUsIGRpc2FibGVSZXBvcnRXaGVuTm90Q2hhbmdlZCkge1xuICAgICAgdGhpcy5fZW5hYmxlZFRoZW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H1cblxuICAgIGNvbm5lY3RlZENhbGxiYWNrKCkge1xuICAgICAgc3VwZXIuY29ubmVjdGVkQ2FsbGJhY2soKTtcbiAgICAgIGNvbnN0IGNvbnRhaW5lciA9IHRoaXMucGFyZW50Tm9kZS5wYXJlbnROb2RlO1xuICAgICAgaWYgKGNvbnRhaW5lci50YWdOYW1lID09PSAnRElWJyAmJlxuICAgICAgICAgIChjb250YWluZXIuY2xhc3NMaXN0LmNvbnRhaW5zKCdzdGF0ZScpIHx8IGNvbnRhaW5lci5jbGFzc0xpc3QuY29udGFpbnMoJ2NoaWxkLWNhcmQnKSkpIHtcbiAgICAgICAgdGhpcy5fY29udGFpbmVyID0gY29udGFpbmVyO1xuXG4gICAgICAgIC8vIFNpbmNlIHRoaXMgZG9lc24ndCBhY3R1YWxseSBjaGFuZ2UgdGhlIGJhY2tncm91bmQgLSBubyBuZWVkIHRvIGNsZWFyIGl0LlxuICAgICAgICBjb250YWluZXIuc3R5bGUuc2V0UHJvcGVydHkoXG4gICAgICAgICAgJ2JhY2tncm91bmQtY29sb3InLCAndmFyKC0tcGFwZXItY2FyZC1iYWNrZ3JvdW5kLWNvbG9yLCBpbmhlcml0KScpO1xuXG4gICAgICAgIC8vIFBvbHlmaWxsICd1cGRhdGVTdHlsZXMnLlxuICAgICAgICBpZiAoIWNvbnRhaW5lci51cGRhdGVTdHlsZXMpIHtcbiAgICAgICAgICBjb250YWluZXIudXBkYXRlU3R5bGVzID0gKHN0eWxlcykgPT4ge1xuICAgICAgICAgICAgT2JqZWN0LmtleXMoc3R5bGVzKS5mb3JFYWNoKChrZXkpID0+IHtcbiAgICAgICAgICAgICAgY29udGFpbmVyLnN0eWxlLnNldFByb3BlcnR5KGtleSwgc3R5bGVzW2tleV0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdGhpcy5faXNBdHRhY2hlZCA9IHRydWU7XG4gICAgICB0aGlzLmlucHV0Q2hh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AgICNjb250YWluZXIge1xuICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgfVxuICAgICAgICAuc2Vjb25kLWxpbmUsIC5zdGF0ZS1hbmQtdG9nZ2xlLCAuc3RhdGUtaW5mbyB7XG4gICAgICAgICAgbWF4LXdpZHRoOiAxMDAlO1xuICAgICAgICB9XG4gICAgICAgIC5ub3dyYXAgLnN0YXRlLWFuZC10b2dnbGUge1xuICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgICAgICAgZmxleC1ncm93OiAwO1xuICAgICAgICB9XG4gICAgICAgIC5ub3dyYXAgLnNlY29uZC1saW5lIHtcbiAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICB9XG5cbiAgICAgICAgLnNlY29uZC1saW5lIHtcbiAgICAgICAgICBwYWRkaW5nLXRvcDogMjBweDtcbiAgICAgICAgICBwYWRkaW5nLWJvdHRvbTogMTZweDtcbiAgICAgICAgICBtYXJnaW4tdG9wOiAtMjBweDtcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiAtMTZweDtcbiAgICAgICAgfVxuICAgICAgICAuc3RyZXRjaCAuc2Vjb25kLWxpbmUsIC5zdHJldGNoIGhhLXRoZW1lZC1zbGlkZXIge1xuICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgIC0taGEtcGFwZXItc2xpZGVyLXdpZHRoOiAxMDAlO1xuICAgICAgICB9XG4gICAgICAgIC5ub3dyYXAgLnN0YXRlLWluZm8ge1xuICAgICAgICAgIG1pbi13aWR0aDogaW5pdGlhbDtcbiAgICAgICAgfVxuICAgICAgICBoYS10aGVtZWQtc2xpZGVyLCAudG9wLXdyYXBwZXIge1xuICAgICAgICAgIG1pbi13aWR0aDogMTAwcHg7XG4gICAgICAgICAgbWF4LXdpZHRoOiAxMDAlO1xuICAgICAgICB9XG4gICAgICAgIC50b3Atd3JhcHBlci5zdHJldGNoIHtcbiAgICAgICAgICBkaXNwbGF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lbGVtKTtcbiAgICAgICAgZWxlbWVudDsgZWxlbWVudCA9IHdpbmRvdy5jdXN0b21VSS5kb21Ib3N0KGVsZW1lbnQpKSB7XG4gICAgICAgIHN3aXRjaCAoZWxlbWVudC50YWdOYW1lKSB7XG4gICAgICAgICAgY2FzZSAnSEEtRU5USVRJRVMtQ0FSRCc6XG4gICAgICAgICAgICBpZiAoZWxlbWVudC5ncm91cEVudGl0eSkge1xuICAgICAgICAgICAgICBlbGVtLl9jb250ZXh0LnB1c2goZWxlbWVudC5ncm91cEVudGl0eS5lbnRpdHlfaWQpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChlbGVtZW50Lmdyb3VwRW50aXR5ID09PSBmYWxzZSAmJiBlbGVtZW50LnN0YXRlcyAmJiBlbGVtZW50LnN0YXRlcy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgZWxlbS5fY29udGV4dC5wdXNoKGBncm91cC4ke2NvbXB1dGVTdGF0ZURvbWFpbihlbGVtZW50LnN0YXRlc1swXSl9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdNT1JFLUlORk8tR1JPVVAnOlxuICAgICAgICAgIGNhc2UgJ1NUQVRFLUNBUkQtQ09OVEVOVCc6XG4gICAgICAgICAgICBpZiAoZWxlbWVudC5zdGF0ZU9iaikge1xuICAgICAgICAgICAgICBlbGVtLl9jb250ZXh0LnB1c2goZWxlbWVudC5zdGF0ZU9iai5lbnRpdHlfaWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnSEEtQ0FSRFMnOlxuICAgICAgICAgICAgZWxlbS5fY29udGV4dC5wdXNoKGVsZW1lbnQuZ2V0QXR0cmlidXRlKCdkYXRhLXZpZXcnKSB8fCAnZGVmYXVsdF92aWV3Jyk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAvLyBubyBkZWZhdWx0XG4gICAgICAgIH1cbiAg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BSZWZlcmVuY2VFcnJvcikge1xuICAgICAgICBjb25zb2xlLndhcm4oYCR7ZS5uYW1lfTogJHtlLm1lc3NhZ2V9IGluIHRlbXBsYXRlICR7ZnVuY3Rpb25Cb2R5fWApO1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIC8qIGVzbGludC1lbmFibGUgbm8tY29uc29sZSAqL1xuICAgICAgdGhyb3cgZTtcbiAgICB9XG4gIH0sXG59O1xud2luZG93LmN1c3RvbVVJLmluaXQoKTtcbiIsImV4cG9ydCBkZWZhdWx0ICcyMDE5MDUxOCc7XG4iXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/scripts-dbg.js b/scripts-dbg.js index 5da2e6b..b09a8de 100644 --- a/scripts-dbg.js +++ b/scripts-dbg.js @@ -100,7 +100,7 @@ __webpack_require__.r(__webpack_exports__); const DEFAULT_DOMAIN_ICON = "hass:bookmark"; /** Panel to show when no panel is picked. */ -const DEFAULT_PANEL = "states"; +const DEFAULT_PANEL = "lovelace"; /** Domains that have a state card. */ const DOMAINS_WITH_CARD = ["climate", "cover", "configurator", "input_select", "input_number", "input_text", "lock", "media_player", "scene", "script", "timer", "vacuum", "water_heater", "weblink"]; @@ -118,7 +118,7 @@ const DOMAINS_MORE_INFO_NO_HISTORY = ["camera", "configurator", "history_graph", const STATES_OFF = ["closed", "locked", "off"]; /** Domains where we allow toggle in Lovelace. */ -const DOMAINS_TOGGLE = new Set(["fan", "input_boolean", "light", "switch"]); +const DOMAINS_TOGGLE = new Set(["fan", "input_boolean", "light", "switch", "group", "automation"]); /** Temperature units. */ const UNIT_C = "°C"; @@ -129,9 +129,9 @@ const DEFAULT_VIEW_ENTITY_ID = "group.default_view"; /***/ }), -/***/ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.js": +/***/ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts": /*!***************************************************************************!*\ - !*** ../home-assistant-polymer/src/common/dom/apply_themes_on_element.js ***! + !*** ../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -158,12 +158,13 @@ function applyThemesOnElement(element, themes, localTheme, updateMeta = false) { themeName = localTheme; } - const styles = Object.assign({}, element._themes); + const styles = { ...element._themes + }; if (themeName !== "default") { - var theme = themes.themes[themeName]; + const theme = themes.themes[themeName]; Object.keys(theme).forEach(key => { - var prefixedKey = "--" + key; + const prefixedKey = "--" + key; element._themes[prefixedKey] = ""; styles[prefixedKey] = theme[key]; }); @@ -178,7 +179,10 @@ function applyThemesOnElement(element, themes, localTheme, updateMeta = false) { element, styles); } - if (!updateMeta) return; + if (!updateMeta) { + return; + } + const meta = document.querySelector("meta[name=theme-color]"); if (meta) { @@ -193,9 +197,9 @@ function applyThemesOnElement(element, themes, localTheme, updateMeta = false) { /***/ }), -/***/ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.js": +/***/ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts": /*!***************************************************************************!*\ - !*** ../home-assistant-polymer/src/common/dom/dynamic_content_updater.js ***! + !*** ../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -466,8 +470,9 @@ __webpack_require__.r(__webpack_exports__); const hassAttributeUtil = {}; hassAttributeUtil.DOMAIN_DEVICE_CLASS = { binary_sensor: ["battery", "cold", "connectivity", "door", "garage_door", "gas", "heat", "light", "lock", "moisture", "motion", "moving", "occupancy", "opening", "plug", "power", "presence", "problem", "safety", "smoke", "sound", "vibration", "window"], - cover: ["garage"], - sensor: ["battery", "humidity", "illuminance", "temperature", "pressure"] + cover: ["awning", "blind", "curtain", "damper", "door", "garage", "shade", "shutter", "window"], + sensor: ["battery", "humidity", "illuminance", "temperature", "pressure", "power", "signal_strength"], + switch: ["switch", "outlet"] }; hassAttributeUtil.UNKNOWN_TYPE = "json"; hassAttributeUtil.ADD_TYPE = "key-value"; @@ -520,7 +525,7 @@ hassAttributeUtil.LOGIC_STATE_ATTRIBUTES = hassAttributeUtil.LOGIC_STATE_ATTRIBU type: "array", options: hassAttributeUtil.DOMAIN_DEVICE_CLASS, description: "Device class", - domains: ["binary_sensor", "cover", "sensor"] + domains: ["binary_sensor", "cover", "sensor", "switch"] }, hidden: { type: "boolean", @@ -716,262 +721,3564 @@ const htmlLiteral = function (strings, ...values) { /***/ }), -/***/ "./src/elements/cui-base-element.js": -/*!******************************************!*\ - !*** ./src/elements/cui-base-element.js ***! - \******************************************/ -/*! exports provided: default */ +/***/ "./node_modules/lit-element/lib/css-tag.js": +/*!*************************************************!*\ + !*** ./node_modules/lit-element/lib/css-tag.js ***! + \*************************************************/ +/*! exports provided: supportsAdoptingStyleSheets, CSSResult, unsafeCSS, css */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsAdoptingStyleSheets", function() { return supportsAdoptingStyleSheets; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSResult", function() { return CSSResult; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unsafeCSS", function() { return unsafeCSS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; }); /** - * @extends HTMLElement - */ +@license +Copyright (c) 2019 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at +http://polymer.github.io/LICENSE.txt The complete set of authors may be found at +http://polymer.github.io/AUTHORS.txt The complete set of contributors may be +found at http://polymer.github.io/CONTRIBUTORS.txt 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 +*/ +const supportsAdoptingStyleSheets = 'adoptedStyleSheets' in Document.prototype && 'replace' in CSSStyleSheet.prototype; +const constructionToken = Symbol(); +class CSSResult { + constructor(cssText, safeToken) { + if (safeToken !== constructionToken) { + throw new Error('CSSResult is not constructable. Use `unsafeCSS` or `css` instead.'); + } -class CuiBaseElement extends Polymer.Element { - static get properties() { - return { - hass: Object, - inDialog: { - type: Boolean, - value: false - }, - stateObj: Object, - controlElement: String, - extra: { - type: Array, - computed: 'computeExtra(hass, stateObj)' - } - }; - } + this.cssText = cssText; + } // Note, this is a getter so that it's lazy. In practice, this means + // stylesheets are not created until the first element instance is made. - computeExtra(hass, stateObj) { - let extras = stateObj.attributes.extra_data_template; - if (extras) { - if (!Array.isArray(extras)) { - extras = [extras]; - } + get styleSheet() { + if (this._styleSheet === undefined) { + // Note, if `adoptedStyleSheets` is supported then we assume CSSStyleSheet + // is constructable. + if (supportsAdoptingStyleSheets) { + this._styleSheet = new CSSStyleSheet(); - return extras.map(extra => window.customUI.computeTemplate(extra, hass, hass.states, stateObj, stateObj.attributes, - /* attribute= */ - undefined, stateObj.state)).filter(result => result !== null); + this._styleSheet.replaceSync(this.cssText); + } else { + this._styleSheet = null; + } } - return []; + return this._styleSheet; } - showLastChanged(stateObj, inDialog, extra) { - if (inDialog) return true; - if (extra.length) return false; - return !!stateObj.attributes.show_last_changed; + toString() { + return this.cssText; } - hasExtra(extra) { - return extra.length > 0; +} +/** + * Wrap a value for interpolation in a css tagged template literal. + * + * This is unsafe because untrusted CSS text can be used to phone home + * or exfiltrate data to an attacker controlled site. Take care to only use + * this with trusted input. + */ + +const unsafeCSS = value => { + return new CSSResult(String(value), constructionToken); +}; + +const textFromCSSResult = value => { + if (value instanceof CSSResult) { + return value.cssText; + } else { + throw new Error(`Value passed to 'css' function must be a 'css' function result: ${value}. Use 'unsafeCSS' to pass non-literal values, but + take care to ensure page security.`); } +}; +/** + * Template tag which which can be used with LitElement's `style` property to + * set element styles. For security reasons, only literal string values may be + * used. To incorporate non-literal values `unsafeCSS` may be used inside a + * template string part. + */ -} -/* harmony default export */ __webpack_exports__["default"] = (CuiBaseElement); +const css = (strings, ...values) => { + const cssText = values.reduce((acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1], strings[0]); + return new CSSResult(cssText, constructionToken); +}; /***/ }), -/***/ "./src/elements/dynamic-element.js": -/*!*****************************************!*\ - !*** ./src/elements/dynamic-element.js ***! - \*****************************************/ -/*! no exports provided */ +/***/ "./node_modules/lit-element/lib/decorators.js": +/*!****************************************************!*\ + !*** ./node_modules/lit-element/lib/decorators.js ***! + \****************************************************/ +/*! exports provided: customElement, property, query, queryAll, eventOptions */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/dynamic_content_updater.js */ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "customElement", function() { return customElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "property", function() { return property; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "query", function() { return query; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryAll", function() { return queryAll; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventOptions", function() { return eventOptions; }); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ +const legacyCustomElement = (tagName, clazz) => { + window.customElements.define(tagName, clazz); // Cast as any because TS doesn't recognize the return type as being a + // subtype of the decorated class when clazz is typed as + // `Constructor` for some reason. + // `Constructor` is helpful to make sure the decorator is + // applied to elements however. + // tslint:disable-next-line:no-any + + return clazz; +}; + +const standardCustomElement = (tagName, descriptor) => { + const { + kind, + elements + } = descriptor; + return { + kind, + elements, + + // This callback is called once the class is otherwise fully defined + finisher(clazz) { + window.customElements.define(tagName, clazz); + } + }; +}; /** - * @extends HTMLElement + * Class decorator factory that defines the decorated class as a custom element. + * + * @param tagName the name of the custom element to define */ -class DynamicElement extends Polymer.Element { - static get properties() { + +const customElement = tagName => classOrDescriptor => typeof classOrDescriptor === 'function' ? legacyCustomElement(tagName, classOrDescriptor) : standardCustomElement(tagName, classOrDescriptor); + +const standardProperty = (options, element) => { + // When decorating an accessor, pass it through and add property metadata. + // Note, the `hasOwnProperty` check in `createProperty` ensures we don't + // stomp over the user's accessor. + if (element.kind === 'method' && element.descriptor && !('value' in element.descriptor)) { + return Object.assign({}, element, { + finisher(clazz) { + clazz.createProperty(element.key, options); + } + + }); + } else { + // createProperty() takes care of defining the property, but we still + // must return some kind of descriptor, so return a descriptor for an + // unused prototype field. The finisher calls createProperty(). return { - hass: Object, - stateObj: Object, - elementName: String, - inDialog: { - type: Boolean, - value: false + kind: 'field', + key: Symbol(), + placement: 'own', + descriptor: {}, + + // When @babel/plugin-proposal-decorators implements initializers, + // do this instead of the initializer below. See: + // https://github.com/babel/babel/issues/9260 extras: [ + // { + // kind: 'initializer', + // placement: 'own', + // initializer: descriptor.initializer, + // } + // ], + // tslint:disable-next-line:no-any decorator + initializer() { + if (typeof element.initializer === 'function') { + this[element.key] = element.initializer.call(this); + } + }, + + finisher(clazz) { + clazz.createProperty(element.key, options); } + }; } +}; - static get observers() { - return ['observerFunc(hass, stateObj, elementName, inDialog)']; - } +const legacyProperty = (options, proto, name) => { + proto.constructor.createProperty(name, options); +}; +/** + * A property decorator which creates a LitElement property which reflects a + * corresponding attribute value. A `PropertyDeclaration` may optionally be + * supplied to configure property features. + * + * @ExportDecoratedItems + */ - observerFunc(hass, stateObj, elementName, inDialog) { - Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, elementName ? elementName.toUpperCase() : 'DIV', { - hass, - stateObj, - inDialog - }); - } +function property(options) { + // tslint:disable-next-line:no-any decorator + return (protoOrDescriptor, name) => name !== undefined ? legacyProperty(options, protoOrDescriptor, name) : standardProperty(options, protoOrDescriptor); +} +/** + * A property decorator that converts a class property into a getter that + * executes a querySelector on the element's renderRoot. + * + * @ExportDecoratedItems + */ + +function query(selector) { + return (protoOrDescriptor, // tslint:disable-next-line:no-any decorator + name) => { + const descriptor = { + get() { + return this.renderRoot.querySelector(selector); + }, + + enumerable: true, + configurable: true + }; + return name !== undefined ? legacyQuery(descriptor, protoOrDescriptor, name) : standardQuery(descriptor, protoOrDescriptor); + }; +} +/** + * A property decorator that converts a class property into a getter + * that executes a querySelectorAll on the element's renderRoot. + * + * @ExportDecoratedItems + */ + +function queryAll(selector) { + return (protoOrDescriptor, // tslint:disable-next-line:no-any decorator + name) => { + const descriptor = { + get() { + return this.renderRoot.querySelectorAll(selector); + }, + + enumerable: true, + configurable: true + }; + return name !== undefined ? legacyQuery(descriptor, protoOrDescriptor, name) : standardQuery(descriptor, protoOrDescriptor); + }; } -customElements.define('dynamic-element', DynamicElement); +const legacyQuery = (descriptor, proto, name) => { + Object.defineProperty(proto, name, descriptor); +}; + +const standardQuery = (descriptor, element) => ({ + kind: 'method', + placement: 'prototype', + key: element.key, + descriptor +}); + +const standardEventOptions = (options, element) => { + return Object.assign({}, element, { + finisher(clazz) { + Object.assign(clazz.prototype[element.key], options); + } + + }); +}; + +const legacyEventOptions = // tslint:disable-next-line:no-any legacy decorator +(options, proto, name) => { + Object.assign(proto[name], options); +}; +/** + * Adds event listener options to a method used as an event listener in a + * lit-html template. + * + * @param options An object that specifis event listener options as accepted by + * `EventTarget#addEventListener` and `EventTarget#removeEventListener`. + * + * Current browsers support the `capture`, `passive`, and `once` options. See: + * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters + * + * @example + * + * class MyElement { + * + * clicked = false; + * + * render() { + * return html`
`; + * } + * + * @eventOptions({capture: true}) + * _onClick(e) { + * this.clicked = true; + * } + * } + */ + + +const eventOptions = options => // Return value typed as any to prevent TypeScript from complaining that +// standard decorator function signature does not match TypeScript decorator +// signature +// TODO(kschaaf): unclear why it was only failing on this decorator and not +// the others +(protoOrDescriptor, name) => name !== undefined ? legacyEventOptions(options, protoOrDescriptor, name) : standardEventOptions(options, protoOrDescriptor); /***/ }), -/***/ "./src/elements/dynamic-with-extra.js": -/*!********************************************!*\ - !*** ./src/elements/dynamic-with-extra.js ***! - \********************************************/ -/*! no exports provided */ +/***/ "./node_modules/lit-element/lib/updating-element.js": +/*!**********************************************************!*\ + !*** ./node_modules/lit-element/lib/updating-element.js ***! + \**********************************************************/ +/*! exports provided: defaultConverter, notEqual, UpdatingElement */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @polymer/polymer/lib/utils/html-tag.js */ "./node_modules/@polymer/polymer/lib/utils/html-tag.js"); -/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.js */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.js"); -/* harmony import */ var _dynamic_element_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dynamic-element.js */ "./src/elements/dynamic-element.js"); -/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultConverter", function() { return defaultConverter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "notEqual", function() { return notEqual; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UpdatingElement", function() { return UpdatingElement; }); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ +/** + * When using Closure Compiler, JSCompiler_renameProperty(property, object) is + * replaced at compile time by the munged name for object[property]. We cannot + * alias this function, so we have to use a small shim that has the same + * behavior when not compiling. + */ +window.JSCompiler_renameProperty = (prop, _obj) => prop; + +const defaultConverter = { + toAttribute(value, type) { + switch (type) { + case Boolean: + return value ? '' : null; + + case Object: + case Array: + // if the value is `null` or `undefined` pass this through + // to allow removing/no change behavior. + return value == null ? value : JSON.stringify(value); + } + return value; + }, + fromAttribute(value, type) { + switch (type) { + case Boolean: + return value !== null; -customElements.whenDefined('state-card-display').then(() => { - /** - * @extends HTMLElement - */ - class DynamicWithExtra extends customElements.get('state-card-display') { - static get template() { - return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"]` - - -
- - -
- `; - } + case Number: + return value === null ? null : Number(value); - static get properties() { - return { - hass: Object, - inDialog: { - type: Boolean, - value: false - }, - stateObj: Object, - controlElement: String, - extraObj: { - type: Array, - computed: 'computeExtra(hass, stateObj, _attached)' - }, - _attached: Boolean, - extraObjVisible: { - type: Boolean, - computed: 'computeExtraVisible(extraObj, inDialog)' - } - }; + case Object: + case Array: + return JSON.parse(value); } - connectedCallback() { - super.connectedCallback(); - this._attached = true; - } + return value; + } - disconnectedCallback() { - this._isAttached = false; - super.disconnectedCallback(); - } +}; +/** + * Change function that returns true if `value` is different from `oldValue`. + * This method is used as the default for a property's `hasChanged` function. + */ - computeExtra(hass, stateObj, attached) { - if (!stateObj.attributes.extra_badge || !attached) return []; - let extraBadges = stateObj.attributes.extra_badge; +const notEqual = (value, old) => { + // This ensures (old==NaN, value==NaN) always returns false + return old !== value && (old === old || value === value); +}; +const defaultPropertyDeclaration = { + attribute: true, + type: String, + converter: defaultConverter, + reflect: false, + hasChanged: notEqual +}; +const microtaskPromise = Promise.resolve(true); +const STATE_HAS_UPDATED = 1; +const STATE_UPDATE_REQUESTED = 1 << 2; +const STATE_IS_REFLECTING_TO_ATTRIBUTE = 1 << 3; +const STATE_IS_REFLECTING_TO_PROPERTY = 1 << 4; +const STATE_HAS_CONNECTED = 1 << 5; +/** + * Base element class which manages element properties and attributes. When + * properties change, the `update` method is asynchronously called. This method + * should be supplied by subclassers to render updates as desired. + */ - if (!Array.isArray(extraBadges)) { - extraBadges = [extraBadges]; - } +class UpdatingElement extends HTMLElement { + constructor() { + super(); + this._updateState = 0; + this._instanceProperties = undefined; + this._updatePromise = microtaskPromise; + this._hasConnectedResolver = undefined; + /** + * Map with keys for any properties that have changed since the last + * update cycle with previous values. + */ - return extraBadges.map(extraBadge => { - let result = null; + this._changedProperties = new Map(); + /** + * Map with keys of properties that should be reflected when updated. + */ + + this._reflectingProperties = undefined; + this.initialize(); + } + /** + * Returns a list of attributes corresponding to the registered properties. + * @nocollapse + */ + + + static get observedAttributes() { + // note: piggy backing on this to ensure we're finalized. + this.finalize(); + const attributes = []; // Use forEach so this works even if for/of loops are compiled to for loops + // expecting arrays + + this._classProperties.forEach((v, p) => { + const attr = this._attributeNameForProperty(p, v); + + if (attr !== undefined) { + this._attributeToPropertyMap.set(attr, p); + + attributes.push(attr); + } + }); + + return attributes; + } + /** + * Ensures the private `_classProperties` property metadata is created. + * In addition to `finalize` this is also called in `createProperty` to + * ensure the `@property` decorator can add property metadata. + */ + + /** @nocollapse */ + + + static _ensureClassProperties() { + // ensure private storage for property declarations. + if (!this.hasOwnProperty(JSCompiler_renameProperty('_classProperties', this))) { + this._classProperties = new Map(); // NOTE: Workaround IE11 not supporting Map constructor argument. + + const superProperties = Object.getPrototypeOf(this)._classProperties; + + if (superProperties !== undefined) { + superProperties.forEach((v, k) => this._classProperties.set(k, v)); + } + } + } + /** + * Creates a property accessor on the element prototype if one does not exist. + * The property setter calls the property's `hasChanged` property option + * or uses a strict identity check to determine whether or not to request + * an update. + * @nocollapse + */ + + + static createProperty(name, options = defaultPropertyDeclaration) { + // Note, since this can be called by the `@property` decorator which + // is called before `finalize`, we ensure storage exists for property + // metadata. + this._ensureClassProperties(); + + this._classProperties.set(name, options); // Do not generate an accessor if the prototype already has one, since + // it would be lost otherwise and that would never be the user's intention; + // Instead, we expect users to call `requestUpdate` themselves from + // user-defined accessors. Note that if the super has an accessor we will + // still overwrite it + + + if (options.noAccessor || this.prototype.hasOwnProperty(name)) { + return; + } + + const key = typeof name === 'symbol' ? Symbol() : `__${name}`; + Object.defineProperty(this.prototype, name, { + // tslint:disable-next-line:no-any no symbol in index + get() { + return this[key]; + }, + + set(value) { + // tslint:disable-next-line:no-any no symbol in index + const oldValue = this[name]; // tslint:disable-next-line:no-any no symbol in index + + this[key] = value; + + this._requestUpdate(name, oldValue); + }, + + configurable: true, + enumerable: true + }); + } + /** + * Creates property accessors for registered properties and ensures + * any superclasses are also finalized. + * @nocollapse + */ + + + static finalize() { + if (this.hasOwnProperty(JSCompiler_renameProperty('finalized', this)) && this.finalized) { + return; + } // finalize any superclasses + + + const superCtor = Object.getPrototypeOf(this); + + if (typeof superCtor.finalize === 'function') { + superCtor.finalize(); + } + + this.finalized = true; + + this._ensureClassProperties(); // initialize Map populated in observedAttributes + + + this._attributeToPropertyMap = new Map(); // make any properties + // Note, only process "own" properties since this element will inherit + // any properties defined on the superClass, and finalization ensures + // the entire prototype chain is finalized. + + if (this.hasOwnProperty(JSCompiler_renameProperty('properties', this))) { + const props = this.properties; // support symbols in properties (IE11 does not support this) + + const propKeys = [...Object.getOwnPropertyNames(props), ...(typeof Object.getOwnPropertySymbols === 'function' ? Object.getOwnPropertySymbols(props) : [])]; // This for/of is ok because propKeys is an array + + for (const p of propKeys) { + // note, use of `any` is due to TypeSript lack of support for symbol in + // index types + // tslint:disable-next-line:no-any no symbol in index + this.createProperty(p, props[p]); + } + } + } + /** + * Returns the property name for the given attribute `name`. + * @nocollapse + */ + + + static _attributeNameForProperty(name, options) { + const attribute = options.attribute; + return attribute === false ? undefined : typeof attribute === 'string' ? attribute : typeof name === 'string' ? name.toLowerCase() : undefined; + } + /** + * Returns true if a property should request an update. + * Called when a property value is set and uses the `hasChanged` + * option for the property if present or a strict identity check. + * @nocollapse + */ + + + static _valueHasChanged(value, old, hasChanged = notEqual) { + return hasChanged(value, old); + } + /** + * Returns the property value for the given attribute value. + * Called via the `attributeChangedCallback` and uses the property's + * `converter` or `converter.fromAttribute` property option. + * @nocollapse + */ + + + static _propertyValueFromAttribute(value, options) { + const type = options.type; + const converter = options.converter || defaultConverter; + const fromAttribute = typeof converter === 'function' ? converter : converter.fromAttribute; + return fromAttribute ? fromAttribute(value, type) : value; + } + /** + * Returns the attribute value for the given property value. If this + * returns undefined, the property will *not* be reflected to an attribute. + * If this returns null, the attribute will be removed, otherwise the + * attribute will be set to the value. + * This uses the property's `reflect` and `type.toAttribute` property options. + * @nocollapse + */ + + + static _propertyValueToAttribute(value, options) { + if (options.reflect === undefined) { + return; + } + + const type = options.type; + const converter = options.converter; + const toAttribute = converter && converter.toAttribute || defaultConverter.toAttribute; + return toAttribute(value, type); + } + /** + * Performs element initialization. By default captures any pre-set values for + * registered properties. + */ + + + initialize() { + this._saveInstanceProperties(); // ensures first update will be caught by an early access of `updateComplete` + + + this._requestUpdate(); + } + /** + * Fixes any properties set on the instance before upgrade time. + * Otherwise these would shadow the accessor and break these properties. + * The properties are stored in a Map which is played back after the + * constructor runs. Note, on very old versions of Safari (<=9) or Chrome + * (<=41), properties created for native platform properties like (`id` or + * `name`) may not have default values set in the element constructor. On + * these browsers native properties appear on instances and therefore their + * default value will overwrite any element default (e.g. if the element sets + * this.id = 'id' in the constructor, the 'id' will become '' since this is + * the native platform default). + */ + + + _saveInstanceProperties() { + // Use forEach so this works even if for/of loops are compiled to for loops + // expecting arrays + this.constructor._classProperties.forEach((_v, p) => { + if (this.hasOwnProperty(p)) { + const value = this[p]; + delete this[p]; + + if (!this._instanceProperties) { + this._instanceProperties = new Map(); + } + + this._instanceProperties.set(p, value); + } + }); + } + /** + * Applies previously saved instance properties. + */ + + + _applyInstanceProperties() { + // Use forEach so this works even if for/of loops are compiled to for loops + // expecting arrays + // tslint:disable-next-line:no-any + this._instanceProperties.forEach((v, p) => this[p] = v); + + this._instanceProperties = undefined; + } + + connectedCallback() { + this._updateState = this._updateState | STATE_HAS_CONNECTED; // Ensure first connection completes an update. Updates cannot complete before + // connection and if one is pending connection the `_hasConnectionResolver` + // will exist. If so, resolve it to complete the update, otherwise + // requestUpdate. + + if (this._hasConnectedResolver) { + this._hasConnectedResolver(); + + this._hasConnectedResolver = undefined; + } + } + /** + * Allows for `super.disconnectedCallback()` in extensions while + * reserving the possibility of making non-breaking feature additions + * when disconnecting at some point in the future. + */ + + + disconnectedCallback() {} + /** + * Synchronizes property values when attributes change. + */ + + + attributeChangedCallback(name, old, value) { + if (old !== value) { + this._attributeToProperty(name, value); + } + } + + _propertyToAttribute(name, value, options = defaultPropertyDeclaration) { + const ctor = this.constructor; + + const attr = ctor._attributeNameForProperty(name, options); + + if (attr !== undefined) { + const attrValue = ctor._propertyValueToAttribute(value, options); // an undefined value does not change the attribute. + + + if (attrValue === undefined) { + return; + } // Track if the property is being reflected to avoid + // setting the property again via `attributeChangedCallback`. Note: + // 1. this takes advantage of the fact that the callback is synchronous. + // 2. will behave incorrectly if multiple attributes are in the reaction + // stack at time of calling. However, since we process attributes + // in `update` this should not be possible (or an extreme corner case + // that we'd like to discover). + // mark state reflecting + + + this._updateState = this._updateState | STATE_IS_REFLECTING_TO_ATTRIBUTE; + + if (attrValue == null) { + this.removeAttribute(attr); + } else { + this.setAttribute(attr, attrValue); + } // mark state not reflecting + + + this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_ATTRIBUTE; + } + } + + _attributeToProperty(name, value) { + // Use tracking info to avoid deserializing attribute value if it was + // just set from a property setter. + if (this._updateState & STATE_IS_REFLECTING_TO_ATTRIBUTE) { + return; + } + + const ctor = this.constructor; + + const propName = ctor._attributeToPropertyMap.get(name); + + if (propName !== undefined) { + const options = ctor._classProperties.get(propName) || defaultPropertyDeclaration; // mark state reflecting + + this._updateState = this._updateState | STATE_IS_REFLECTING_TO_PROPERTY; + this[propName] = // tslint:disable-next-line:no-any + ctor._propertyValueFromAttribute(value, options); // mark state not reflecting + + this._updateState = this._updateState & ~STATE_IS_REFLECTING_TO_PROPERTY; + } + } + /** + * This private version of `requestUpdate` does not access or return the + * `updateComplete` promise. This promise can be overridden and is therefore + * not free to access. + */ + + + _requestUpdate(name, oldValue) { + let shouldRequestUpdate = true; // If we have a property key, perform property update steps. + + if (name !== undefined) { + const ctor = this.constructor; + const options = ctor._classProperties.get(name) || defaultPropertyDeclaration; + + if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) { + if (!this._changedProperties.has(name)) { + this._changedProperties.set(name, oldValue); + } // Add to reflecting properties set. + // Note, it's important that every change has a chance to add the + // property to `_reflectingProperties`. This ensures setting + // attribute + property reflects correctly. + + + if (options.reflect === true && !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) { + if (this._reflectingProperties === undefined) { + this._reflectingProperties = new Map(); + } + + this._reflectingProperties.set(name, options); + } + } else { + // Abort the request if the property should not be considered changed. + shouldRequestUpdate = false; + } + } + + if (!this._hasRequestedUpdate && shouldRequestUpdate) { + this._enqueueUpdate(); + } + } + /** + * Requests an update which is processed asynchronously. This should + * be called when an element should update based on some state not triggered + * by setting a property. In this case, pass no arguments. It should also be + * called when manually implementing a property setter. In this case, pass the + * property `name` and `oldValue` to ensure that any configured property + * options are honored. Returns the `updateComplete` Promise which is resolved + * when the update completes. + * + * @param name {PropertyKey} (optional) name of requesting property + * @param oldValue {any} (optional) old value of requesting property + * @returns {Promise} A Promise that is resolved when the update completes. + */ + + + requestUpdate(name, oldValue) { + this._requestUpdate(name, oldValue); + + return this.updateComplete; + } + /** + * Sets up the element to asynchronously update. + */ + + + async _enqueueUpdate() { + // Mark state updating... + this._updateState = this._updateState | STATE_UPDATE_REQUESTED; + let resolve; + let reject; + const previousUpdatePromise = this._updatePromise; + this._updatePromise = new Promise((res, rej) => { + resolve = res; + reject = rej; + }); + + try { + // Ensure any previous update has resolved before updating. + // This `await` also ensures that property changes are batched. + await previousUpdatePromise; + } catch (e) {} // Ignore any previous errors. We only care that the previous cycle is + // done. Any error should have been handled in the previous update. + // Make sure the element has connected before updating. + + + if (!this._hasConnected) { + await new Promise(res => this._hasConnectedResolver = res); + } + + try { + const result = this.performUpdate(); // If `performUpdate` returns a Promise, we await it. This is done to + // enable coordinating updates with a scheduler. Note, the result is + // checked to avoid delaying an additional microtask unless we need to. + + if (result != null) { + await result; + } + } catch (e) { + reject(e); + } + + resolve(!this._hasRequestedUpdate); + } + + get _hasConnected() { + return this._updateState & STATE_HAS_CONNECTED; + } + + get _hasRequestedUpdate() { + return this._updateState & STATE_UPDATE_REQUESTED; + } + + get hasUpdated() { + return this._updateState & STATE_HAS_UPDATED; + } + /** + * Performs an element update. Note, if an exception is thrown during the + * update, `firstUpdated` and `updated` will not be called. + * + * You can override this method to change the timing of updates. If this + * method is overridden, `super.performUpdate()` must be called. + * + * For instance, to schedule updates to occur just before the next frame: + * + * ``` + * protected async performUpdate(): Promise { + * await new Promise((resolve) => requestAnimationFrame(() => resolve())); + * super.performUpdate(); + * } + * ``` + */ + + + performUpdate() { + // Mixin instance properties once, if they exist. + if (this._instanceProperties) { + this._applyInstanceProperties(); + } + + let shouldUpdate = false; + const changedProperties = this._changedProperties; + + try { + shouldUpdate = this.shouldUpdate(changedProperties); + + if (shouldUpdate) { + this.update(changedProperties); + } + } catch (e) { + // Prevent `firstUpdated` and `updated` from running when there's an + // update exception. + shouldUpdate = false; + throw e; + } finally { + // Ensure element can accept additional updates after an exception. + this._markUpdated(); + } + + if (shouldUpdate) { + if (!(this._updateState & STATE_HAS_UPDATED)) { + this._updateState = this._updateState | STATE_HAS_UPDATED; + this.firstUpdated(changedProperties); + } + + this.updated(changedProperties); + } + } + + _markUpdated() { + this._changedProperties = new Map(); + this._updateState = this._updateState & ~STATE_UPDATE_REQUESTED; + } + /** + * Returns a Promise that resolves when the element has completed updating. + * The Promise value is a boolean that is `true` if the element completed the + * update without triggering another update. The Promise result is `false` if + * a property was set inside `updated()`. If the Promise is rejected, an + * exception was thrown during the update. This getter can be implemented to + * await additional state. For example, it is sometimes useful to await a + * rendered element before fulfilling this Promise. To do this, first await + * `super.updateComplete` then any subsequent state. + * + * @returns {Promise} The Promise returns a boolean that indicates if the + * update resolved without triggering another update. + */ + + + get updateComplete() { + return this._updatePromise; + } + /** + * Controls whether or not `update` should be called when the element requests + * an update. By default, this method always returns `true`, but this can be + * customized to control when to update. + * + * * @param _changedProperties Map of changed properties with old values + */ + + + shouldUpdate(_changedProperties) { + return true; + } + /** + * Updates the element. This method reflects property values to attributes. + * It can be overridden to render and keep updated element DOM. + * Setting properties inside this method will *not* trigger + * another update. + * + * * @param _changedProperties Map of changed properties with old values + */ + + + update(_changedProperties) { + if (this._reflectingProperties !== undefined && this._reflectingProperties.size > 0) { + // Use forEach so this works even if for/of loops are compiled to for + // loops expecting arrays + this._reflectingProperties.forEach((v, k) => this._propertyToAttribute(k, this[k], v)); + + this._reflectingProperties = undefined; + } + } + /** + * Invoked whenever the element is updated. Implement to perform + * post-updating tasks via DOM APIs, for example, focusing an element. + * + * Setting properties inside this method will trigger the element to update + * again after this update cycle completes. + * + * * @param _changedProperties Map of changed properties with old values + */ + + + updated(_changedProperties) {} + /** + * Invoked when the element is first updated. Implement to perform one time + * work on the element after update. + * + * Setting properties inside this method will trigger the element to update + * again after this update cycle completes. + * + * * @param _changedProperties Map of changed properties with old values + */ + + + firstUpdated(_changedProperties) {} + +} +/** + * Marks class as having finished creating properties. + */ + +UpdatingElement.finalized = true; + +/***/ }), + +/***/ "./node_modules/lit-element/lit-element.js": +/*!*************************************************!*\ + !*** ./node_modules/lit-element/lit-element.js ***! + \*************************************************/ +/*! exports provided: html, svg, TemplateResult, SVGTemplateResult, LitElement, defaultConverter, notEqual, UpdatingElement, customElement, property, query, queryAll, eventOptions, supportsAdoptingStyleSheets, CSSResult, unsafeCSS, css */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LitElement", function() { return LitElement; }); +/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lit-html */ "./node_modules/lit-html/lit-html.js"); +/* harmony import */ var lit_html_lib_shady_render_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lit-html/lib/shady-render.js */ "./node_modules/lit-html/lib/shady-render.js"); +/* harmony import */ var _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/updating-element.js */ "./node_modules/lit-element/lib/updating-element.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultConverter", function() { return _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["defaultConverter"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "notEqual", function() { return _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["notEqual"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UpdatingElement", function() { return _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["UpdatingElement"]; }); + +/* harmony import */ var _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/decorators.js */ "./node_modules/lit-element/lib/decorators.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customElement", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["customElement"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "property", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["property"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "query", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["query"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queryAll", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["queryAll"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eventOptions", function() { return _lib_decorators_js__WEBPACK_IMPORTED_MODULE_3__["eventOptions"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["html"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["svg"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateResult", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["TemplateResult"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SVGTemplateResult", function() { return lit_html__WEBPACK_IMPORTED_MODULE_0__["SVGTemplateResult"]; }); + +/* harmony import */ var _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/css-tag.js */ "./node_modules/lit-element/lib/css-tag.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsAdoptingStyleSheets", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["supportsAdoptingStyleSheets"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSResult", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["CSSResult"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unsafeCSS", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["unsafeCSS"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "css", function() { return _lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["css"]; }); + +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + + + + + + + + // IMPORTANT: do not change the property name or the assignment expression. +// This line will be used in regexes to search for LitElement usage. +// TODO(justinfagnani): inject version number at build time + +(window['litElementVersions'] || (window['litElementVersions'] = [])).push('2.0.1'); +/** + * Minimal implementation of Array.prototype.flat + * @param arr the array to flatten + * @param result the accumlated result + */ + +function arrayFlat(styles, result = []) { + for (let i = 0, length = styles.length; i < length; i++) { + const value = styles[i]; + + if (Array.isArray(value)) { + arrayFlat(value, result); + } else { + result.push(value); + } + } + + return result; +} +/** Deeply flattens styles array. Uses native flat if available. */ + + +const flattenStyles = styles => styles.flat ? styles.flat(Infinity) : arrayFlat(styles); + +class LitElement extends _lib_updating_element_js__WEBPACK_IMPORTED_MODULE_2__["UpdatingElement"] { + /** @nocollapse */ + static finalize() { + super.finalize(); // Prepare styling that is stamped at first render time. Styling + // is built from user provided `styles` or is inherited from the superclass. + + this._styles = this.hasOwnProperty(JSCompiler_renameProperty('styles', this)) ? this._getUniqueStyles() : this._styles || []; + } + /** @nocollapse */ + + + static _getUniqueStyles() { + // Take care not to call `this.styles` multiple times since this generates + // new CSSResults each time. + // TODO(sorvell): Since we do not cache CSSResults by input, any + // shared styles will generate new stylesheet objects, which is wasteful. + // This should be addressed when a browser ships constructable + // stylesheets. + const userStyles = this.styles; + const styles = []; + + if (Array.isArray(userStyles)) { + const flatStyles = flattenStyles(userStyles); // As a performance optimization to avoid duplicated styling that can + // occur especially when composing via subclassing, de-duplicate styles + // preserving the last item in the list. The last item is kept to + // try to preserve cascade order with the assumption that it's most + // important that last added styles override previous styles. + + const styleSet = flatStyles.reduceRight((set, s) => { + set.add(s); // on IE set.add does not return the set. + + return set; + }, new Set()); // Array.from does not work on Set in IE + + styleSet.forEach(v => styles.unshift(v)); + } else if (userStyles) { + styles.push(userStyles); + } + + return styles; + } + /** + * Performs element initialization. By default this calls `createRenderRoot` + * to create the element `renderRoot` node and captures any pre-set values for + * registered properties. + */ + + + initialize() { + super.initialize(); + this.renderRoot = this.createRenderRoot(); // Note, if renderRoot is not a shadowRoot, styles would/could apply to the + // element's getRootNode(). While this could be done, we're choosing not to + // support this now since it would require different logic around de-duping. + + if (window.ShadowRoot && this.renderRoot instanceof window.ShadowRoot) { + this.adoptStyles(); + } + } + /** + * Returns the node into which the element should render and by default + * creates and returns an open shadowRoot. Implement to customize where the + * element's DOM is rendered. For example, to render into the element's + * childNodes, return `this`. + * @returns {Element|DocumentFragment} Returns a node into which to render. + */ + + + createRenderRoot() { + return this.attachShadow({ + mode: 'open' + }); + } + /** + * Applies styling to the element shadowRoot using the `static get styles` + * property. Styling will apply using `shadowRoot.adoptedStyleSheets` where + * available and will fallback otherwise. When Shadow DOM is polyfilled, + * ShadyCSS scopes styles and adds them to the document. When Shadow DOM + * is available but `adoptedStyleSheets` is not, styles are appended to the + * end of the `shadowRoot` to [mimic spec + * behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets). + */ + + + adoptStyles() { + const styles = this.constructor._styles; + + if (styles.length === 0) { + return; + } // There are three separate cases here based on Shadow DOM support. + // (1) shadowRoot polyfilled: use ShadyCSS + // (2) shadowRoot.adoptedStyleSheets available: use it. + // (3) shadowRoot.adoptedStyleSheets polyfilled: append styles after + // rendering + + + if (window.ShadyCSS !== undefined && !window.ShadyCSS.nativeShadow) { + window.ShadyCSS.ScopingShim.prepareAdoptedCssText(styles.map(s => s.cssText), this.localName); + } else if (_lib_css_tag_js__WEBPACK_IMPORTED_MODULE_4__["supportsAdoptingStyleSheets"]) { + this.renderRoot.adoptedStyleSheets = styles.map(s => s.styleSheet); + } else { + // This must be done after rendering so the actual style insertion is done + // in `update`. + this._needsShimAdoptedStyleSheets = true; + } + } + + connectedCallback() { + super.connectedCallback(); // Note, first update/render handles styleElement so we only call this if + // connected after first update. + + if (this.hasUpdated && window.ShadyCSS !== undefined) { + window.ShadyCSS.styleElement(this); + } + } + /** + * Updates the element. This method reflects property values to attributes + * and calls `render` to render DOM via lit-html. Setting properties inside + * this method will *not* trigger another update. + * * @param _changedProperties Map of changed properties with old values + */ + + + update(changedProperties) { + super.update(changedProperties); + const templateResult = this.render(); + + if (templateResult instanceof lit_html__WEBPACK_IMPORTED_MODULE_0__["TemplateResult"]) { + this.constructor.render(templateResult, this.renderRoot, { + scopeName: this.localName, + eventContext: this + }); + } // When native Shadow DOM is used but adoptedStyles are not supported, + // insert styling after rendering to ensure adoptedStyles have highest + // priority. + + + if (this._needsShimAdoptedStyleSheets) { + this._needsShimAdoptedStyleSheets = false; + + this.constructor._styles.forEach(s => { + const style = document.createElement('style'); + style.textContent = s.cssText; + this.renderRoot.appendChild(style); + }); + } + } + /** + * Invoked on each update to perform rendering tasks. This method must return + * a lit-html TemplateResult. Setting properties inside this method will *not* + * trigger the element to update. + */ + + + render() {} + +} +/** + * Ensure this class is marked as `finalized` as an optimization ensuring + * it will not needlessly try to `finalize`. + */ + +LitElement.finalized = true; +/** + * Render method used to render the lit-html TemplateResult to the element's + * DOM. + * @param {TemplateResult} Template to render. + * @param {Element|DocumentFragment} Node into which to render. + * @param {String} Element name. + * @nocollapse + */ + +LitElement.render = lit_html_lib_shady_render_js__WEBPACK_IMPORTED_MODULE_1__["render"]; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/default-template-processor.js": +/*!*****************************************************************!*\ + !*** ./node_modules/lit-html/lib/default-template-processor.js ***! + \*****************************************************************/ +/*! exports provided: DefaultTemplateProcessor, defaultTemplateProcessor */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultTemplateProcessor", function() { return DefaultTemplateProcessor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultTemplateProcessor", function() { return defaultTemplateProcessor; }); +/* harmony import */ var _parts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./parts.js */ "./node_modules/lit-html/lib/parts.js"); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * Creates Parts when a template is instantiated. + */ + +class DefaultTemplateProcessor { + /** + * Create parts for an attribute-position binding, given the event, attribute + * name, and string literals. + * + * @param element The element containing the binding + * @param name The attribute name + * @param strings The string literals. There are always at least two strings, + * event for fully-controlled bindings with a single expression. + */ + handleAttributeExpressions(element, name, strings, options) { + const prefix = name[0]; + + if (prefix === '.') { + const comitter = new _parts_js__WEBPACK_IMPORTED_MODULE_0__["PropertyCommitter"](element, name.slice(1), strings); + return comitter.parts; + } + + if (prefix === '@') { + return [new _parts_js__WEBPACK_IMPORTED_MODULE_0__["EventPart"](element, name.slice(1), options.eventContext)]; + } + + if (prefix === '?') { + return [new _parts_js__WEBPACK_IMPORTED_MODULE_0__["BooleanAttributePart"](element, name.slice(1), strings)]; + } + + const comitter = new _parts_js__WEBPACK_IMPORTED_MODULE_0__["AttributeCommitter"](element, name, strings); + return comitter.parts; + } + /** + * Create parts for a text-position binding. + * @param templateFactory + */ + + + handleTextExpression(options) { + return new _parts_js__WEBPACK_IMPORTED_MODULE_0__["NodePart"](options); + } + +} +const defaultTemplateProcessor = new DefaultTemplateProcessor(); + +/***/ }), + +/***/ "./node_modules/lit-html/lib/directive.js": +/*!************************************************!*\ + !*** ./node_modules/lit-html/lib/directive.js ***! + \************************************************/ +/*! exports provided: directive, isDirective */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "directive", function() { return directive; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDirective", function() { return isDirective; }); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ +const directives = new WeakMap(); +/** + * Brands a function as a directive so that lit-html will call the function + * during template rendering, rather than passing as a value. + * + * @param f The directive factory function. Must be a function that returns a + * function of the signature `(part: Part) => void`. The returned function will + * be called with the part object + * + * @example + * + * ``` + * import {directive, html} from 'lit-html'; + * + * const immutable = directive((v) => (part) => { + * if (part.value !== v) { + * part.setValue(v) + * } + * }); + * ``` + */ +// tslint:disable-next-line:no-any + +const directive = f => (...args) => { + const d = f(...args); + directives.set(d, true); + return d; +}; +const isDirective = o => { + return typeof o === 'function' && directives.has(o); +}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/dom.js": +/*!******************************************!*\ + !*** ./node_modules/lit-html/lib/dom.js ***! + \******************************************/ +/*! exports provided: isCEPolyfill, reparentNodes, removeNodes */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCEPolyfill", function() { return isCEPolyfill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reparentNodes", function() { return reparentNodes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeNodes", function() { return removeNodes; }); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * True if the custom elements polyfill is in use. + */ +const isCEPolyfill = window.customElements !== undefined && window.customElements.polyfillWrapFlushCallback !== undefined; +/** + * Reparents nodes, starting from `startNode` (inclusive) to `endNode` + * (exclusive), into another container (could be the same container), before + * `beforeNode`. If `beforeNode` is null, it appends the nodes to the + * container. + */ + +const reparentNodes = (container, start, end = null, before = null) => { + let node = start; + + while (node !== end) { + const n = node.nextSibling; + container.insertBefore(node, before); + node = n; + } +}; +/** + * Removes nodes, starting from `startNode` (inclusive) to `endNode` + * (exclusive), from `container`. + */ + +const removeNodes = (container, startNode, endNode = null) => { + let node = startNode; + + while (node !== endNode) { + const n = node.nextSibling; + container.removeChild(node); + node = n; + } +}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/modify-template.js": +/*!******************************************************!*\ + !*** ./node_modules/lit-html/lib/modify-template.js ***! + \******************************************************/ +/*! exports provided: removeNodesFromTemplate, insertNodeIntoTemplate */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeNodesFromTemplate", function() { return removeNodesFromTemplate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertNodeIntoTemplate", function() { return insertNodeIntoTemplate; }); +/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./template.js */ "./node_modules/lit-html/lib/template.js"); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * @module shady-render + */ + +const walkerNodeFilter = 133 +/* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */ +; +/** + * Removes the list of nodes from a Template safely. In addition to removing + * nodes from the Template, the Template part indices are updated to match + * the mutated Template DOM. + * + * As the template is walked the removal state is tracked and + * part indices are adjusted as needed. + * + * div + * div#1 (remove) <-- start removing (removing node is div#1) + * div + * div#2 (remove) <-- continue removing (removing node is still div#1) + * div + * div <-- stop removing since previous sibling is the removing node (div#1, + * removed 4 nodes) + */ + +function removeNodesFromTemplate(template, nodesToRemove) { + const { + element: { + content + }, + parts + } = template; + const walker = document.createTreeWalker(content, walkerNodeFilter, null, false); + let partIndex = nextActiveIndexInTemplateParts(parts); + let part = parts[partIndex]; + let nodeIndex = -1; + let removeCount = 0; + const nodesToRemoveInTemplate = []; + let currentRemovingNode = null; + + while (walker.nextNode()) { + nodeIndex++; + const node = walker.currentNode; // End removal if stepped past the removing node + + if (node.previousSibling === currentRemovingNode) { + currentRemovingNode = null; + } // A node to remove was found in the template + + + if (nodesToRemove.has(node)) { + nodesToRemoveInTemplate.push(node); // Track node we're removing + + if (currentRemovingNode === null) { + currentRemovingNode = node; + } + } // When removing, increment count by which to adjust subsequent part indices + + + if (currentRemovingNode !== null) { + removeCount++; + } + + while (part !== undefined && part.index === nodeIndex) { + // If part is in a removed node deactivate it by setting index to -1 or + // adjust the index as needed. + part.index = currentRemovingNode !== null ? -1 : part.index - removeCount; // go to the next active part. + + partIndex = nextActiveIndexInTemplateParts(parts, partIndex); + part = parts[partIndex]; + } + } + + nodesToRemoveInTemplate.forEach(n => n.parentNode.removeChild(n)); +} + +const countNodes = node => { + let count = node.nodeType === 11 + /* Node.DOCUMENT_FRAGMENT_NODE */ + ? 0 : 1; + const walker = document.createTreeWalker(node, walkerNodeFilter, null, false); + + while (walker.nextNode()) { + count++; + } + + return count; +}; + +const nextActiveIndexInTemplateParts = (parts, startIndex = -1) => { + for (let i = startIndex + 1; i < parts.length; i++) { + const part = parts[i]; + + if (Object(_template_js__WEBPACK_IMPORTED_MODULE_0__["isTemplatePartActive"])(part)) { + return i; + } + } + + return -1; +}; +/** + * Inserts the given node into the Template, optionally before the given + * refNode. In addition to inserting the node into the Template, the Template + * part indices are updated to match the mutated Template DOM. + */ + + +function insertNodeIntoTemplate(template, node, refNode = null) { + const { + element: { + content + }, + parts + } = template; // If there's no refNode, then put node at end of template. + // No part indices need to be shifted in this case. + + if (refNode === null || refNode === undefined) { + content.appendChild(node); + return; + } + + const walker = document.createTreeWalker(content, walkerNodeFilter, null, false); + let partIndex = nextActiveIndexInTemplateParts(parts); + let insertCount = 0; + let walkerIndex = -1; + + while (walker.nextNode()) { + walkerIndex++; + const walkerNode = walker.currentNode; + + if (walkerNode === refNode) { + insertCount = countNodes(node); + refNode.parentNode.insertBefore(node, refNode); + } + + while (partIndex !== -1 && parts[partIndex].index === walkerIndex) { + // If we've inserted the node, simply adjust all subsequent parts + if (insertCount > 0) { + while (partIndex !== -1) { + parts[partIndex].index += insertCount; + partIndex = nextActiveIndexInTemplateParts(parts, partIndex); + } + + return; + } + + partIndex = nextActiveIndexInTemplateParts(parts, partIndex); + } + } +} + +/***/ }), + +/***/ "./node_modules/lit-html/lib/part.js": +/*!*******************************************!*\ + !*** ./node_modules/lit-html/lib/part.js ***! + \*******************************************/ +/*! exports provided: noChange, nothing */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noChange", function() { return noChange; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nothing", function() { return nothing; }); +/** + * @license + * Copyright (c) 2018 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * A sentinel value that signals that a value was handled by a directive and + * should not be written to the DOM. + */ +const noChange = {}; +/** + * A sentinel value that signals a NodePart to fully clear its content. + */ + +const nothing = {}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/parts.js": +/*!********************************************!*\ + !*** ./node_modules/lit-html/lib/parts.js ***! + \********************************************/ +/*! exports provided: isPrimitive, AttributeCommitter, AttributePart, NodePart, BooleanAttributePart, PropertyCommitter, PropertyPart, EventPart */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPrimitive", function() { return isPrimitive; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttributeCommitter", function() { return AttributeCommitter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttributePart", function() { return AttributePart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NodePart", function() { return NodePart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanAttributePart", function() { return BooleanAttributePart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyCommitter", function() { return PropertyCommitter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyPart", function() { return PropertyPart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventPart", function() { return EventPart; }); +/* harmony import */ var _directive_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./directive.js */ "./node_modules/lit-html/lib/directive.js"); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom.js */ "./node_modules/lit-html/lib/dom.js"); +/* harmony import */ var _part_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./part.js */ "./node_modules/lit-html/lib/part.js"); +/* harmony import */ var _template_instance_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./template-instance.js */ "./node_modules/lit-html/lib/template-instance.js"); +/* harmony import */ var _template_result_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./template-result.js */ "./node_modules/lit-html/lib/template-result.js"); +/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./template.js */ "./node_modules/lit-html/lib/template.js"); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * @module lit-html + */ + + + + + + +const isPrimitive = value => { + return value === null || !(typeof value === 'object' || typeof value === 'function'); +}; +/** + * Sets attribute values for AttributeParts, so that the value is only set once + * even if there are multiple parts for an attribute. + */ + +class AttributeCommitter { + constructor(element, name, strings) { + this.dirty = true; + this.element = element; + this.name = name; + this.strings = strings; + this.parts = []; + + for (let i = 0; i < strings.length - 1; i++) { + this.parts[i] = this._createPart(); + } + } + /** + * Creates a single part. Override this to create a differnt type of part. + */ + + + _createPart() { + return new AttributePart(this); + } + + _getValue() { + const strings = this.strings; + const l = strings.length - 1; + let text = ''; + + for (let i = 0; i < l; i++) { + text += strings[i]; + const part = this.parts[i]; + + if (part !== undefined) { + const v = part.value; + + if (v != null && (Array.isArray(v) || // tslint:disable-next-line:no-any + typeof v !== 'string' && v[Symbol.iterator])) { + for (const t of v) { + text += typeof t === 'string' ? t : String(t); + } + } else { + text += typeof v === 'string' ? v : String(v); + } + } + } + + text += strings[l]; + return text; + } + + commit() { + if (this.dirty) { + this.dirty = false; + this.element.setAttribute(this.name, this._getValue()); + } + } + +} +class AttributePart { + constructor(comitter) { + this.value = undefined; + this.committer = comitter; + } + + setValue(value) { + if (value !== _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"] && (!isPrimitive(value) || value !== this.value)) { + this.value = value; // If the value is a not a directive, dirty the committer so that it'll + // call setAttribute. If the value is a directive, it'll dirty the + // committer if it calls setValue(). + + if (!Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(value)) { + this.committer.dirty = true; + } + } + } + + commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this.value)) { + const directive = this.value; + this.value = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + if (this.value === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + this.committer.commit(); + } + +} +class NodePart { + constructor(options) { + this.value = undefined; + this._pendingValue = undefined; + this.options = options; + } + /** + * Inserts this part into a container. + * + * This part must be empty, as its contents are not automatically moved. + */ + + + appendInto(container) { + this.startNode = container.appendChild(Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + this.endNode = container.appendChild(Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + } + /** + * Inserts this part between `ref` and `ref`'s next sibling. Both `ref` and + * its next sibling must be static, unchanging nodes such as those that appear + * in a literal section of a template. + * + * This part must be empty, as its contents are not automatically moved. + */ + + + insertAfterNode(ref) { + this.startNode = ref; + this.endNode = ref.nextSibling; + } + /** + * Appends this part into a parent part. + * + * This part must be empty, as its contents are not automatically moved. + */ + + + appendIntoPart(part) { + part._insert(this.startNode = Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + + part._insert(this.endNode = Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + } + /** + * Appends this part after `ref` + * + * This part must be empty, as its contents are not automatically moved. + */ + + + insertAfterPart(ref) { + ref._insert(this.startNode = Object(_template_js__WEBPACK_IMPORTED_MODULE_5__["createMarker"])()); + + this.endNode = ref.endNode; + ref.endNode = this.startNode; + } + + setValue(value) { + this._pendingValue = value; + } + + commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this._pendingValue)) { + const directive = this._pendingValue; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + const value = this._pendingValue; + + if (value === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + if (isPrimitive(value)) { + if (value !== this.value) { + this._commitText(value); + } + } else if (value instanceof _template_result_js__WEBPACK_IMPORTED_MODULE_4__["TemplateResult"]) { + this._commitTemplateResult(value); + } else if (value instanceof Node) { + this._commitNode(value); + } else if (Array.isArray(value) || // tslint:disable-next-line:no-any + value[Symbol.iterator]) { + this._commitIterable(value); + } else if (value === _part_js__WEBPACK_IMPORTED_MODULE_2__["nothing"]) { + this.value = _part_js__WEBPACK_IMPORTED_MODULE_2__["nothing"]; + this.clear(); + } else { + // Fallback, will render the string representation + this._commitText(value); + } + } + + _insert(node) { + this.endNode.parentNode.insertBefore(node, this.endNode); + } + + _commitNode(value) { + if (this.value === value) { + return; + } + + this.clear(); + + this._insert(value); + + this.value = value; + } + + _commitText(value) { + const node = this.startNode.nextSibling; + value = value == null ? '' : value; + + if (node === this.endNode.previousSibling && node.nodeType === 3 + /* Node.TEXT_NODE */ + ) { + // If we only have a single text node between the markers, we can just + // set its value, rather than replacing it. + // TODO(justinfagnani): Can we just check if this.value is primitive? + node.data = value; + } else { + this._commitNode(document.createTextNode(typeof value === 'string' ? value : String(value))); + } + + this.value = value; + } + + _commitTemplateResult(value) { + const template = this.options.templateFactory(value); + + if (this.value instanceof _template_instance_js__WEBPACK_IMPORTED_MODULE_3__["TemplateInstance"] && this.value.template === template) { + this.value.update(value.values); + } else { + // Make sure we propagate the template processor from the TemplateResult + // so that we use its syntax extension, etc. The template factory comes + // from the render function options so that it can control template + // caching and preprocessing. + const instance = new _template_instance_js__WEBPACK_IMPORTED_MODULE_3__["TemplateInstance"](template, value.processor, this.options); + + const fragment = instance._clone(); + + instance.update(value.values); + + this._commitNode(fragment); + + this.value = instance; + } + } + + _commitIterable(value) { + // For an Iterable, we create a new InstancePart per item, then set its + // value to the item. This is a little bit of overhead for every item in + // an Iterable, but it lets us recurse easily and efficiently update Arrays + // of TemplateResults that will be commonly returned from expressions like: + // array.map((i) => html`${i}`), by reusing existing TemplateInstances. + // If _value is an array, then the previous render was of an + // iterable and _value will contain the NodeParts from the previous + // render. If _value is not an array, clear this part and make a new + // array for NodeParts. + if (!Array.isArray(this.value)) { + this.value = []; + this.clear(); + } // Lets us keep track of how many items we stamped so we can clear leftover + // items from a previous render + + + const itemParts = this.value; + let partIndex = 0; + let itemPart; + + for (const item of value) { + // Try to reuse an existing part + itemPart = itemParts[partIndex]; // If no existing part, create a new one + + if (itemPart === undefined) { + itemPart = new NodePart(this.options); + itemParts.push(itemPart); + + if (partIndex === 0) { + itemPart.appendIntoPart(this); + } else { + itemPart.insertAfterPart(itemParts[partIndex - 1]); + } + } + + itemPart.setValue(item); + itemPart.commit(); + partIndex++; + } + + if (partIndex < itemParts.length) { + // Truncate the parts array so _value reflects the current state + itemParts.length = partIndex; + this.clear(itemPart && itemPart.endNode); + } + } + + clear(startNode = this.startNode) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__["removeNodes"])(this.startNode.parentNode, startNode.nextSibling, this.endNode); + } + +} +/** + * Implements a boolean attribute, roughly as defined in the HTML + * specification. + * + * If the value is truthy, then the attribute is present with a value of + * ''. If the value is falsey, the attribute is removed. + */ + +class BooleanAttributePart { + constructor(element, name, strings) { + this.value = undefined; + this._pendingValue = undefined; + + if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') { + throw new Error('Boolean attributes can only contain a single expression'); + } + + this.element = element; + this.name = name; + this.strings = strings; + } + + setValue(value) { + this._pendingValue = value; + } + + commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this._pendingValue)) { + const directive = this._pendingValue; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + if (this._pendingValue === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + const value = !!this._pendingValue; + + if (this.value !== value) { + if (value) { + this.element.setAttribute(this.name, ''); + } else { + this.element.removeAttribute(this.name); + } + } + + this.value = value; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + } + +} +/** + * Sets attribute values for PropertyParts, so that the value is only set once + * even if there are multiple parts for a property. + * + * If an expression controls the whole property value, then the value is simply + * assigned to the property under control. If there are string literals or + * multiple expressions, then the strings are expressions are interpolated into + * a string first. + */ + +class PropertyCommitter extends AttributeCommitter { + constructor(element, name, strings) { + super(element, name, strings); + this.single = strings.length === 2 && strings[0] === '' && strings[1] === ''; + } + + _createPart() { + return new PropertyPart(this); + } + + _getValue() { + if (this.single) { + return this.parts[0].value; + } + + return super._getValue(); + } + + commit() { + if (this.dirty) { + this.dirty = false; // tslint:disable-next-line:no-any + + this.element[this.name] = this._getValue(); + } + } + +} +class PropertyPart extends AttributePart {} // Detect event listener options support. If the `capture` property is read +// from the options object, then options are supported. If not, then the thrid +// argument to add/removeEventListener is interpreted as the boolean capture +// value so we should only pass the `capture` property. + +let eventOptionsSupported = false; + +try { + const options = { + get capture() { + eventOptionsSupported = true; + return false; + } + + }; // tslint:disable-next-line:no-any + + window.addEventListener('test', options, options); // tslint:disable-next-line:no-any + + window.removeEventListener('test', options, options); +} catch (_e) {} + +class EventPart { + constructor(element, eventName, eventContext) { + this.value = undefined; + this._pendingValue = undefined; + this.element = element; + this.eventName = eventName; + this.eventContext = eventContext; + + this._boundHandleEvent = e => this.handleEvent(e); + } + + setValue(value) { + this._pendingValue = value; + } + + commit() { + while (Object(_directive_js__WEBPACK_IMPORTED_MODULE_0__["isDirective"])(this._pendingValue)) { + const directive = this._pendingValue; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + directive(this); + } + + if (this._pendingValue === _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]) { + return; + } + + const newListener = this._pendingValue; + const oldListener = this.value; + const shouldRemoveListener = newListener == null || oldListener != null && (newListener.capture !== oldListener.capture || newListener.once !== oldListener.once || newListener.passive !== oldListener.passive); + const shouldAddListener = newListener != null && (oldListener == null || shouldRemoveListener); + + if (shouldRemoveListener) { + this.element.removeEventListener(this.eventName, this._boundHandleEvent, this._options); + } + + if (shouldAddListener) { + this._options = getOptions(newListener); + this.element.addEventListener(this.eventName, this._boundHandleEvent, this._options); + } + + this.value = newListener; + this._pendingValue = _part_js__WEBPACK_IMPORTED_MODULE_2__["noChange"]; + } + + handleEvent(event) { + if (typeof this.value === 'function') { + this.value.call(this.eventContext || this.element, event); + } else { + this.value.handleEvent(event); + } + } + +} // We copy options because of the inconsistent behavior of browsers when reading +// the third argument of add/removeEventListener. IE11 doesn't support options +// at all. Chrome 41 only reads `capture` if the argument is an object. + +const getOptions = o => o && (eventOptionsSupported ? { + capture: o.capture, + passive: o.passive, + once: o.once +} : o.capture); + +/***/ }), + +/***/ "./node_modules/lit-html/lib/render.js": +/*!*********************************************!*\ + !*** ./node_modules/lit-html/lib/render.js ***! + \*********************************************/ +/*! exports provided: parts, render */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parts", function() { return parts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/lit-html/lib/dom.js"); +/* harmony import */ var _parts_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parts.js */ "./node_modules/lit-html/lib/parts.js"); +/* harmony import */ var _template_factory_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./template-factory.js */ "./node_modules/lit-html/lib/template-factory.js"); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * @module lit-html + */ + + + +const parts = new WeakMap(); +/** + * Renders a template to a container. + * + * To update a container with new values, reevaluate the template literal and + * call `render` with the new result. + * + * @param result a TemplateResult created by evaluating a template tag like + * `html` or `svg`. + * @param container A DOM parent to render to. The entire contents are either + * replaced, or efficiently updated if the same result type was previous + * rendered there. + * @param options RenderOptions for the entire render tree rendered to this + * container. Render options must *not* change between renders to the same + * container, as those changes will not effect previously rendered DOM. + */ + +const render = (result, container, options) => { + let part = parts.get(container); + + if (part === undefined) { + Object(_dom_js__WEBPACK_IMPORTED_MODULE_0__["removeNodes"])(container, container.firstChild); + parts.set(container, part = new _parts_js__WEBPACK_IMPORTED_MODULE_1__["NodePart"](Object.assign({ + templateFactory: _template_factory_js__WEBPACK_IMPORTED_MODULE_2__["templateFactory"] + }, options))); + part.appendInto(container); + } + + part.setValue(result); + part.commit(); +}; + +/***/ }), + +/***/ "./node_modules/lit-html/lib/shady-render.js": +/*!***************************************************!*\ + !*** ./node_modules/lit-html/lib/shady-render.js ***! + \***************************************************/ +/*! exports provided: html, svg, TemplateResult, render */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; }); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/lit-html/lib/dom.js"); +/* harmony import */ var _modify_template_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modify-template.js */ "./node_modules/lit-html/lib/modify-template.js"); +/* harmony import */ var _render_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./render.js */ "./node_modules/lit-html/lib/render.js"); +/* harmony import */ var _template_factory_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./template-factory.js */ "./node_modules/lit-html/lib/template-factory.js"); +/* harmony import */ var _template_instance_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./template-instance.js */ "./node_modules/lit-html/lib/template-instance.js"); +/* harmony import */ var _template_result_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./template-result.js */ "./node_modules/lit-html/lib/template-result.js"); +/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./template.js */ "./node_modules/lit-html/lib/template.js"); +/* harmony import */ var _lit_html_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lit-html.js */ "./node_modules/lit-html/lit-html.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return _lit_html_js__WEBPACK_IMPORTED_MODULE_7__["html"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return _lit_html_js__WEBPACK_IMPORTED_MODULE_7__["svg"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TemplateResult", function() { return _lit_html_js__WEBPACK_IMPORTED_MODULE_7__["TemplateResult"]; }); + +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * 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 + */ + +/** + * Module to add shady DOM/shady CSS polyfill support to lit-html template + * rendering. See the [[render]] method for details. + * + * @module shady-render + * @preferred + */ + +/** + * Do not remove this comment; it keeps typedoc from misplacing the module + * docs. + */ + + + + + + + + // Get a key to lookup in `templateCaches`. + +const getTemplateCacheKey = (type, scopeName) => `${type}--${scopeName}`; + +let compatibleShadyCSSVersion = true; + +if (typeof window.ShadyCSS === 'undefined') { + compatibleShadyCSSVersion = false; +} else if (typeof window.ShadyCSS.prepareTemplateDom === 'undefined') { + console.warn(`Incompatible ShadyCSS version detected.` + `Please update to at least @webcomponents/webcomponentsjs@2.0.2 and` + `@webcomponents/shadycss@1.3.1.`); + compatibleShadyCSSVersion = false; +} +/** + * Template factory which scopes template DOM using ShadyCSS. + * @param scopeName {string} + */ + + +const shadyTemplateFactory = scopeName => result => { + const cacheKey = getTemplateCacheKey(result.type, scopeName); + let templateCache = _template_factory_js__WEBPACK_IMPORTED_MODULE_3__["templateCaches"].get(cacheKey); + + if (templateCache === undefined) { + templateCache = { + stringsArray: new WeakMap(), + keyString: new Map() + }; + _template_factory_js__WEBPACK_IMPORTED_MODULE_3__["templateCaches"].set(cacheKey, templateCache); + } + + let template = templateCache.stringsArray.get(result.strings); + + if (template !== undefined) { + return template; + } + + const key = result.strings.join(_template_js__WEBPACK_IMPORTED_MODULE_6__["marker"]); + template = templateCache.keyString.get(key); + + if (template === undefined) { + const element = result.getTemplateElement(); + + if (compatibleShadyCSSVersion) { + window.ShadyCSS.prepareTemplateDom(element, scopeName); + } + + template = new _template_js__WEBPACK_IMPORTED_MODULE_6__["Template"](result, element); + templateCache.keyString.set(key, template); + } + + templateCache.stringsArray.set(result.strings, template); + return template; +}; + +const TEMPLATE_TYPES = ['html', 'svg']; +/** + * Removes all style elements from Templates for the given scopeName. + */ + +const removeStylesFromLitTemplates = scopeName => { + TEMPLATE_TYPES.forEach(type => { + const templates = _template_factory_js__WEBPACK_IMPORTED_MODULE_3__["templateCaches"].get(getTemplateCacheKey(type, scopeName)); + + if (templates !== undefined) { + templates.keyString.forEach(template => { + const { + element: { + content + } + } = template; // IE 11 doesn't support the iterable param Set constructor + + const styles = new Set(); + Array.from(content.querySelectorAll('style')).forEach(s => { + styles.add(s); + }); + Object(_modify_template_js__WEBPACK_IMPORTED_MODULE_1__["removeNodesFromTemplate"])(template, styles); + }); + } + }); +}; + +const shadyRenderSet = new Set(); +/** + * For the given scope name, ensures that ShadyCSS style scoping is performed. + * This is done just once per scope name so the fragment and template cannot + * be modified. + * (1) extracts styles from the rendered fragment and hands them to ShadyCSS + * to be scoped and appended to the document + * (2) removes style elements from all lit-html Templates for this scope name. + * + * Note, + +
+ + +
+ `; + } + + static get properties() { + return { + hass: Object, + inDialog: { + type: Boolean, + value: false + }, + stateObj: Object, + controlElement: String, + extraObj: { + type: Array, + computed: 'computeExtra(hass, stateObj, _attached)' + }, + _attached: Boolean, + extraObjVisible: { + type: Boolean, + computed: 'computeExtraVisible(extraObj, inDialog)' + } + }; + } + + connectedCallback() { + super.connectedCallback(); + this._attached = true; + } + + disconnectedCallback() { + this._isAttached = false; + super.disconnectedCallback(); + } + + computeExtra(hass, stateObj, attached) { + if (!stateObj.attributes.extra_badge || !attached) return []; + let extraBadges = stateObj.attributes.extra_badge; + + if (!Array.isArray(extraBadges)) { + extraBadges = [extraBadges]; + } + + return extraBadges.map(extraBadge => { + let result = null; if (extraBadge.entity_id && hass.states[extraBadge.entity_id]) { result = Object.assign({}, window.customUI.maybeChangeObject(this, hass.states[extraBadge.entity_id], this.inDialog, @@ -1053,7 +4360,7 @@ customElements.whenDefined('state-card-display').then(() => { applyThemes(hass, element, stateObj) { const themeName = stateObj.attributes.theme || 'default'; - Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_1__["default"])(element, hass.themes || { + Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_1__["default"])(element, hass.themes || { default_theme: 'default', themes: {} }, themeName); @@ -1081,38 +4388,36 @@ customElements.whenDefined('state-card-display').then(() => { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @polymer/polymer/lib/utils/html-tag.js */ "./node_modules/@polymer/polymer/lib/utils/html-tag.js"); -/* harmony import */ var _mixins_events_mixin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/events-mixin.js */ "./src/mixins/events-mixin.js"); -/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); - +/* harmony import */ var lit_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lit-element */ "./node_modules/lit-element/lit-element.js"); +/* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); /** * @extends HTMLElement */ -class HaConfigCustomUi extends Object(_mixins_events_mixin_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Polymer.Element) { - static get template() { - return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"]` +class HaConfigCustomUi extends lit_element__WEBPACK_IMPORTED_MODULE_0__["LitElement"] { + render() { + return lit_element__WEBPACK_IMPORTED_MODULE_0__["html"]`
Custom UI settings
- +
Set device name so that you can reference it in per-device settings
@@ -1123,16 +4428,28 @@ class HaConfigCustomUi extends Object(_mixins_events_mixin_js__WEBPACK_IMPORTED_ static get properties() { return { - isWide: Boolean, + isWide: { + type: Boolean, + attribute: 'is-wide' + }, name: { type: String, + reflect: true, observer: 'nameChanged' } }; } - ready() { - super.ready(); + attributeChangedCallback(name, oldval, newval) { + if (name === 'name') { + this.nameChanged(newval); + } + + super.attributeChangedCallback(name, oldval, newval); + } + + connectedCallback() { + super.connectedCallback(); this.name = window.customUI.getName(); } @@ -1142,7 +4459,8 @@ class HaConfigCustomUi extends Object(_mixins_events_mixin_js__WEBPACK_IMPORTED_ _backHandler() { window.history.back(); - this.fire('location-changed'); + const event = new CustomEvent('location-changed'); + this.dispatchEvent(event); } } @@ -1162,133 +4480,147 @@ customElements.define('ha-config-custom-ui', HaConfigCustomUi); __webpack_require__.r(__webpack_exports__); /* harmony import */ var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @polymer/polymer/lib/utils/html-tag.js */ "./node_modules/@polymer/polymer/lib/utils/html-tag.js"); -/** - * @extends HTMLElement - */ -class HaThemedSlider extends Polymer.Element { - static get template() { - return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"]` - + .disable-off-when-min.is-on { + --paper-slider-knob-start-color: var(--paper-slider-knob-color); + --paper-slider-knob-start-border-color: var(--paper-slider-knob-color); + } + paper-slider { + margin: 4px 0; + max-width: 100%; + min-width: 100px; + width: var(--ha-paper-slider-width, 200px); + } + - - - `; - } + + + `; + } - ready() { - super.ready(); - this.disableOffWhenMin = !this._computeAttribute(this.theme, 'off_when_min', !this.disableOffWhenMin); - this.computeEnabledThemedReportWhenNotChanged(this.theme, this.disableReportWhenNotChanged); - } + ready() { + super.ready(); + this.disableOffWhenMin = !this._computeAttribute(this.theme, 'off_when_min', !this.disableOffWhenMin); + this.computeEnabledThemedReportWhenNotChanged(this.theme, this.disableReportWhenNotChanged); + } - static get properties() { - return { - min: { - type: Number, - value: 0 - }, - max: { - type: Number, - value: 100 - }, - pin: { - type: Boolean, - value: false - }, - isOn: { - type: Boolean, - value: false - }, - disableOffWhenMin: { - type: Boolean, - value: false, - notify: true - }, - disableReportWhenNotChanged: { - type: Boolean, - value: false - }, - theme: Object, - value: { - type: Number, - notify: true - }, - _themedMin: { - type: Number, - computed: '_computeAttribute(theme, "min", min)' - } - }; - } + connectedCallback() { + super.connectedCallback(); + this.$.slider._keyBindings = this.$.slider._keyBindings || {}; + } - static get observers() { - return ['computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged)']; - } + static get properties() { + return { + min: { + type: Number, + value: 0 + }, + max: { + type: Number, + value: 100 + }, + pin: { + type: Boolean, + value: false + }, + isOn: { + type: Boolean, + value: false + }, + disableOffWhenMin: { + type: Boolean, + value: false, + notify: true + }, + disableReportWhenNotChanged: { + type: Boolean, + value: false + }, + theme: Object, + value: { + type: Number, + notify: true + }, + _themedMin: { + type: Number, + computed: '_computeAttribute(theme, "min", min)' + } + }; + } - computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged) { - this._enabledThemedReportWhenNotChanged = this._computeAttribute(theme, 'report_when_not_changed', !disableReportWhenNotChanged); - } + static get observers() { + return ['computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged)']; + } + + computeEnabledThemedReportWhenNotChanged(theme, disableReportWhenNotChanged) { + this._enabledThemedReportWhenNotChanged = this._computeAttribute(theme, 'report_when_not_changed', !disableReportWhenNotChanged); + } - _computeAttribute(theme, attr, def) { - if (theme) { - if (attr in theme) { - return theme[attr]; + _computeAttribute(theme, attr, def) { + if (theme) { + if (attr in theme) { + return theme[attr]; + } } + + return def; } - return def; - } + computeClass(theme, isOn, themedMin) { + let result = ''; - computeClass(theme, isOn, themedMin) { - let result = ''; + if (isOn) { + result += 'is-on '; + } - if (isOn) { - result += 'is-on '; - } + if (this._computeAttribute(theme, 'off_when_min', !this.disableOffWhenMin) || themedMin === 0) { + // If offWhenMin is enabled don't customize. + return ''; + } - if (this._computeAttribute(theme, 'off_when_min', !this.disableOffWhenMin) || themedMin === 0) { - // If offWhenMin is enabled don't customize. - return ''; + return `${result}disable-off-when-min`; } - return `${result}disable-off-when-min`; - } + valueChanged(ev) { + if (!this._enabledThemedReportWhenNotChanged && this.value === ev.target.value) { + ev.stopPropagation(); + return; + } - valueChanged(ev) { - if (!this._enabledThemedReportWhenNotChanged && this.value === ev.target.value) { - ev.stopPropagation(); - return; + this.value = ev.target.value; } - this.value = ev.target.value; } + customElements.define('ha-themed-slider', HaThemedSlider); } -customElements.define('ha-themed-slider', HaThemedSlider); +if (Polymer && Polymer.Element && customElements.get('home-assistant')) { + loadCustomUI(); +} else { + customElements.whenDefined('home-assistant').then(() => loadCustomUI()); +} /***/ }), @@ -1301,9 +4633,9 @@ customElements.define('ha-themed-slider', HaThemedSlider); "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.js */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.js"); +/* harmony import */ var _home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts */ "../home-assistant-polymer/src/common/dom/apply_themes_on_element.ts"); /* harmony import */ var _home_assistant_polymer_src_common_entity_compute_state_domain_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/entity/compute_state_domain.ts */ "../home-assistant-polymer/src/common/entity/compute_state_domain.ts"); -/* harmony import */ var _home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/dynamic_content_updater.js */ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.js"); +/* harmony import */ var _home_assistant_polymer_src_common_dom_dynamic_content_updater_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts */ "../home-assistant-polymer/src/common/dom/dynamic_content_updater.ts"); /* harmony import */ var _home_assistant_polymer_src_common_entity_state_card_type_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../home-assistant-polymer/src/common/entity/state_card_type.ts */ "../home-assistant-polymer/src/common/entity/state_card_type.ts"); /* harmony import */ var _utils_hooks_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/hooks.js */ "./src/utils/hooks.js"); /* harmony import */ var _state_card_with_slider_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./state-card-with-slider.js */ "./src/elements/state-card-with-slider.js"); @@ -1315,284 +4647,293 @@ __webpack_require__.r(__webpack_exports__); -const SHOW_LAST_CHANGED_BLACKLISTED_CARDS = ['configurator']; -const DOMAIN_TO_SLIDER_SUPPORT = { - light: 1, - // SUPPORT_BRIGHTNESS - cover: 4, - // SUPPORT_SET_POSITION - climate: 1 // SUPPORT_TARGET_TEMPERATURE -}; -const TYPE_TO_CONTROL = { - toggle: 'ha-entity-toggle', - display: '', - cover: 'ha-cover-controls' -}; -/** - * @extends HTMLElement - */ +function loadCustomUI() { + const SHOW_LAST_CHANGED_BLACKLISTED_CARDS = ['configurator']; + const DOMAIN_TO_SLIDER_SUPPORT = { + light: 1, + // SUPPORT_BRIGHTNESS + cover: 4, + // SUPPORT_SET_POSITION + climate: 1 // SUPPORT_TARGET_TEMPERATURE -class StateCardCustomUi extends Polymer.Element { - static get properties() { - return { - hass: Object, - inDialog: { - type: Boolean, - value: false - }, - stateObj: Object - }; - } + }; + const TYPE_TO_CONTROL = { + toggle: 'ha-entity-toggle', + display: '', + cover: 'ha-cover-controls' + }; + /** + * @extends HTMLElement + */ - static get observers() { - return ['inputChanged(hass, inDialog, stateObj)']; - } + class StateCardCustomUi extends Polymer.Element { + static get properties() { + return { + hass: Object, + inDialog: { + type: Boolean, + value: false + }, + stateObj: Object + }; + } - connectedCallback() { - super.connectedCallback(); - const container = this.parentNode.parentNode; + static get observers() { + return ['inputChanged(hass, inDialog, stateObj)']; + } + + connectedCallback() { + super.connectedCallback(); + const container = this.parentNode.parentNode; - if (container.tagName === 'DIV' && (container.classList.contains('state') || container.classList.contains('child-card'))) { - this._container = container; // Since this doesn't actually change the background - no need to clear it. + if (container.tagName === 'DIV' && (container.classList.contains('state') || container.classList.contains('child-card'))) { + this._container = container; // Since this doesn't actually change the background - no need to clear it. - container.style.setProperty('background-color', 'var(--paper-card-background-color, inherit)'); // Polyfill 'updateStyles'. + container.style.setProperty('background-color', 'var(--paper-card-background-color, inherit)'); // Polyfill 'updateStyles'. - if (!container.updateStyles) { - container.updateStyles = styles => { - Object.keys(styles).forEach(key => { - container.style.setProperty(key, styles[key]); - }); - }; + if (!container.updateStyles) { + container.updateStyles = styles => { + Object.keys(styles).forEach(key => { + container.style.setProperty(key, styles[key]); + }); + }; + } } + + this._isAttached = true; + this.inputChanged(this.hass, this.inDialog, this.stateObj); } - this._isAttached = true; - this.inputChanged(this.hass, this.inDialog, this.stateObj); - } + disconnectedCallback() { + this._isAttached = false; - disconnectedCallback() { - this._isAttached = false; + if (this._container) { + this._container.updateStyles({ + display: '', + margin: '', + padding: '' + }); - if (this._container) { - this._container.updateStyles({ - display: '', - margin: '', - padding: '' - }); + Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__["default"])(this._container, this.hass.themes || { + default_theme: 'default', + themes: {} + }, 'default'); + this._container = null; + } - Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._container, this.hass.themes || { - default_theme: 'default', - themes: {} - }, 'default'); - this._container = null; + super.disconnectedCallback(); } - super.disconnectedCallback(); - } + badgeMode(hass, stateObj, domain) { + const states = []; - badgeMode(hass, stateObj, domain) { - const states = []; + if (domain === 'group') { + stateObj.attributes.entity_id.forEach(id => { + const state = hass.states[id]; - if (domain === 'group') { - stateObj.attributes.entity_id.forEach(id => { - const state = hass.states[id]; + if (!state) { + /* eslint-disable no-console */ + console.warn(`Unknown ID ${id} in group ${stateObj.entity_id}`); + /* eslint-enable no-console */ - if (!state) { - /* eslint-disable no-console */ - console.warn(`Unknown ID ${id} in group ${stateObj.entity_id}`); - /* eslint-enable no-console */ + return; + } - return; - } + if (!stateObj.attributes.badges_list || stateObj.attributes.badges_list.includes(state.entity_id)) { + states.push(window.customUI.maybeChangeObject(this, state, false + /* inDialog */ + , false + /* allowHidden */ + )); + } + }); + } else { + states.push(stateObj); - if (!stateObj.attributes.badges_list || stateObj.attributes.badges_list.includes(state.entity_id)) { - states.push(window.customUI.maybeChangeObject(this, state, false - /* inDialog */ - , false - /* allowHidden */ - )); - } - }); - } else { - states.push(stateObj); + if (this._container) { + this._container.style.display = 'inline-block'; + const params = { + display: 'inline-block' + }; - if (this._container) { - this._container.style.display = 'inline-block'; - const params = { - display: 'inline-block' - }; + if (this._container.classList.contains('state')) { + params.margin = 'var(--ha-badges-card-margin, 0)'; + } - if (this._container.classList.contains('state')) { - params.margin = 'var(--ha-badges-card-margin, 0)'; + this.updateStyles(params); } + } + + Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_ts__WEBPACK_IMPORTED_MODULE_2__["default"])(this, 'HA-BADGES-CARD', { + hass, + states + }); - this.updateStyles(params); + if (this._container) { + this._container.updateStyles({ + width: 'var(--ha-badges-card-width, initial)', + 'text-align': 'var(--ha-badges-card-text-align, initial)' + }); } - } - Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this, 'HA-BADGES-CARD', { - hass, - states - }); + this.lastChild.style.fontSize = '85%'; // Since this variable only affects badges mode - no need to clean it up. - if (this._container) { - this._container.updateStyles({ - width: 'var(--ha-badges-card-width, initial)', - 'text-align': 'var(--ha-badges-card-text-align, initial)' - }); + this.style.setProperty('--ha-state-label-badge-margin-bottom', '0'); } - this.lastChild.style.fontSize = '85%'; // Since this variable only affects badges mode - no need to clean it up. - - this.style.setProperty('--ha-state-label-badge-margin-bottom', '0'); - } + cleanBadgeStyle() { + if (this._container) { + this._container.updateStyles({ + display: '', + width: '', + 'text-align': '' + }); + } - cleanBadgeStyle() { - if (this._container) { - this._container.updateStyles({ + this.updateStyles({ display: '', - width: '', - 'text-align': '' + margin: '' }); } - this.updateStyles({ - display: '', - margin: '' - }); - } + applyThemes(hass, modifiedObj) { + let themeTarget = this; + let themeName = 'default'; + + if (this._container) { + themeTarget = this._container; + } - applyThemes(hass, modifiedObj) { - let themeTarget = this; - let themeName = 'default'; + if (modifiedObj.attributes.theme) { + themeName = modifiedObj.attributes.theme; + } - if (this._container) { - themeTarget = this._container; + Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_ts__WEBPACK_IMPORTED_MODULE_0__["default"])(themeTarget, hass.themes || { + default_theme: 'default', + themes: {} + }, themeName); } - if (modifiedObj.attributes.theme) { - themeName = modifiedObj.attributes.theme; - } + maybeHideEntity(modifiedObj) { + if (!modifiedObj) { + if (this.lastChild) { + this.removeChild(this.lastChild); + } - Object(_home_assistant_polymer_src_common_dom_apply_themes_on_element_js__WEBPACK_IMPORTED_MODULE_0__["default"])(themeTarget, hass.themes || { - default_theme: 'default', - themes: {} - }, themeName); - } + if (this._container) { + this._container.updateStyles({ + margin: '0', + padding: '0' + }); + } - maybeHideEntity(modifiedObj) { - if (!modifiedObj) { - if (this.lastChild) { - this.removeChild(this.lastChild); + return true; } if (this._container) { this._container.updateStyles({ - margin: '0', - padding: '0' + margin: '', + padding: '' }); } - return true; + return false; } - if (this._container) { - this._container.updateStyles({ - margin: '', - padding: '' - }); + sliderEligible_(domain, obj, inDialog) { + if (inDialog) return false; + return DOMAIN_TO_SLIDER_SUPPORT[domain] && DOMAIN_TO_SLIDER_SUPPORT[domain] & obj.attributes.supported_features && obj.attributes.state_card_mode && obj.attributes.state_card_mode !== 'no-slider'; } - return false; - } - - sliderEligible_(domain, obj, inDialog) { - if (inDialog) return false; - return DOMAIN_TO_SLIDER_SUPPORT[domain] && DOMAIN_TO_SLIDER_SUPPORT[domain] & obj.attributes.supported_features && obj.attributes.state_card_mode && obj.attributes.state_card_mode !== 'no-slider'; - } - - inputChanged(hass, inDialog, stateObj) { - if (!stateObj || !hass || !this._isAttached) return; - const domain = Object(_home_assistant_polymer_src_common_entity_compute_state_domain_ts__WEBPACK_IMPORTED_MODULE_1__["default"])(stateObj); - const modifiedObj = window.customUI.maybeChangeObject(this, stateObj, inDialog, true - /* allowHidden */ - ); - if (this.maybeHideEntity(modifiedObj)) return; - this.applyThemes(hass, modifiedObj); - - if (!inDialog && modifiedObj.attributes.state_card_mode === 'badges') { - this.badgeMode(hass, modifiedObj, domain); - } else { - this.regularMode_(hass, inDialog, modifiedObj, domain); + inputChanged(hass, inDialog, stateObj) { + if (!stateObj || !hass || !this._isAttached) return; + const domain = Object(_home_assistant_polymer_src_common_entity_compute_state_domain_ts__WEBPACK_IMPORTED_MODULE_1__["default"])(stateObj); + const modifiedObj = window.customUI.maybeChangeObject(this, stateObj, inDialog, true + /* allowHidden */ + ); + if (this.maybeHideEntity(modifiedObj)) return; + this.applyThemes(hass, modifiedObj); + + if (!inDialog && modifiedObj.attributes.state_card_mode === 'badges') { + this.badgeMode(hass, modifiedObj, domain); + } else { + this.regularMode_(hass, inDialog, modifiedObj, domain); + } } - } - regularMode_(hass, inDialog, stateObj, domain) { - this.cleanBadgeStyle(); - const params = { - hass, - stateObj, - inDialog - }; - const originalStateCardType = Object(_home_assistant_polymer_src_common_entity_state_card_type_ts__WEBPACK_IMPORTED_MODULE_3__["default"])(hass, stateObj); - let customStateCardType; - const secondaryStateCardType = stateObj.attributes.state_card_custom_ui_secondary; - - if (domain === 'light' && this.sliderEligible_(domain, stateObj, inDialog)) { - Object.assign(params, { - controlElement: 'ha-entity-toggle', - serviceMin: 'turn_off', - serviceMax: 'turn_on', - valueName: 'brightness', - domain - }); - customStateCardType = 'state-card-with-slider'; - } else if (domain === 'cover' && this.sliderEligible_(domain, stateObj, inDialog)) { - Object.assign(params, { - controlElement: 'ha-cover-controls', - max: 100, - serviceMin: 'close_cover', - serviceMax: 'set_cover_position', - setValueName: 'position', - valueName: 'current_position', - nameOn: 'open', - domain - }); - customStateCardType = 'state-card-with-slider'; - } else if (domain === 'climate' && this.sliderEligible_(domain, stateObj, inDialog)) { - Object.assign(params, { - controlElement: 'ha-climate-state', - min: stateObj.attributes.min_temp || -100, - max: stateObj.attributes.max_temp || 200, - serviceMin: 'set_temperature', - serviceMax: 'set_temperature', - valueName: 'temperature', - nameOn: '', - domain - }); - customStateCardType = 'state-card-with-slider'; - } else if (TYPE_TO_CONTROL[originalStateCardType] !== undefined) { - params.controlElement = TYPE_TO_CONTROL[originalStateCardType]; - customStateCardType = 'state-card-without-slider'; - } else if (stateObj.attributes.show_last_changed && !SHOW_LAST_CHANGED_BLACKLISTED_CARDS.includes(originalStateCardType)) { - params.inDialog = true; - } + regularMode_(hass, inDialog, stateObj, domain) { + this.cleanBadgeStyle(); + const params = { + hass, + stateObj, + inDialog + }; + const originalStateCardType = Object(_home_assistant_polymer_src_common_entity_state_card_type_ts__WEBPACK_IMPORTED_MODULE_3__["default"])(hass, stateObj); + let customStateCardType; + const secondaryStateCardType = stateObj.attributes.state_card_custom_ui_secondary; + + if (domain === 'light' && this.sliderEligible_(domain, stateObj, inDialog)) { + Object.assign(params, { + controlElement: 'ha-entity-toggle', + serviceMin: 'turn_off', + serviceMax: 'turn_on', + valueName: 'brightness', + domain + }); + customStateCardType = 'state-card-with-slider'; + } else if (domain === 'cover' && this.sliderEligible_(domain, stateObj, inDialog)) { + Object.assign(params, { + controlElement: 'ha-cover-controls', + max: 100, + serviceMin: 'close_cover', + serviceMax: 'set_cover_position', + setValueName: 'position', + valueName: 'current_position', + nameOn: 'open', + domain + }); + customStateCardType = 'state-card-with-slider'; + } else if (domain === 'climate' && this.sliderEligible_(domain, stateObj, inDialog)) { + Object.assign(params, { + controlElement: 'ha-climate-state', + min: stateObj.attributes.min_temp || -100, + max: stateObj.attributes.max_temp || 200, + serviceMin: 'set_temperature', + serviceMax: 'set_temperature', + valueName: 'temperature', + nameOn: '', + domain + }); + customStateCardType = 'state-card-with-slider'; + } else if (TYPE_TO_CONTROL[originalStateCardType] !== undefined) { + params.controlElement = TYPE_TO_CONTROL[originalStateCardType]; + customStateCardType = 'state-card-without-slider'; + } else if (stateObj.attributes.show_last_changed && !SHOW_LAST_CHANGED_BLACKLISTED_CARDS.includes(originalStateCardType)) { + params.inDialog = true; + } - if (stateObj.state === 'unavailable') { - params.controlElement = ''; - } + if (stateObj.state === 'unavailable') { + params.controlElement = ''; + } + + if (stateObj.attributes.control_element !== undefined) { + params.controlElement = stateObj.attributes.control_element; + } - if (stateObj.attributes.control_element !== undefined) { - params.controlElement = stateObj.attributes.control_element; + Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_ts__WEBPACK_IMPORTED_MODULE_2__["default"])(this, (secondaryStateCardType || customStateCardType || `STATE-CARD-${originalStateCardType}`).toUpperCase(), params); } - Object(_home_assistant_polymer_src_common_dom_dynamic_content_updater_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this, (secondaryStateCardType || customStateCardType || `STATE-CARD-${originalStateCardType}`).toUpperCase(), params); } + customElements.define('state-card-custom-ui', StateCardCustomUi); } -customElements.define('state-card-custom-ui', StateCardCustomUi); +if (Polymer && Polymer.Element && customElements.get('home-assistant')) { + loadCustomUI(); +} else { + customElements.whenDefined('home-assistant').then(() => loadCustomUI()); +} /***/ }), @@ -1613,331 +4954,339 @@ __webpack_require__.r(__webpack_exports__); -/** - * @extends HTMLElement - */ -class StateCardWithSlider extends _cui_base_element_js__WEBPACK_IMPORTED_MODULE_1__["default"] { - static get template() { - return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__["html"]` - - + + .hidden { + display: none; + } + -
-
- - - - -
-