iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
3 lines • 10.3 kB
JavaScript
/*! For license information please see chunk.2b4dda6f8ec9970bccf9.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[655,4074,5374,4159,9978,272,4328,7082,129,1422,4823],{99257:function(t,e,r){"use strict";r(65233);var n=r(15112),o=r(9672),i=r(87156);(0,o.k)({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new n.P({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(t){return this.name+":"+t}),this)},applyIcon:function(t,e){this.removeIcon(t);var r=this._cloneIcon(e,this.rtlMirroring&&this._targetIsRTL(t));if(r){var n=(0,i.vz)(t.root||t);return n.insertBefore(r,n.childNodes[0]),t._svgIcon=r}return null},removeIcon:function(t){t._svgIcon&&((0,i.vz)(t.root||t).removeChild(t._svgIcon),t._svgIcon=null)},_targetIsRTL:function(t){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var e=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===e.getAttribute("dir")}else t&&t.nodeType!==Node.ELEMENT_NODE&&(t=t.host),this.__targetIsRTL=t&&"rtl"===window.getComputedStyle(t).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var t=Object.create(null);return(0,i.vz)(this).querySelectorAll("[id]").forEach((function(e){t[e.id]=e})),t},_cloneIcon:function(t,e){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[t],this.size,e)},_prepareSvgClone:function(t,e,r){if(t){var n=t.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=n.getAttribute("viewBox")||"0 0 "+e+" "+e,l="pointer-events: none; display: block; width: 100%; height: 100%;";return r&&n.hasAttribute("mirror-in-rtl")&&(l+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),o.setAttribute("viewBox",i),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("focusable","false"),o.style.cssText=l,o.appendChild(n).removeAttribute("id"),o}return null}})},67810:function(t,e,r){"use strict";r.d(e,{o:function(){return i}});r(65233);var n=r(87156);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(t,e){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),e)if("document"===t)this.scrollTarget=this._doc;else if("string"==typeof t){var r=this.domHost;this.scrollTarget=r&&r.$?r.$[t]:(0,n.vz)(this.ownerDocument).querySelector("#"+t)}else this._isValidScrollTarget()&&(this._oldScrollTarget=t,this._toggleScrollListener(this._shouldHaveListener,t))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(t){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=t)},set _scrollLeft(t){this.scrollTarget===this._doc?window.scrollTo(t,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=t)},scroll:function(t,e){var r;"object"===o(t)?(r=t.left,e=t.top):r=t,r=r||0,e=e||0,this.scrollTarget===this._doc?window.scrollTo(r,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=r,this.scrollTarget.scrollTop=e)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(t,e){var r=e===this._doc?window:e;t?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),r.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(r.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(t){this._shouldHaveListener=t,this._toggleScrollListener(t,this.scrollTarget)}}},25782:function(t,e,r){"use strict";r(65233),r(65660),r(47686),r(97968);var n,o,i,l=r(9672),s=r(50856),c=r(33760);(0,l.k)({_template:(0,s.d)(n||(o=['\n <style include="paper-item-shared-styles"></style>\n <style>\n :host {\n @apply --layout-horizontal;\n @apply --layout-center;\n @apply --paper-font-subhead;\n\n @apply --paper-item;\n @apply --paper-icon-item;\n }\n\n .content-icon {\n @apply --layout-horizontal;\n @apply --layout-center;\n\n width: var(--paper-item-icon-width, 56px);\n @apply --paper-item-icon;\n }\n </style>\n\n <div id="contentIcon" class="content-icon">\n <slot name="item-icon"></slot>\n </div>\n <slot></slot>\n'],i||(i=o.slice(0)),n=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}})))),is:"paper-icon-item",behaviors:[c.U]})},89194:function(t,e,r){"use strict";r(65233),r(65660),r(1656),r(47686);var n,o,i,l=r(9672),s=r(50856);(0,l.k)({_template:(0,s.d)(n||(o=["\n <style>\n :host {\n overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */\n @apply --layout-vertical;\n @apply --layout-center-justified;\n @apply --layout-flex;\n }\n\n :host([two-line]) {\n min-height: var(--paper-item-body-two-line-min-height, 72px);\n }\n\n :host([three-line]) {\n min-height: var(--paper-item-body-three-line-min-height, 88px);\n }\n\n :host > ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n :host > ::slotted([secondary]) {\n @apply --paper-font-body1;\n\n color: var(--paper-item-body-secondary-color, var(--secondary-text-color));\n\n @apply --paper-item-body-secondary;\n }\n </style>\n\n <slot></slot>\n"],i||(i=o.slice(0)),n=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}})))),is:"paper-item-body"})},40417:function(t,e,r){"use strict";r.d(e,{l:function(){return y}});var n=r(99602),o=r(55122);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==r)return;var n,o,i=[],l=!0,s=!1;try{for(r=r.call(t);!(l=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);l=!0);}catch(c){s=!0,o=c}finally{try{l||null==r.return||r.return()}finally{if(s)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(d){return!1}}();return function(){var r,n=p(t);if(e){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d={},y=(0,o.XM)(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(s,t);var e,r,o,i=f(s);function s(){var t;return c(this,s),(t=i.apply(this,arguments)).$t=d,t}return e=s,(r=[{key:"render",value:function(t,e){return e()}},{key:"update",value:function(t,e){var r=this,o=l(e,2),i=o[0],s=o[1];if(Array.isArray(i)){if(Array.isArray(this.$t)&&this.$t.length===i.length&&i.every((function(t,e){return t===r.$t[e]})))return n.Jb}else if(this.$t===i)return n.Jb;return this.$t=Array.isArray(i)?Array.from(i):i,this.render(i,s)}}])&&a(e.prototype,r),o&&a(e,o),s}(o.Xe))}}]);
//# sourceMappingURL=chunk.2b4dda6f8ec9970bccf9.js.map