UNPKG

iobroker.lovelace

Version:

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

3 lines 15.3 kB
/*! For license information please see chunk.f2b7328b430da0ead0ae.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[8850,1823,782],{18601:function(t,e,n){"use strict";n.d(e,{qN:function(){return r.q},Wg:function(){return p}});var r=n(78220);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)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==o(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 l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p=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&&c(t,e)}(f,t);var e,n,r,o=s(f);function f(){return i(this,f),o.apply(this,arguments)}return e=f,(n=[{key:"createRenderRoot",value:function(){return this.attachShadow({mode:"open",delegatesFocus:!0})}},{key:"click",value:function(){this.formElement&&(this.formElement.focus(),this.formElement.click())}},{key:"setAriaLabel",value:function(t){this.formElement&&this.formElement.setAttribute("aria-label",t)}},{key:"firstUpdated",value:function(){var t=this;u(l(f.prototype),"firstUpdated",this).call(this),this.mdcRoot.addEventListener("change",(function(e){t.dispatchEvent(new Event("change",e))}))}}])&&a(e.prototype,n),r&&a(e,r),f}(r.H)},63207:function(t,e,n){"use strict";n(65660),n(15112);var r=n(9672),o=n(87156),i=n(50856),a=n(43437);function u(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n <style>\n :host {\n @apply --layout-inline;\n @apply --layout-center-center;\n position: relative;\n\n vertical-align: middle;\n\n fill: var(--iron-icon-fill-color, currentcolor);\n stroke: var(--iron-icon-stroke-color, none);\n\n width: var(--iron-icon-width, 24px);\n height: var(--iron-icon-height, 24px);\n @apply --iron-icon;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n"]);return u=function(){return t},t}(0,r.k)({_template:(0,i.d)(u()),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:a.XY.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(t){var e=(t||"").split(":");this._iconName=e.pop(),this._iconsetName=e.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(t){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&(0,o.vz)(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,(0,o.vz)(this.root).appendChild(this._img))}})},15112:function(t,e,n){"use strict";n.d(e,{P:function(){return i}});n(43437);var r=n(9672);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),t[" "](e),this.type=e&&e.type||"default",this.key=e&&e.key,e&&"value"in e&&(this.value=e.value)}var e,n,r;return e=t,(n=[{key:"byKey",value:function(t){return this.key=t,this.value}},{key:"value",get:function(){var e=this.type,n=this.key;if(e&&n)return t.types[e]&&t.types[e][n]},set:function(e){var n=this.type,r=this.key;n&&r&&(n=t.types[n]=t.types[n]||{},null==e?delete n[r]:n[r]=e)}},{key:"list",get:function(){if(this.type){var e=t.types[this.type];return e?Object.keys(e).map((function(t){return a[this.type][t]}),this):[]}}}])&&o(e.prototype,n),r&&o(e,r),t}();i[" "]=function(){},i.types={};var a=i.types;(0,r.k)({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(t,e,n){var r=new i({type:t,key:e});return void 0!==n&&n!==r.value?r.value=n:this.value!==r.value&&(this.value=r.value),r},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(t){t&&(this.value=this)},byKey:function(t){return new i({type:this.type,key:t}).value}})},91107:function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(t,e)||s(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e,n){return(i=a()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&u(o,n.prototype),o}).apply(null,arguments)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t){return(l="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)}n.d(e,{Ud:function(){return _}});var p=Symbol("Comlink.proxy"),y=Symbol("Comlink.endpoint"),h=Symbol("Comlink.releaseProxy"),m=Symbol("Comlink.thrown"),v=function(t){return"object"===l(t)&&null!==t||"function"==typeof t},d=new Map([["proxy",{canHandle:function(t){return v(t)&&t[p]},serialize:function(t){var e=new MessageChannel,n=e.port1,r=e.port2;return b(t,n),[r,[r]]},deserialize:function(t){return t.start(),_(t)}}],["throw",{canHandle:function(t){return v(t)&&m in t},serialize:function(t){var e=t.value;return[e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[]]},deserialize:function(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:self;e.addEventListener("message",(function n(a){if(a&&a.data){var u,s=Object.assign({path:[]},a.data),f=s.id,l=s.type,p=s.path,y=(a.data.argumentList||[]).map(I);try{var h=p.slice(0,-1).reduce((function(t,e){return t[e]}),t),v=p.reduce((function(t,e){return t[e]}),t);switch(l){case 0:u=v;break;case 1:h[p.slice(-1)[0]]=I(a.data.value),u=!0;break;case 2:u=v.apply(h,y);break;case 3:var d;u=E(i(v,c(y)));break;case 4:var _=new MessageChannel,w=_.port1,S=_.port2;b(t,S),u=O(w,[w]);break;case 5:u=void 0}}catch(d){u=o({value:d},m,0)}Promise.resolve(u).catch((function(t){return o({value:t},m,0)})).then((function(t){var o=r(A(t),2),i=o[0],a=o[1];e.postMessage(Object.assign(Object.assign({},i),{id:f}),a),5===l&&(e.removeEventListener("message",n),g(e))}))}})),e.start&&e.start()}function g(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function _(t,e){return S(t,[],e)}function w(t){if(t)throw new Error("Proxy has been released and is not useable")}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=!1,i=new Proxy(n,{get:function(n,r){if(w(o),r===h)return function(){return P(t,{type:5,path:e.map((function(t){return t.toString()}))}).then((function(){g(t),o=!0}))};if("then"===r){if(0===e.length)return{then:function(){return i}};var a=P(t,{type:0,path:e.map((function(t){return t.toString()}))}).then(I);return a.then.bind(a)}return S(t,[].concat(c(e),[r]))},set:function(n,i,a){w(o);var u=r(A(a),2),s=u[0],f=u[1];return P(t,{type:1,path:[].concat(c(e),[i]).map((function(t){return t.toString()})),value:s},f).then(I)},apply:function(n,i,a){w(o);var u=e[e.length-1];if(u===y)return P(t,{type:4}).then(I);if("bind"===u)return S(t,e.slice(0,-1));var c=r(k(a),2),s=c[0],f=c[1];return P(t,{type:2,path:e.map((function(t){return t.toString()})),argumentList:s},f).then(I)},construct:function(n,i){w(o);var a=r(k(i),2),u=a[0],c=a[1];return P(t,{type:3,path:e.map((function(t){return t.toString()})),argumentList:u},c).then(I)}});return i}function k(t){var e,n=t.map(A);return[n.map((function(t){return t[0]})),(e=n.map((function(t){return t[1]})),Array.prototype.concat.apply([],e))]}var j=new WeakMap;function O(t,e){return j.set(t,e),t}function E(t){return Object.assign(t,o({},p,!0))}function A(t){var e,n=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(d);try{for(n.s();!(e=n.n()).done;){var o=r(e.value,2),i=o[0],a=o[1];if(a.canHandle(t)){var u=r(a.serialize(t),2);return[{type:3,name:i,value:u[0]},u[1]]}}}catch(c){n.e(c)}finally{n.f()}return[{type:0,value:t},j.get(t)||[]]}function I(t){switch(t.type){case 3:return d.get(t.name).deserialize(t.value);case 0:return t.value}}function P(t,e,n){return new Promise((function(r){var o=new Array(4).fill(0).map((function(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)})).join("-");t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===o&&(t.removeEventListener("message",e),r(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:o},e),n)}))}},3239:function(t,e,n){"use strict";function r(t){return(r="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 o(t){if(!t||"object"!=r(t))return t;if("[object Date]"==Object.prototype.toString.call(t))return new Date(t.getTime());if(Array.isArray(t))return t.map(o);var e={};return Object.keys(t).forEach((function(n){e[n]=o(t[n])})),e}n.d(e,{Z:function(){return o}})},58993:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}n.d(e,{yh:function(){return a},U2:function(){return c},t8:function(){return s},ZH:function(){return f}});var i,a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"keyval-store",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"keyval";r(this,t),this.storeName=n,this._dbp=new Promise((function(t,r){var o=indexedDB.open(e,1);o.onerror=function(){return r(o.error)},o.onsuccess=function(){return t(o.result)},o.onupgradeneeded=function(){o.result.createObjectStore(n)}}))}var e,n,i;return e=t,(n=[{key:"_withIDBStore",value:function(t,e){var n=this;return this._dbp.then((function(r){return new Promise((function(o,i){var a=r.transaction(n.storeName,t);a.oncomplete=function(){return o()},a.onabort=a.onerror=function(){return i(a.error)},e(a.objectStore(n.storeName))}))}))}}])&&o(e.prototype,n),i&&o(e,i),t}();function u(){return i||(i=new a),i}function c(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u();return n._withIDBStore("readonly",(function(n){e=n.get(t)})).then((function(){return e.result}))}function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u();return n._withIDBStore("readwrite",(function(n){n.put(e,t)}))}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u();return t._withIDBStore("readwrite",(function(t){t.clear()}))}}}]); //# sourceMappingURL=chunk.f2b7328b430da0ead0ae.js.map