UNPKG

iobroker.lovelace

Version:

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

28 lines (24 loc) 10.4 kB
/*! For license information please see chunk.fa6926f54012929865df.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4742],{67810:(t,e,r)=>{"use strict";r.d(e,{o:()=>o});r(65233);var n=r(87156);const o={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"==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)}}},25782:(t,e,r)=>{"use strict";r(65233),r(65660),r(47686),r(97968);var n=r(9672),o=r(50856),s=r(33760);(0,n.k)({_template:o.d` <style include="paper-item-shared-styles"></style> <style> :host { @apply --layout-horizontal; @apply --layout-center; @apply --paper-font-subhead; @apply --paper-item; @apply --paper-icon-item; } .content-icon { @apply --layout-horizontal; @apply --layout-center; width: var(--paper-item-icon-width, 56px); @apply --paper-item-icon; } </style> <div id="contentIcon" class="content-icon"> <slot name="item-icon"></slot> </div> <slot></slot> `,is:"paper-icon-item",behaviors:[s.U]})},68928:(t,e,r)=>{"use strict";r.d(e,{WU:()=>Y});var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[1-9]\\d?",s="\\d\\d",i="[^\\s]+",l=/\[([^]*?)\]/gm;function a(t,e){for(var r=[],n=0,o=t.length;n<o;n++)r.push(t[n].substr(0,e));return r}var c=function(t){return function(e,r){var n=r[t].map((function(t){return t.toLowerCase()})).indexOf(e.toLowerCase());return n>-1?n:null}};function u(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=0,o=e;n<o.length;n++){var s=o[n];for(var i in s)t[i]=s[i]}return t}var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"],f=a(h,3),g={dayNamesShort:a(d,3),dayNames:d,monthNamesShort:f,monthNames:h,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},m=u({},g),p=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},v={D:function(t){return String(t.getDate())},DD:function(t){return p(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return p(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return p(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return p(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return p(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return p(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return p(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return p(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return p(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return p(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return p(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+p(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+p(Math.floor(Math.abs(e)/60),2)+":"+p(Math.abs(e)%60,2)}},S=function(t){return+t-1},T=[null,o],M=[null,i],_=["isPm",i,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],y=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var r=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?r:-r}return 0}],H=(c("monthNamesShort"),c("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"}),Y=function(t,e,r){if(void 0===e&&(e=H.default),void 0===r&&(r={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var o=[];e=(e=H[e]||e).replace(l,(function(t,e){return o.push(e),"@@@"}));var s=u(u({},m),r);return(e=e.replace(n,(function(e){return v[e](t,s)}))).replace(/@@@/g,(function(){return o.shift()}))}},78389:(t,e,r)=>{"use strict";r.d(e,{s:()=>h});var n=r(99602),o=r(55122),s=r(57724);const i=(t,e)=>{var r,n;const o=t.N;if(void 0===o)return!1;for(const t of o)null===(n=(r=t).O)||void 0===n||n.call(r,e,!1),i(t,e);return!0},l=t=>{let e,r;do{if(void 0===(e=t.M))break;r=e.N,r.delete(t),t=e}while(0===(null==r?void 0:r.size))},a=t=>{for(let e;e=t.M;t=e){let r=e.N;if(void 0===r)e.N=r=new Set;else if(r.has(t))break;r.add(t),d(e)}};function c(t){void 0!==this.N?(l(this),this.M=t,a(this)):this.M=t}function u(t,e=!1,r=0){const n=this.H,o=this.N;if(void 0!==o&&0!==o.size)if(e)if(Array.isArray(n))for(let t=r;t<n.length;t++)i(n[t],!1),l(n[t]);else null!=n&&(i(n,!1),l(n));else i(this,t)}const d=t=>{var e,r,n,s;t.type==o.pX.CHILD&&(null!==(e=(n=t).P)&&void 0!==e||(n.P=u),null!==(r=(s=t).Q)&&void 0!==r||(s.Q=c))};class h extends o.Xe{constructor(){super(...arguments),this.isConnected=!0,this.ut=n.Jb,this.N=void 0}T(t,e,r){super.T(t,e,r),a(this)}O(t,e=!0){this.at(t),e&&(i(this,t),l(this))}at(t){var e,r;t!==this.isConnected&&(t?(this.isConnected=!0,this.ut!==n.Jb&&(this.setValue(this.ut),this.ut=n.Jb),null===(e=this.reconnected)||void 0===e||e.call(this)):(this.isConnected=!1,null===(r=this.disconnected)||void 0===r||r.call(this)))}S(t,e){if(!this.isConnected)throw Error(`AsyncDirective ${this.constructor.name} was rendered while its tree was disconnected.`);return super.S(t,e)}setValue(t){if(this.isConnected)if((0,s.OR)(this.Σdt))this.Σdt.I(t,this);else{const e=[...this.Σdt.H];e[this.Σct]=t,this.Σdt.I(e,this,0)}else this.ut=t}disconnected(){}reconnected(){}}},57724:(t,e,r)=>{"use strict";r.d(e,{E_:()=>m,i9:()=>f,_Y:()=>c,pt:()=>s,OR:()=>l,hN:()=>i,ws:()=>g,fk:()=>u,hl:()=>h});var n=r(99602);const{et:o}=n.Vm,s=t=>null===t||"object"!=typeof t&&"function"!=typeof t,i=(t,e)=>{var r,n;return void 0===e?void 0!==(null===(r=t)||void 0===r?void 0:r._$litType$):(null===(n=t)||void 0===n?void 0:n._$litType$)===e},l=t=>void 0===t.strings,a=()=>document.createComment(""),c=(t,e,r)=>{var n;const s=t.A.parentNode,i=void 0===e?t.B:e.A;if(void 0===r){const e=s.insertBefore(a(),i),n=s.insertBefore(a(),i);r=new o(e,n,t,t.options)}else{const e=r.B.nextSibling,o=r.M!==t;if(o&&(null===(n=r.Q)||void 0===n||n.call(r,t),r.M=t),e!==i||o){let t=r.A;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,i),t=e}}}return r},u=(t,e,r=t)=>(t.I(e,r),t),d={},h=(t,e=d)=>t.H=e,f=t=>t.H,g=t=>{var e;null===(e=t.P)||void 0===e||e.call(t,!1,!0);let r=t.A;const n=t.B.nextSibling;for(;r!==n;){const t=r.nextSibling;r.remove(),r=t}},m=t=>{t.R()}},19967:(t,e,r)=>{"use strict";r.d(e,{Xe:()=>n.Xe,pX:()=>n.pX,XM:()=>n.XM});var n=r(55122)},82816:(t,e,r)=>{"use strict";r.d(e,{o:()=>n.o});var n=r(49629)},92483:(t,e,r)=>{"use strict";r.d(e,{V:()=>n.V});var n=r(79865)},11716:(t,e,r)=>{"use strict";r.d(e,{C:()=>a});var n=r(99602),o=r(55122),s=r(57724),i=r(78389);const l=t=>!(0,s.pt)(t)&&"function"==typeof t.then,a=(0,o.XM)(class extends i.s{constructor(){super(...arguments),this.Ct=2147483647,this.Rt=[]}render(...t){var e;return null!==(e=t.find((t=>!l(t))))&&void 0!==e?e:n.Jb}update(t,e){const r=this.Rt;let o=r.length;this.Rt=e;for(let t=0;t<e.length&&!(t>this.Ct);t++){const n=e[t];if(!l(n))return this.Ct=t,n;t<o&&n===r[t]||(this.Ct=2147483647,o=0,Promise.resolve(n).then((t=>{const e=this.Rt.indexOf(n);e>-1&&e<this.Ct&&(this.Ct=e,this.setValue(t))})))}return n.Jb}})}}]); //# sourceMappingURL=chunk.fa6926f54012929865df.js.map