iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
24 lines • 16 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[2730],{26218:function(t,o,a){a.d(o,{a:function(){return i}});a(16280);const e=(0,a(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(o,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const i=o.connectedCallback;o.connectedCallback=function(){i.call(this);const o=this[a];o&&this.updateComplete.then(()=>{const a=this.renderRoot.querySelector(t);a&&setTimeout(()=>{a.scrollTop=o},0)})};const n=Object.getOwnPropertyDescriptor(o,a);let r;if(void 0===n)r={get(){var t;return this[`__${String(a)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){e(t),this[`__${String(a)}`]=t},configurable:!0,enumerable:!0};else{const t=n.set;r=Object.assign(Object.assign({},n),{},{set(o){e(o),this[`__${String(a)}`]=o,null==t||t.call(this,o)}})}Object.defineProperty(o,a,r)}}},77796:function(t,o,a){a.d(o,{n:function(){return e}});a(62953);const e=(t,o,a=!0,e=!0)=>{let i,n=0;const r=(...r)=>{const s=()=>{n=!1===a?0:Date.now(),i=void 0,t(...r)},l=Date.now();n||!1!==a||(n=l);const h=o-(l-n);h<=0||h>o?(i&&(clearTimeout(i),i=void 0),n=l,t(...r)):i||!1===e||(i=window.setTimeout(s,h))};return r.cancel=()=>{clearTimeout(i),i=void 0,n=0},r}},90248:function(t,o,a){a.a(t,async function(t,e){try{a.r(o),a.d(o,{HaIconButtonArrowPrev:function(){return g}});a(62953);var i=a(40445),n=a(5124),r=a(67576),s=a(63091),l=a(26300),h=t([l]);l=(h.then?(await h)():h)[0];let c,d=t=>t;const p="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",u="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class g extends n.WF{render(){var t;return(0,n.qy)(c||(c=d` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?u:p}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],g.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"href",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"target",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"rel",void 0),(0,i.Cg)([(0,r.MZ)()],g.prototype,"download",void 0),(0,i.Cg)([(0,r.wk)()],g.prototype,"_icon",void 0),g=(0,i.Cg)([(0,r.EM)("ha-icon-button-arrow-prev")],g),e()}catch(c){e(c)}})},26300:function(t,o,a){a.a(t,async function(t,e){try{a.r(o),a.d(o,{HaIconButton:function(){return f}});a(62953);var i=a(40445),n=a(5124),r=a(67576),s=a(63672),l=a(18350),h=(a(67094),t([l]));l=(h.then?(await h)():h)[0];let c,d,p,u,g=t=>t;class f extends n.WF{render(){return(0,n.qy)(c||(c=g` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,n.qy)(d||(d=g`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,n.qy)(p||(p=g`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}f.shadowRootOptions={mode:"open",delegatesFocus:!0},f.styles=(0,n.AH)(u||(u=g`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
--ha-icon-button-padding-inline,
--ha-space-2
);--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1} (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],f.prototype,"path",void 0),(0,i.Cg)([(0,r.MZ)({type:String})],f.prototype,"label",void 0),(0,i.Cg)([(0,r.MZ)({type:String,attribute:"aria-haspopup"})],f.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"hide-title",type:Boolean})],f.prototype,"hideTitle",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"selected",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"href",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"target",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"rel",void 0),(0,i.Cg)([(0,r.MZ)()],f.prototype,"download",void 0),f=(0,i.Cg)([(0,r.EM)("ha-icon-button")],f),e()}catch(c){e(c)}})},2054:function(t,o,a){a.a(t,async function(t,o){try{a(16280),a(62953);var e=a(40445),i=a(5124),n=a(67576),r=a(1087),s=a(44249),l=a(26300),h=t([l]);l=(h.then?(await h)():h)[0];let c,d,p,u=t=>t;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends i.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return i.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,i.qy)(c||(c=u` <ha-icon-button .label="${0}" .path="${0}" ="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,t?(0,i.qy)(d||(d=u`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const o=t.has("hass")?t.get("hass"):this.hass,a=t.has("narrow")?t.get("narrow"):this.narrow,e=!1===(null==o?void 0:o.kioskMode)&&(a||"always_hidden"===(null==o?void 0:o.dockedSidebar)),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&e===i||(this._show=i||this._alwaysVisible,i?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,r.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,i.AH)(p||(p=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,e.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,e.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,e.Cg)([(0,n.wk)()],f.prototype,"_hasNotifications",void 0),(0,e.Cg)([(0,n.wk)()],f.prototype,"_show",void 0),f=(0,e.Cg)([(0,n.EM)("ha-menu-button")],f),o()}catch(c){o(c)}})},67094:function(t,o,a){a.r(o),a.d(o,{HaSvgIcon:function(){return d}});var e=a(40445),i=a(5124),n=a(67576);let r,s,l,h,c=t=>t;class d extends i.WF{render(){return(0,i.JW)(r||(r=c` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,i.JW)(s||(s=c`<path class="primary-path" d="${0}"></path>`),this.path):i.s6,this.secondaryPath?(0,i.JW)(l||(l=c`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):i.s6)}}d.styles=(0,i.AH)(h||(h=c`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,e.Cg)([(0,n.MZ)()],d.prototype,"path",void 0),(0,e.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"secondaryPath",void 0),(0,e.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"viewBox",void 0),d=(0,e.Cg)([(0,n.EM)("ha-svg-icon")],d)},21030:function(t,o,a){a.d(o,{Ht:function(){return l},SB:function(){return i},gO:function(){return h},mj:function(){return r},wj:function(){return c}});a(44114),a(3362),a(62953);var e=a(90889);const i=t=>"auto"!==t.requested_mode&&t.current_mode!==t.requested_mode,n=(t,o)=>t.subscribeMessage(t=>{const a=Object.assign({},o.state||{});if(t.add)for(const o of t.add)a[o.source]=o;if(t.remove)for(const o of t.remove)delete a[o.source];o.setState(a,!0)},{type:"bluetooth/subscribe_scanner_details"}),r=(t,o)=>(0,e.N)("_bluetoothScannerDetails",()=>Promise.resolve({}),n,t,o),s=(t,o)=>t.subscribeMessage(t=>{const a=[...o.state||[]];if(t.add)for(const o of t.add){const t=a.findIndex(t=>t.address===o.address);-1===t?a.push(o):a[t]=o}if(t.change)for(const o of t.change){const t=a.findIndex(t=>t.address===o.address);-1!==t&&(a[t]=o)}if(t.remove)for(const o of t.remove){const t=a.findIndex(t=>t.address===o.address);-1!==t&&a.splice(t,1)}o.setState(a,!0)},{type:"bluetooth/subscribe_advertisements"}),l=(t,o)=>(0,e.N)("_bluetoothDeviceRows",()=>Promise.resolve([]),s,t,o),h=(t,o,a)=>{const e={type:"bluetooth/subscribe_connection_allocations"};return a&&(e.config_entry_id=a),t.subscribeMessage(t=>o(t),e)},c=(t,o,a)=>{const e={type:"bluetooth/subscribe_scanner_state"};return a&&(e.config_entry_id=a),t.subscribeMessage(t=>o(t),e)}},44249:function(t,o,a){a.d(o,{V:function(){return e}});a(62953);const e=(t,o)=>{const a=new i,e=t.subscribeMessage(t=>o(a.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{e.then(t=>null==t?void 0:t())}};class i{processMessage(t){if("removed"===t.type)for(const o of Object.keys(t.notifications))delete this.notifications[o];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},14503:function(t,o,a){a.d(o,{RF:function(){return p},dp:function(){return f},kO:function(){return g},nA:function(){return u},og:function(){return d}});var e=a(5124);let i,n,r,s,l,h,c=t=>t;const d=(0,e.AH)(i||(i=c`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),p=(0,e.AH)(n||(n=c`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease} (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),d),u=(0,e.AH)(r||(r=c`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)} all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),g=(0,e.AH)(s||(s=c`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--mdc-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
)} all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),f=(0,e.AH)(l||(l=c`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,e.AH)(h||(h=c`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]);