UNPKG

iobroker.lovelace

Version:

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

3 lines 8.86 kB
/*! For license information please see chunk.016eda14b87f2674caf1.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[9296,1527,6291,7130],{99257:(t,e,r)=>{"use strict";r(43437);var o=r(15112),n=r(9672),i=r(87156);(0,n.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 o.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 o=(0,i.vz)(t.root||t);return o.insertBefore(r,o.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 o=t.cloneNode(!0),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=o.getAttribute("viewBox")||"0 0 "+e+" "+e,s="pointer-events: none; display: block; width: 100%; height: 100%;";return r&&o.hasAttribute("mirror-in-rtl")&&(s+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),n.setAttribute("viewBox",i),n.setAttribute("preserveAspectRatio","xMidYMid meet"),n.setAttribute("focusable","false"),n.style.cssText=s,n.appendChild(o).removeAttribute("id"),n}return null}})},67810:(t,e,r)=>{"use strict";r.d(e,{o:()=>n});r(43437);var o=r(87156);const n={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,o.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"==typeof 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)}}},4268:(t,e,r)=>{"use strict";function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e){if(null==t)return{};var r,o,n=function(t,e){if(null==t)return{};var r,o,n={},i=Object.keys(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function l(t,e){return!0===t?[]:!1===t?[e.fail()]:t}r.d(e,{DD:()=>a,Yj:()=>g,IX:()=>p,hu:()=>u,O7:()=>y,Rx:()=>b,Ry:()=>v,jt:()=>T,Z_:()=>m,n_:()=>w,dt:()=>O,G0:()=>S});class c{constructor(t){const{type:e,schema:r,coercer:o=(t=>t),validator:n=(()=>[]),refiner:i=(()=>[])}=t;this.type=e,this.schema=r,this.coercer=o,this.validator=n,this.refiner=i}}class a extends TypeError{constructor(t,e){const{path:r,value:o,type:n,branch:i}=t,l=s(t,["path","value","type","branch"]);super(`Expected a value of type \`${n}\`${r.length?` for \`${r.join(".")}\``:""} but received \`${JSON.stringify(o)}\`.`),this.value=o,Object.assign(this,l),this.type=n,this.path=r,this.branch=i,this.failures=function*(){yield t,yield*e},this.stack=(new Error).stack,this.__proto__=a.prototype}}function u(t,e){const r=f(t,e);if(r[0])throw r[0]}function h(t,e){const r=e.coercer(t);return u(r,e),r}function f(t,e,r=!1){r&&(t=e.coercer(t));const o=d(t,e),[n]=o;if(n){return[new a(n,o),void 0]}return[void 0,t]}function*d(t,e,r=[],o=[]){const{type:n}=e,s={value:t,type:n,branch:o,path:r,fail:(e={})=>i({value:t,type:n,path:r,branch:[...o,t]},e),check:(t,e,n,i)=>d(t,e,void 0!==n?[...r,i]:r,void 0!==n?[...o,n]:o)},c=l(e.validator(t,s),s),[a]=c;a?(yield a,yield*c):yield*l(e.refiner(t,s),s)}function g(){return w("any",(()=>!0))}function p(t){return new c({type:`Array<${t?t.type:"unknown"}>`,schema:t,coercer:e=>t&&Array.isArray(e)?e.map((e=>h(e,t))):e,*validator(e,r){if(Array.isArray(e)){if(t)for(const[o,n]of e.entries())yield*r.check(n,t,e,o)}else yield r.fail()}})}function y(){return w("boolean",(t=>"boolean"==typeof t))}function _(){return w("never",(()=>!1))}function b(){return w("number",(t=>"number"==typeof t&&!isNaN(t)))}function v(t){const e=t?Object.keys(t):[],r=_();return new c({type:t?`Object<{${e.join(",")}}>`:"Object",schema:t||null,coercer:t?j(t):t=>t,*validator(o,n){if("object"==typeof o&&null!=o){if(t){const i=new Set(Object.keys(o));for(const r of e){i.delete(r);const e=t[r],s=o[r];yield*n.check(s,e,o,r)}for(const t of i){const e=o[t];yield*n.check(e,r,o,t)}}}else yield n.fail()}})}function T(t){return new c({type:t.type+"?",schema:t.schema,validator:(e,r)=>void 0===e||r.check(e,t)})}function m(){return w("string",(t=>"string"==typeof t))}function w(t,e){return new c({type:t,validator:e,schema:null})}function O(t){const e=Object.keys(t);return w(`Type<{${e.join(",")}}>`,(function*(r,o){if("object"==typeof r&&null!=r)for(const n of e){const e=t[n],i=r[n];yield*o.check(i,e,r,n)}else yield o.fail()}))}function S(t){return w(""+t.map((t=>t.type)).join(" | "),(function*(e,r){for(const o of t){const[...t]=r.check(e,o);if(0===t.length)return}yield r.fail()}))}function j(t){const e=Object.keys(t);return r=>{if("object"!=typeof r||null==r)return r;const o={},n=new Set(Object.keys(r));for(const i of e){n.delete(i);const e=t[i],s=r[i];o[i]=h(s,e)}for(const t of n)o[t]=r[t];return o}}}}]); //# sourceMappingURL=chunk.016eda14b87f2674caf1.js.map