iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
10 lines • 51.6 kB
JavaScript
export const __webpack_ids__=["10770"];export const __webpack_modules__={31146:function(e,t,o){o.d(t,{i:()=>a});const i=(0,o(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),a=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){i(e),this[`__${String(t.key)}`]=e},get(){return this[`__${String(t.key)}`]||history.state?.scrollPosition},enumerable:!0,configurable:!0},finisher(o){const i=o.prototype.connectedCallback;o.prototype.connectedCallback=function(){i.call(this);const o=this[t.key];o&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=o}),0)}))}}})},49976:function(e,t,o){o.d(t,{U:()=>i});const i=e=>e.stopPropagation()},93826:function(e,t,o){o.d(t,{P:()=>i});const i=(e,t,o=!0,i=!0)=>{let a,n=0;const r=(...r)=>{const s=()=>{n=!1===o?0:Date.now(),a=void 0,e(...r)},d=Date.now();n||!1!==o||(n=d);const l=t-(d-n);l<=0||l>t?(a&&(clearTimeout(a),a=void 0),n=d,e(...r)):a||!1===i||(a=window.setTimeout(s,l))};return r.cancel=()=>{clearTimeout(a),a=void 0,n=0},r}},28310:function(e,t,o){var i=o(44249),a=o(57243),n=o(15093),r=o(10916);(0,i.Z)([(0,n.Mo)("ha-bar")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"min",value:()=>0},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"max",value:()=>100},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"value",value:void 0},{kind:"method",key:"render",value:function(){const e=(0,r.IU)((0,r.Ff)((0,r.Fv)(this.value,this.min,this.max),this.min,this.max));return a.YP` <svg> <g> <rect/> <rect width="${e}%"/> </g> </svg> `}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`rect{height:100%}rect:first-child{width:100%;fill:var(--ha-bar-background-color,var(--secondary-background-color))}rect:last-child{fill:var(--ha-bar-primary-color,var(--primary-color))}svg{border-radius:var(--ha-bar-border-radius,4px);height:12px;width:100%}`}]}}),a.oi)},59826:function(e,t,o){var i=o(44249),a=o(31622),n=o(57243),r=o(15093),s=o(22344);(0,i.Z)([(0,r.Mo)("ha-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[s.W,n.iv`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}:host([destructive]){--mdc-theme-primary:var(--error-color)}`]}]}}),a.Button)},54977:function(e,t,o){var i=o(44249),a=o(57243),n=o(15093);(0,i.Z)([(0,n.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"raised",value:()=>!1},{kind:"field",static:!0,key:"styles",value:()=>a.iv`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,12px);border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`},{kind:"method",key:"render",value:function(){return a.dy` ${this.header?a.dy`<h1 class="card-header">${this.header}</h1>`:a.Ld} <slot></slot> `}}]}}),a.oi)},68325:function(e,t,o){var i=o(44249),a=o(72621),n=(o(92745),o(9359),o(70104),o(57243)),r=o(15093),s=o(27486),d=o(36522),l=o(49976);o(65981);const c={key:"Mod-s",run:e=>((0,d.B)(e.dom,"editor-save"),!0)},h=e=>{const t=document.createElement("ha-icon");return t.icon=e.label,t};(0,i.Z)([(0,r.Mo)("ha-code-editor")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:"codemirror",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"mode",value:()=>"yaml"},{kind:"field",key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"autofocus",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({attribute:"read-only",type:Boolean})],key:"readOnly",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"linewrap",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"autocomplete-entities"})],key:"autocompleteEntities",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"autocomplete-icons"})],key:"autocompleteIcons",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"error",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_value",value:()=>""},{kind:"field",key:"_loadedCodeMirror",value:void 0},{kind:"field",key:"_iconList",value:void 0},{kind:"set",key:"value",value:function(e){this._value=e}},{kind:"get",key:"value",value:function(){return this.codemirror?this.codemirror.state.doc.toString():this._value}},{kind:"get",key:"hasComments",value:function(){if(!this.codemirror||!this._loadedCodeMirror)return!1;const e=this._loadedCodeMirror.highlightingFor(this.codemirror.state,[this._loadedCodeMirror.tags.comment]);return!!this.renderRoot.querySelector(`span.${e}`)}},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(i,"connectedCallback",this,3)([]),this.hasUpdated&&this.requestUpdate(),this.addEventListener("keydown",l.U),this.codemirror&&!1!==this.autofocus&&this.codemirror.focus()}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(i,"disconnectedCallback",this,3)([]),this.removeEventListener("keydown",l.U),this.updateComplete.then((()=>{this.codemirror.destroy(),delete this.codemirror}))}},{kind:"method",key:"scheduleUpdate",value:async function(){this._loadedCodeMirror??=await Promise.all([o.e("83895"),o.e("93505"),o.e("51403"),o.e("84729")]).then(o.bind(o,2765)),(0,a.Z)(i,"scheduleUpdate",this,3)([])}},{kind:"method",key:"update",value:function(e){if((0,a.Z)(i,"update",this,3)([e]),!this.codemirror)return void this._createCodeMirror();const t=[];e.has("mode")&&t.push({effects:[this._loadedCodeMirror.langCompartment.reconfigure(this._mode),this._loadedCodeMirror.foldingCompartment.reconfigure(this._getFoldingExtensions())]}),e.has("readOnly")&&t.push({effects:this._loadedCodeMirror.readonlyCompartment.reconfigure(this._loadedCodeMirror.EditorView.editable.of(!this.readOnly))}),e.has("linewrap")&&t.push({effects:this._loadedCodeMirror.linewrapCompartment.reconfigure(this.linewrap?this._loadedCodeMirror.EditorView.lineWrapping:[])}),e.has("_value")&&this._value!==this.value&&t.push({changes:{from:0,to:this.codemirror.state.doc.length,insert:this._value}}),t.length>0&&this.codemirror.dispatch(...t),e.has("error")&&this.classList.toggle("error-state",this.error)}},{kind:"get",key:"_mode",value:function(){return this._loadedCodeMirror.langs[this.mode]}},{kind:"method",key:"_createCodeMirror",value:function(){if(!this._loadedCodeMirror)throw new Error("Cannot create editor before CodeMirror is loaded");const e=[this._loadedCodeMirror.lineNumbers(),this._loadedCodeMirror.history(),this._loadedCodeMirror.drawSelection(),this._loadedCodeMirror.EditorState.allowMultipleSelections.of(!0),this._loadedCodeMirror.rectangularSelection(),this._loadedCodeMirror.crosshairCursor(),this._loadedCodeMirror.highlightSelectionMatches(),this._loadedCodeMirror.highlightActiveLine(),this._loadedCodeMirror.indentationMarkers({thickness:0,activeThickness:1,colors:{activeLight:"var(--secondary-text-color)",activeDark:"var(--secondary-text-color)"}}),this._loadedCodeMirror.keymap.of([...this._loadedCodeMirror.defaultKeymap,...this._loadedCodeMirror.searchKeymap,...this._loadedCodeMirror.historyKeymap,...this._loadedCodeMirror.tabKeyBindings,c]),this._loadedCodeMirror.langCompartment.of(this._mode),this._loadedCodeMirror.haTheme,this._loadedCodeMirror.haSyntaxHighlighting,this._loadedCodeMirror.readonlyCompartment.of(this._loadedCodeMirror.EditorView.editable.of(!this.readOnly)),this._loadedCodeMirror.linewrapCompartment.of(this.linewrap?this._loadedCodeMirror.EditorView.lineWrapping:[]),this._loadedCodeMirror.EditorView.updateListener.of(this._onUpdate),this._loadedCodeMirror.foldingCompartment.of(this._getFoldingExtensions())];if(!this.readOnly){const t=[];this.autocompleteEntities&&this.hass&&t.push(this._entityCompletions.bind(this)),this.autocompleteIcons&&t.push(this._mdiCompletions.bind(this)),t.length>0&&e.push(this._loadedCodeMirror.autocompletion({override:t,maxRenderedOptions:10}))}this.codemirror=new this._loadedCodeMirror.EditorView({state:this._loadedCodeMirror.EditorState.create({doc:this._value,extensions:e}),parent:this.renderRoot})}},{kind:"field",key:"_getStates",value:()=>(0,s.Z)((e=>{if(!e)return[];return Object.keys(e).map((t=>({type:"variable",label:t,detail:e[t].attributes.friendly_name,info:`State: ${e[t].state}`})))}))},{kind:"method",key:"_entityCompletions",value:function(e){const t=e.matchBefore(/[a-z_]{3,}\.\w*/);if(!t||t.from===t.to&&!e.explicit)return null;const o=this._getStates(this.hass.states);return o&&o.length?{from:Number(t.from),options:o,validFor:/^[a-z_]{3,}\.\w*$/}:null}},{kind:"field",key:"_getIconItems",value(){return async()=>{if(!this._iconList){let e;e=(await o.e("25016").then(o.t.bind(o,58134,19))).default,this._iconList=e.map((e=>({type:"variable",label:`mdi:${e.name}`,detail:e.keywords.join(", "),info:h})))}return this._iconList}}},{kind:"method",key:"_mdiCompletions",value:async function(e){const t=e.matchBefore(/mdi:\S*/);if(!t||t.from===t.to&&!e.explicit)return null;const o=await this._getIconItems();return{from:Number(t.from),options:o,validFor:/^mdi:\S*$/}}},{kind:"field",key:"_onUpdate",value(){return e=>{e.docChanged&&(this._value=e.state.doc.toString(),(0,d.B)(this,"value-changed",{value:this._value}))}}},{kind:"field",key:"_getFoldingExtensions",value(){return()=>"yaml"===this.mode?[this._loadedCodeMirror.foldGutter(),this._loadedCodeMirror.foldingOnIndent]:[]}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host(.error-state) .cm-gutters{border-color:var(--error-state-color,red)}`}]}}),n.fl)},55486:function(e,t,o){var i=o(44249),a=o(4918),n=o(6394),r=o(57243),s=o(15093),d=o(35359),l=o(36522);(0,i.Z)([(0,s.Mo)("ha-formfield")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"method",key:"render",value:function(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return r.dy` <div class="mdc-form-field ${(0,d.$)(e)}"> <slot></slot> <label class="mdc-label" @click="${this._labelClick}"> <slot name="label">${this.label}</slot> </label> </div>`}},{kind:"method",key:"_labelClick",value:function(){const e=this.input;if(e&&(e.focus(),!e.disabled))switch(e.tagName){case"HA-CHECKBOX":e.checked=!e.checked,(0,l.B)(e,"change");break;case"HA-RADIO":e.checked=!0,(0,l.B)(e,"change");break;default:e.click()}}},{kind:"field",static:!0,key:"styles",value:()=>[n.W,r.iv`:host(:not([alignEnd])) ::slotted(ha-switch){margin-right:10px;margin-inline-end:10px;margin-inline-start:inline}.mdc-form-field{align-items:var(--ha-formfield-align-items,center);gap:4px}.mdc-form-field>label{direction:var(--direction);margin-inline-start:0;margin-inline-end:auto;padding:0}:host([disabled]) label{color:var(--disabled-text-color)}`]}]}}),a.a)},54202:function(e,t,o){o.r(t),o.d(t,{HaIconButtonArrowPrev:()=>s});var i=o(44249),a=o(57243),n=o(15093),r=o(5111);o(23334);let s=(0,i.Z)([(0,n.Mo)("ha-icon-button-arrow-prev")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_icon",value:()=>"rtl"===r.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"},{kind:"method",key:"render",value:function(){return a.dy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}"></ha-icon-button> `}}]}}),a.oi)},23334:function(e,t,o){o.r(t),o.d(t,{HaIconButton:()=>s});var i=o(44249),a=(o(74269),o(57243)),n=o(15093),r=o(20552);o(37583);let s=(0,i.Z)([(0,n.Mo)("ha-icon-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:"hide-title",type:Boolean})],key:"hideTitle",value:()=>!1},{kind:"field",decorators:[(0,n.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){this._button?.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value:()=>({mode:"open",delegatesFocus:!0})},{kind:"method",key:"render",value:function(){return a.dy` <mwc-icon-button aria-label="${(0,r.o)(this.label)}" title="${(0,r.o)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,r.o)(this.ariaHasPopup)}" .disabled="${this.disabled}"> ${this.path?a.dy`<ha-svg-icon .path="${this.path}"></ha-svg-icon>`:a.dy`<slot></slot>`} </mwc-icon-button> `}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`:host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}`}]}}),a.oi)},65981:function(e,t,o){o.r(t),o.d(t,{HaIcon:()=>_});var i=o(44249),a=o(72621),n=o(57243),r=o(15093),s=o(36522),d=o(22381),l=o(80654),c=(o(92745),o(9359),o(31526),o(27608)),h=o(27486),f=o(37394);const u=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}'),p=(0,h.Z)((async()=>{const e=(0,c.MT)("hass-icon-db","mdi-icon-store");{const t=await(0,c.U2)("_version",e);t?t!==u.version&&(await(0,c.ZH)(e),(0,c.t8)("_version",u.version,e)):(0,c.t8)("_version",u.version,e)}return e})),b=["mdi","hass","hassio","hademo"];let v=[];o(37583);const m={},y={},g=(0,d.D)((()=>(async e=>{const t=Object.keys(e),o=await Promise.all(Object.values(e));(await p())("readwrite",(i=>{o.forEach(((o,a)=>{Object.entries(o).forEach((([e,t])=>{i.put(t,e)})),delete e[t[a]]}))}))})(y)),2e3),k={};let _=(0,i.Z)([(0,r.Mo)("ha-icon")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)()],key:"icon",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_path",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_secondaryPath",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_viewBox",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_legacy",value:()=>!1},{kind:"method",key:"willUpdate",value:function(e){(0,a.Z)(i,"willUpdate",this,3)([e]),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}},{kind:"method",key:"render",value:function(){return this.icon?this._legacy?n.dy` <iron-icon .icon="${this.icon}"></iron-icon>`:n.dy`<ha-svg-icon .path="${this._path}" .secondaryPath="${this._secondaryPath}" .viewBox="${this._viewBox}"></ha-svg-icon>`:n.Ld}},{kind:"method",key:"_loadIcon",value:async function(){if(!this.icon)return;const e=this.icon,[t,i]=this.icon.split(":",2);let a,n=i;if(!t||!n)return;if(!b.includes(t)){const o=l.g[t];return o?void(o&&"function"==typeof o.getIcon&&this._setCustomPath(o.getIcon(n),e)):void(this._legacy=!0)}if(this._legacy=!1,n in m){const e=m[n];let o;e.newName?(o=`Icon ${t}:${n} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,n=e.newName):o=`Icon ${t}:${n} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(o),(0,s.B)(this,"write_log",{level:"warning",message:o})}if(n in k)return void(this._path=k[n]);if("home-assistant"===n){const t=(await o.e("48348").then(o.bind(o,30511))).mdiHomeAssistant;return this.icon===e&&(this._path=t),void(k[n]=t)}try{a=await(e=>new Promise(((t,o)=>{if(v.push([e,t,o]),v.length>1)return;const i=p();(0,f.n)(1e3,(async()=>{(await i)("readonly",(e=>{for(const[t,o,i]of v)(0,c.RV)(e.get(t)).then((e=>o(e))).catch((e=>i(e)));v=[]}))})()).catch((e=>{for(const[,,t]of v)t(e);v=[]}))})))(n)}catch(e){a=void 0}if(a)return this.icon===e&&(this._path=a),void(k[n]=a);const r=(e=>{let t;for(const o of u.parts){if(void 0!==o.start&&e<o.start)break;t=o}return t.file})(n);if(r in y)return void this._setPath(y[r],n,e);const d=fetch(`/static/mdi/${r}.json`).then((e=>e.json()));y[r]=d,this._setPath(d,n,e),g()}},{kind:"method",key:"_setCustomPath",value:async function(e,t){const o=await e;this.icon===t&&(this._path=o.path,this._secondaryPath=o.secondaryPath,this._viewBox=o.viewBox)}},{kind:"method",key:"_setPath",value:async function(e,t,o){const i=await e;this.icon===o&&(this._path=i[t]),k[t]=i[t]}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{fill:currentcolor}`}]}}),n.oi)},43344:function(e,t,o){var i=o(44249),a=o(72621),n=o(57243),r=o(15093),s=o(36522),d=o(83716);o(23334);(0,i.Z)([(0,r.Mo)("ha-menu-button")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"hassio",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_hasNotifications",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_show",value:()=>!1},{kind:"field",key:"_alwaysVisible",value:()=>!1},{kind:"field",key:"_attachNotifOnConnect",value:()=>!1},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(o,"connectedCallback",this,3)([]),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(o,"disconnectedCallback",this,3)([]),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return n.Ld;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return n.dy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z"}" @click="${this._toggleMenu}"></ha-icon-button> ${e?n.dy`<div class="dot"></div>`:""} `}},{kind:"method",key:"firstUpdated",value:function(e){(0,a.Z)(o,"firstUpdated",this,3)([e]),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(e){if((0,a.Z)(o,"willUpdate",this,3)([e]),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,i=(e.has("narrow")?e.get("narrow"):this.narrow)||"always_hidden"===t?.dockedSidebar,n=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&i===n||(this._show=n||this._alwaysVisible,n?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}},{kind:"method",key:"_subscribeNotifications",value:function(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,d.r)(this.hass.connection,(e=>{this._hasNotifications=e.length>0}))}},{kind:"method",key:"_toggleMenu",value:function(){(0,s.B)(this,"hass-toggle-menu")}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`: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:50%;border:2px solid var(--app-header-background-color)}`}]}}),n.oi)},89370:function(e,t,o){var i=o(44249),a=o(57243),n=o(15093),r=o(35359),s=o(10916);o(28310),o(30509);(0,i.Z)([(0,n.Mo)("ha-metric")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"value",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"heading",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"tooltip",value:void 0},{kind:"method",key:"render",value:function(){const e=(0,s.IU)(this.value);return a.dy` <ha-settings-row> <span slot="heading"> ${this.heading} </span> <div slot="description" .title="${this.tooltip??""}"> <span class="value"> <div>${e} %</div> </span> <ha-bar class="${(0,r.$)({"target-warning":e>50,"target-critical":e>85})}" .value="${this.value}"></ha-bar> </div> </ha-settings-row> `}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`ha-settings-row{padding:0;height:54px;width:100%}ha-settings-row>div[slot=description]{white-space:normal;color:var(--secondary-text-color);display:flex;justify-content:space-between}ha-bar{--ha-bar-primary-color:var(--metric-bar-ok-color, var(--success-color))}.target-warning{--ha-bar-primary-color:var(
--metric-bar-warning-color,
var(--warning-color)
)}.target-critical{--ha-bar-primary-color:var(
--metric-bar-critical-color,
var(--error-color)
)}.value{width:48px;padding-right:4px;padding-inline-end:4px;padding-inline-start:initial;flex-shrink:0}.value>div{direction:ltr;text-align:var(--float-start)}`}]}}),a.oi)},30509:function(e,t,o){var i=o(44249),a=o(57243),n=o(15093);(0,i.Z)([(0,n.Mo)("ha-settings-row")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"slim",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"three-line"})],key:"threeLine",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"wrap-heading",reflect:!0})],key:"wrapHeading",value:()=>!1},{kind:"method",key:"render",value:function(){return a.dy` <div class="prefix-wrap"> <slot name="prefix"></slot> <div class="body" ?two-line="${!this.threeLine}" ?three-line="${this.threeLine}"> <slot name="heading"></slot> <div class="secondary"><slot name="description"></slot></div> </div> </div> <div class="content"><slot></slot></div> `}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`:host{display:flex;padding:0 16px;align-content:normal;align-self:auto;align-items:center}.body{padding-top:8px;padding-bottom:8px;padding-left:0;padding-inline-start:0;padding-right:16px;padding-inline-end:16px;overflow:hidden;display:var(--layout-vertical_-_display,flex);flex-direction:var(--layout-vertical_-_flex-direction,column);justify-content:var(--layout-center-justified_-_justify-content,center);flex:var(--layout-flex_-_flex,1);flex-basis:var(--layout-flex_-_flex-basis,0.000000001px)}.body[three-line]{min-height:var(--paper-item-body-three-line-min-height,88px)}:host(:not([wrap-heading])) body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body>.secondary{display:block;padding-top:4px;font-family:var(
--mdc-typography-body2-font-family,
var(--mdc-typography-font-family, Roboto, sans-serif)
);-webkit-font-smoothing:antialiased;font-size:var(--mdc-typography-body2-font-size, .875rem);font-weight:var(--mdc-typography-body2-font-weight,400);line-height:normal;color:var(--secondary-text-color)}.body[two-line]{min-height:calc(var(--paper-item-body-two-line-min-height,72px) - 16px);flex:1}.content{display:contents}:host(:not([narrow])) .content{display:var(--settings-row-content-display,flex);justify-content:flex-end;flex:1;padding:16px 0}.content ::slotted(*){width:var(--settings-row-content-width)}:host([narrow]){align-items:normal;flex-direction:column;border-top:1px solid var(--divider-color);padding-bottom:8px}::slotted(ha-switch){padding:16px 0}.secondary{white-space:normal}.prefix-wrap{display:var(--settings-row-prefix-display)}:host([narrow]) .prefix-wrap{display:flex;align-items:center}:host([slim]),:host([slim]) .content,:host([slim]) ::slotted(ha-switch){padding:0}:host([slim]) .body{min-height:0}`}]}}),a.oi)},37583:function(e,t,o){o.r(t),o.d(t,{HaSvgIcon:()=>r});var i=o(44249),a=o(57243),n=o(15093);let r=(0,i.Z)([(0,n.Mo)("ha-svg-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return a.YP` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?a.YP`<path class="primary-path" d="${this.path}"></path>`:a.Ld} ${this.secondaryPath?a.YP`<path class="secondary-path" d="${this.secondaryPath}"></path>`:a.Ld} </g> </svg>`}},{kind:"field",static:!0,key:"styles",value:()=>a.iv`: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)}`}]}}),a.oi)},1888:function(e,t,o){var i=o(44249),a=o(72621),n=o(62523),r=o(83835),s=o(57243),d=o(15093),l=o(13560);(0,i.Z)([(0,d.Mo)("ha-switch")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"haptic",value:()=>!1},{kind:"method",key:"firstUpdated",value:function(){(0,a.Z)(o,"firstUpdated",this,3)([]),this.addEventListener("change",(()=>{this.haptic&&(0,l.j)("light")}))}},{kind:"field",static:!0,key:"styles",value:()=>[r.W,s.iv`:host{--mdc-theme-secondary:var(--switch-checked-color)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:var(--switch-checked-button-color);border-color:var(--switch-checked-button-color)}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:var(--switch-checked-track-color);border-color:var(--switch-checked-track-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:var(--switch-unchecked-button-color);border-color:var(--switch-unchecked-button-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:var(--switch-unchecked-track-color);border-color:var(--switch-unchecked-track-color)}`]}]}}),n.H)},78586:function(e,t,o){o.d(t,{JG:()=>d,PT:()=>s,ho:()=>n});o(92745);var i=o(62212);const a=(e,t)=>e.subscribeMessage((e=>{const o={...t.state||{}};if(e.add)for(const t of e.add)o[t.source]=t;if(e.remove)for(const t of e.remove)delete o[t.source];t.setState(o,!0)}),{type:"bluetooth/subscribe_scanner_details"}),n=(e,t)=>(0,i.B)("_bluetoothScannerDetails",(()=>Promise.resolve({})),a,e,t),r=(e,t)=>e.subscribeMessage((e=>{const o=[...t.state||[]];if(e.add)for(const t of e.add){const e=o.findIndex((e=>e.address===t.address));-1===e?o.push(t):o[e]=t}if(e.change)for(const t of e.change){const e=o.findIndex((e=>e.address===t.address));-1!==e&&(o[e]=t)}if(e.remove)for(const t of e.remove){const e=o.findIndex((e=>e.address===t.address));-1!==e&&o.splice(e,1)}t.setState(o,!0)}),{type:"bluetooth/subscribe_advertisements"}),s=(e,t)=>(0,i.B)("_bluetoothDeviceRows",(()=>Promise.resolve([])),r,e,t),d=(e,t,o)=>{const i={type:"bluetooth/subscribe_connection_allocations"};return o&&(i.config_entry_id=o),e.subscribeMessage((e=>t(e)),i)}},75101:function(e,t,o){o.d(t,{$H:()=>i,DJ:()=>s,LZ:()=>n,Nn:()=>f,Ny:()=>u,Pk:()=>b,Q4:()=>r,RQ:()=>l,SO:()=>c,T0:()=>p,aR:()=>a,iJ:()=>h,pB:()=>d});o(9359),o(56475),o(1331);const i=(e,t)=>e.callWS({type:"config_entries/subentries/list",entry_id:t}),a=(e,t,o)=>e.callWS({type:"config_entries/subentries/delete",entry_id:t,subentry_id:o}),n=["migration_error","setup_error","setup_retry"],r=["not_loaded","loaded","setup_error","setup_retry"],s=(e,t,o)=>{const i={type:"config_entries/subscribe"};return o&&o.type&&(i.type_filter=o.type),e.connection.subscribeMessage((e=>t(e)),i)},d=(e,t)=>{const o={};return t&&(t.type&&(o.type_filter=t.type),t.domain&&(o.domain=t.domain)),e.callWS({type:"config_entries/get",...o})},l=(e,t)=>e.callWS({type:"config_entries/get_single",entry_id:t}),c=(e,t,o)=>e.callWS({type:"config_entries/update",entry_id:t,...o}),h=(e,t)=>e.callApi("DELETE",`config/config_entries/entry/${t}`),f=(e,t)=>e.callApi("POST",`config/config_entries/entry/${t}/reload`),u=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:"user"}),p=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:null}),b=(e,t)=>{if(!t)return e;const o=e.find((e=>e.entry_id===t));if(!o)return e;return[o,...e.filter((e=>e.entry_id!==t))]}},80654:function(e,t,o){o.d(t,{g:()=>r});const i=window;"customIconsets"in i||(i.customIconsets={});const a=i.customIconsets,n=window;"customIcons"in n||(n.customIcons={});const r=new Proxy(n.customIcons,{get:(e,t)=>e[t]??(a[t]?{getIcon:a[t]}:void 0)})},45594:function(e,t,o){o.d(t,{Fv:()=>r,e1:()=>n,eH:()=>i,lJ:()=>a});const i=(e,t)=>e.callApi("POST","config/config_entries/options/flow",{handler:t,show_advanced_options:Boolean(e.userData?.showAdvanced)}),a=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),n=(e,t,o)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,o),r=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`)},83716:function(e,t,o){o.d(t,{r:()=>i});const i=(e,t)=>{const o=new a,i=e.subscribeMessage((e=>t(o.processMessage(e))),{type:"persistent_notification/subscribe"});return()=>{i.then((e=>e?.()))}};class a{constructor(){this.notifications=void 0,this.notifications={}}processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications={...this.notifications,...e.notifications};return Object.values(this.notifications)}}},7956:function(e,t,o){o.d(t,{w:()=>n});var i=o(36522);const a=()=>Promise.all([o.e("46379"),o.e("66031"),o.e("72206"),o.e("97983"),o.e("24199"),o.e("27506"),o.e("83895"),o.e("58640"),o.e("2981"),o.e("1562"),o.e("84503"),o.e("27090"),o.e("19882")]).then(o.bind(o,12656)),n=(e,t,o)=>{(0,i.B)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:a,dialogParams:{...t,flowConfig:o,dialogParentElement:e}})}},91854:function(e,t,o){o.d(t,{c:()=>s});var i=o(57243),a=o(57816),n=o(45594),r=o(7956);const s=(e,t,o)=>(0,r.w)(e,{startFlowHandler:t.entry_id,domain:t.domain,...o},{flowType:"options_flow",showDevices:!1,createFlow:async(e,o)=>{const[i]=await Promise.all([(0,n.eH)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return i},fetchFlow:async(e,o)=>{const[i]=await Promise.all([(0,n.lJ)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return i},handleFlowStep:n.e1,deleteFlow:n.Fv,renderAbortDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.abort.${o.reason}`,o.description_placeholders);return a?i.dy` <ha-markdown breaks allow-svg .content="${a}"></ha-markdown> `:o.reason},renderShowFormStepHeader:(e,o)=>e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.title`,o.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header"),renderShowFormStepDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return a?i.dy` <ha-markdown allow-svg breaks .content="${a}"></ha-markdown> `:""},renderShowFormStepFieldLabel(e,o,i,a){if("expandable"===i.type)return e.localize(`component.${t.domain}.options.step.${o.step_id}.sections.${i.name}.name`);const n=a?.path?.[0]?`sections.${a.path[0]}.`:"";return e.localize(`component.${t.domain}.options.step.${o.step_id}.${n}data.${i.name}`)||i.name},renderShowFormStepFieldHelper(e,o,a,n){if("expandable"===a.type)return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.sections.${a.name}.description`);const r=n?.path?.[0]?`sections.${n.path[0]}.`:"",s=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.${r}data_description.${a.name}`,o.description_placeholders);return s?i.dy`<ha-markdown breaks .content="${s}"></ha-markdown>`:""},renderShowFormStepFieldError:(e,o,i)=>e.localize(`component.${o.translation_domain||t.domain}.options.error.${i}`,o.description_placeholders)||i,renderShowFormStepFieldLocalizeValue:(e,o,i)=>e.localize(`component.${t.domain}.selector.${i}`),renderShowFormStepSubmitButton:(e,o)=>e.localize(`component.${t.domain}.options.step.${o.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===o.last_step?"next":"submit")),renderExternalStepHeader:(e,t)=>"",renderExternalStepDescription:(e,t)=>"",renderCreateEntryDescription:(e,t)=>i.dy` <p>${e.localize("ui.dialogs.options_flow.success.description")}</p> `,renderShowFormProgressHeader:(e,o)=>e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderShowFormProgressDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.progress.${o.progress_action}`,o.description_placeholders);return a?i.dy` <ha-markdown allow-svg breaks .content="${a}"></ha-markdown> `:""},renderMenuHeader:(e,o)=>e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`),renderMenuDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return a?i.dy` <ha-markdown allow-svg breaks .content="${a}"></ha-markdown> `:""},renderMenuOption:(e,o,i)=>e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.menu_options.${i}`,o.description_placeholders),renderLoadingDescription:(e,o)=>e.localize(`component.${t.domain}.options.loading`)||("loading_flow"===o||"loading_step"===o?e.localize(`ui.dialogs.options_flow.loading.${o}`,{integration:(0,a.Lh)(e.localize,t.domain)}):"")})},87979:function(e,t,o){var i=o(44249),a=o(57243),n=o(15093),r=o(31146),s=(o(54202),o(43344),o(28008));(0,i.Z)([(0,n.Mo)("hass-subpage")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"supervisor",value:()=>!1},{kind:"field",decorators:[(0,r.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){return a.dy` <div class="toolbar"> ${this.mainPage||history.state?.root?a.dy` <ha-menu-button .hassio="${this.supervisor}" .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `:this.backPath?a.dy` <a href="${this.backPath}"> <ha-icon-button-arrow-prev .hass="${this.hass}"></ha-icon-button-arrow-prev> </a> `:a.dy` <ha-icon-button-arrow-prev .hass="${this.hass}" @click="${this._backTapped}"></ha-icon-button-arrow-prev> `} <div class="main-title"><slot name="header">${this.header}</slot></div> <slot name="toolbar-icon"></slot> </div> <div class="content ha-scrollbar" @scroll="${this._saveScrollPos}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `}},{kind:"method",decorators:[(0,n.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[s.$c,a.iv`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin:var(--margin-title);line-height:20px;min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;padding-bottom:1px}.content{position:relative;width:100%;height:calc(100% - 1px - var(--header-height));overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}#fab{position:absolute;right:calc(16px + env(safe-area-inset-right));inset-inline-end:calc(16px + env(safe-area-inset-right));inset-inline-start:initial;bottom:calc(16px + env(safe-area-inset-bottom));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}:host([narrow]) #fab.tabs{bottom:calc(84px + env(safe-area-inset-bottom))}#fab[is-wide]{bottom:24px;right:24px;inset-inline-end:24px;inset-inline-start:initial}`]}}]}}),a.oi)},51367:function(e,t,o){o.r(t),o.d(t,{BluetoothConfigDashboard:()=>f});var i=o(44249),a=o(72621),n=(o(9359),o(1331),o(75656),o(50100),o(18084),o(57243)),r=o(15093),s=(o(54977),o(68325),o(55486),o(1888),o(59826),o(75101)),d=o(91854),l=(o(87979),o(28008)),c=o(78586),h=o(10916);o(89370);let f=(0,i.Z)([(0,r.Mo)("bluetooth-config-dashboard")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_connectionAllocationData",value:()=>[]},{kind:"field",decorators:[(0,r.SB)()],key:"_connectionAllocationsError",value:void 0},{kind:"field",key:"_configEntry",value:()=>new URLSearchParams(window.location.search).get("config_entry")},{kind:"field",key:"_unsubConnectionAllocations",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(o,"connectedCallback",this,3)([]),this.hass&&this._subscribeBluetoothConnectionAllocations()}},{kind:"method",key:"_subscribeBluetoothConnectionAllocations",value:async function(){if(!this._unsubConnectionAllocations&&this._configEntry)try{this._unsubConnectionAllocations=await(0,c.JG)(this.hass.connection,(e=>{this._connectionAllocationData=e}),this._configEntry)}catch(e){this._unsubConnectionAllocations=void 0,this._connectionAllocationsError=e.message}}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(o,"disconnectedCallback",this,3)([]),this._unsubConnectionAllocations&&(this._unsubConnectionAllocations(),this._unsubConnectionAllocations=void 0)}},{kind:"method",key:"render",value:function(){return n.dy` <hass-subpage .narrow="${this.narrow}" .hass="${this.hass}"> <div class="content"> <ha-card .header="${this.hass.localize("ui.panel.config.bluetooth.settings_title")}"> <div class="card-actions"> <ha-button @click="${this._openOptionFlow}">${this.hass.localize("ui.panel.config.bluetooth.option_flow")}</ha-button> </div> </ha-card> <ha-card .header="${this.hass.localize("ui.panel.config.bluetooth.advertisement_monitor")}"> <div class="card-content"> <p> ${this.hass.localize("ui.panel.config.bluetooth.advertisement_monitor_details")} </p> </div> <div class="card-actions"> <a href="/config/bluetooth/advertisement-monitor"><ha-button> ${this.hass.localize("ui.panel.config.bluetooth.advertisement_monitor")} </ha-button></a> </div> </ha-card> <ha-card .header="${this.hass.localize("ui.panel.config.bluetooth.connection_slot_allocations_monitor")}"> <div class="card-content"> ${this._renderConnectionAllocations()} </div> <div class="card-actions"> <a href="/config/bluetooth/connection-monitor"><ha-button> ${this.hass.localize("ui.panel.config.bluetooth.connection_monitor")} </ha-button></a> </div> </ha-card> </div> </hass-subpage> `}},{kind:"field",key:"_getUsedAllocations",value:()=>(e,t)=>(0,h.IU)((0,h.Ff)(e,0,t))},{kind:"method",key:"_renderConnectionAllocations",value:function(){if(this._connectionAllocationsError)return n.dy`<ha-alert alert-type="error">${this._connectionAllocationsError}</ha-alert>`;if(0===this._connectionAllocationData.length)return n.dy`<div> ${this.hass.localize("ui.panel.config.bluetooth.no_connection_slot_allocations")} </div>`;const e=this._connectionAllocationData[0],t=e.slots-e.free,o=e.slots;return 0===o?n.dy`<div> ${this.hass.localize("ui.panel.config.bluetooth.no_active_connection_support")} </div>`:n.dy` <p> ${this.hass.localize("ui.panel.config.bluetooth.connection_slot_allocations_monitor_details",{slots:o})} </p> <ha-metric .heading="${this.hass.localize("ui.panel.config.bluetooth.used_connection_slot_allocations")}" .value="${this._getUsedAllocations(t,o)}" .tooltip="${e.allocated.length>0?`${t}/${o} (${e.allocated.join(", ")})`:`${t}/${o}`}"></ha-metric> `}},{kind:"method",key:"_openOptionFlow",value:async function(){const e=this._configEntry;if(!e)return;const t=(await(0,s.pB)(this.hass,{domain:"bluetooth"})).find((t=>t.entry_id===e));(0,d.c)(this,t)}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,n.iv`:host{-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.content{padding:24px 0 32px;max-width:600px;margin:0 auto;direction:ltr}ha-card{margin-bottom:16px}`]}}]}}),n.oi)},28008:function(e,t,o){o.d(t,{$c:()=>s,Qx:()=>n,k1:()=>a,yu:()=>r});var i=o(57243);const a=i.iv`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`,n=i.iv`:host{font-family:var(--paper-font-body1_-_font-family);-webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing);font-size:var(--paper-font-body1_-_font-size);font-weight:var(--paper-font-body1_-_font-weight);line-height:var(--paper-font-body1_-_line-height)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}h1{font-family:var(--paper-font-headline_-_font-family);-webkit-font-smoothing:var(--paper-font-headline_-_-webkit-font-smoothing);white-space:var(--paper-font-headline_-_white-space);overflow:var(--paper-font-headline_-_overflow);text-overflow:var(--paper-font-headline_-_text-overflow);font-size:var(--paper-font-headline_-_font-size);font-weight:var(--paper-font-headline_-_font-weight);line-height:var(--paper-font-headline_-_line-height)}h2{font-family:var(--paper-font-title_-_font-family);-webkit-font-smoothing:var(--paper-font-title_-_-webkit-font-smoothing);white-space:var(--paper-font-title_-_white-space);overflow:var(--paper-font-title_-_overflow);text-overflow:var(--paper-font-title_-_text-overflow);font-size:var(--paper-font-title_-_font-size);font-weight:var(--paper-font-title_-_font-weight);line-height:var(--paper-font-title_-_line-height)}h3{font-family:var(--paper-font-subhead_-_font-family);-webkit-font-smoothing:var(--paper-font-subhead_-_-webkit-font-smoothing);white-space:var(--paper-font-subhead_-_white-space);overflow:var(--paper-font-subhead_-_overflow);text-overflow:var(--paper-font-subhead_-_text-overflow);font-size:var(--paper-font-subhead_-_font-size);font-weight:var(--paper-font-subhead_-_font-weight);line-height:var(--paper-font-subhead_-_line-height)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}${a} .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}.l