UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

3 lines 7.47 kB
/*! For license information please see chunk.94092d6285ef150f76fb.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[808],{79332:function(n,i,t){"use strict";t.d(i,{a:function(){return e}});t(43437);var e={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(n,i){for(var t in i)n[t]=i[t]},_cloneConfig:function(n){var i={isClone:!0};return this._copyProperties(i,n),i},_getAnimationConfigRecursive:function(n,i,t){var e;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(e=n?this.animationConfig[n]:this.animationConfig,Array.isArray(e)||(e=[e]),e)for(var o,a=0;o=e[a];a++)if(o.animatable)o.animatable._getAnimationConfigRecursive(o.type||n,i,t);else if(o.id){var s=i[o.id];s?(s.isClone||(i[o.id]=this._cloneConfig(s),s=i[o.id]),this._copyProperties(s,o)):i[o.id]=o}else t.push(o)},getAnimationConfig:function(n){var i={},t=[];for(var e in this._getAnimationConfigRecursive(n,i,t),i)t.push(i[e]);return t}}},96540:function(n,i,t){"use strict";t.d(i,{t:function(){return o}});t(43437);var e={_configureAnimations:function(n){var i=[],t=[];if(n.length>0)for(var e,o=0;e=n[o];o++){var a=document.createElement(e.name);if(a.isNeonAnimation){var s;a.configure||(a.configure=function(n){return null}),s=a.configure(e),t.push({result:s,config:e,neonAnimation:a})}else console.warn(this.is+":",e.name,"not found!")}for(var r=0;r<t.length;r++){var l=t[r].result,c=t[r].config,h=t[r].neonAnimation;try{"function"!=typeof l.cancel&&(l=document.timeline.play(l))}catch(p){l=null,console.warn("Couldnt play","(",c.name,").",p)}l&&i.push({neonAnimation:h,config:c,animation:l})}return i},_shouldComplete:function(n){for(var i=!0,t=0;t<n.length;t++)if("finished"!=n[t].animation.playState){i=!1;break}return i},_complete:function(n){for(var i=0;i<n.length;i++)n[i].neonAnimation.complete(n[i].config);for(i=0;i<n.length;i++)n[i].animation.cancel()},playAnimation:function(n,i){var t=this.getAnimationConfig(n);if(t){this._active=this._active||{},this._active[n]&&(this._complete(this._active[n]),delete this._active[n]);var e=this._configureAnimations(t);if(0!=e.length){this._active[n]=e;for(var o=0;o<e.length;o++)e[o].animation.onfinish=function(){this._shouldComplete(e)&&(this._complete(e),delete this._active[n],this.fire("neon-animation-finish",i,{bubbles:!1}))}.bind(this)}else this.fire("neon-animation-finish",i,{bubbles:!1})}},cancelAnimation:function(){for(var n in this._active){var i=this._active[n];for(var t in i)i[t].animation.cancel()}this._active={}}},o=[t(79332).a,e]},51654:function(n,i,t){"use strict";t.d(i,{Z:function(){return a},n:function(){return s}});t(43437);var e=t(75009),o=t(87156),a={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(n,i){i&&(n?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(n){this.closingReason=this.closingReason||{},this.closingReason.confirmed=n},_onDialogClick:function(n){for(var i=(0,o.vz)(n).path,t=0,e=i.indexOf(this);t<e;t++){var a=i[t];if(a.hasAttribute&&(a.hasAttribute("dialog-dismiss")||a.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(a.hasAttribute("dialog-confirm")),this.close(),n.stopPropagation();break}}}},s=[e.$,a]},50808:function(n,i,t){"use strict";t(43437),t(65660),t(1656),t(47686),t(54242);var e=document.createElement("template");e.setAttribute("style","display: none;"),e.innerHTML='<dom-module id="paper-dialog-shared-styles">\n <template>\n <style>\n :host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n @apply --paper-font-body1;\n @apply --shadow-elevation-16dp;\n @apply --paper-dialog;\n }\n\n :host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n }\n\n :host > ::slotted(.no-padding) {\n padding: 0;\n }\n\n \n :host > ::slotted(*:first-child) {\n margin-top: 24px;\n }\n\n :host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n }\n\n /* In 1.x, this selector was `:host > ::content h2`. In 2.x <slot> allows\n to select direct children only, which increases the weight of this\n selector, so we have to re-define first-child/last-child margins below. */\n :host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n @apply --paper-font-title;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-top. */\n :host > ::slotted(h2:first-child) {\n margin-top: 24px;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-bottom. */\n :host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n @apply --paper-dialog-title;\n }\n\n :host > ::slotted(.paper-dialog-buttons),\n :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n @apply --layout-horizontal;\n @apply --layout-end-justified;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(e.content);var o=t(96540),a=t(51654),s=t(9672),r=t(50856);function l(){var n=function(n,i){i||(i=n.slice(0));return Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(i)}}))}(['\n <style include="paper-dialog-shared-styles"></style>\n <slot></slot>\n']);return l=function(){return n},n}(0,s.k)({_template:(0,r.d)(l()),is:"paper-dialog",behaviors:[a.n,o.t],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})}}]); //# sourceMappingURL=chunk.94092d6285ef150f76fb.js.map