UNPKG

iobroker.lovelace

Version:

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

12 lines 82.9 kB
export const __webpack_ids__=["91310"];export const __webpack_modules__={17803:function(e,t,i){i.d(t,{I:()=>a,_:()=>o});const a=(e,t,i,a)=>{const[o,n,r]=e.split(".",3);return Number(o)>t||Number(o)===t&&(void 0===a?Number(n)>=i:Number(n)>i)||void 0!==a&&Number(o)===t&&Number(n)===i&&Number(r)>=a},o=e=>e.includes("dev")},49976:function(e,t,i){i.d(t,{U:()=>a});const a=e=>e.stopPropagation()},94369:function(e,t,i){i.a(e,(async function(e,a){try{i.d(t,{u:()=>s});var o=i(16485),n=i(27486),r=e([o]);o=(r.then?(await r)():r)[0];const s=(e,t)=>{try{return d(t)?.of(e)??e}catch{return e}},d=(0,n.Z)((e=>new Intl.DisplayNames(e.language,{type:"language",fallback:"code"})));a()}catch(e){a(e)}}))},50602:function(e,t,i){i.a(e,(async function(e,a){try{i.d(t,{SL:()=>d,l4:()=>u,sJ:()=>l,uf:()=>h});var o=i(16485),n=i(20382),r=i(34618),s=e([o]);o=(s.then?(await s)():s)[0];const d=e=>l(e.attributes),l=(e,t)=>!!e.unit_of_measurement||!!e.state_class||(t||[]).includes(e.device_class||""),c=e=>{switch(e.number_format){case n.y4.comma_decimal:return["en-US","en"];case n.y4.decimal_comma:return["de","es","it"];case n.y4.space_comma:return["fr","sv","cs"];case n.y4.system:return;default:return e.language}},h=(e,t,i)=>{const a=t?c(t):void 0;return Number.isNaN=Number.isNaN||function e(t){return"number"==typeof t&&e(t)},t?.number_format===n.y4.none||Number.isNaN(Number(e))?Number.isNaN(Number(e))||""===e||t?.number_format!==n.y4.none?"string"==typeof e?e:`${(0,r.N)(e,i?.maximumFractionDigits).toString()}${"currency"===i?.style?` ${i.currency}`:""}`:new Intl.NumberFormat("en-US",p(e,{...i,useGrouping:!1})).format(Number(e)):new Intl.NumberFormat(a,p(e,i)).format(Number(e))},u=(e,t)=>{const i=t?.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(e?.attributes?.step))&&Number.isInteger(Number(e?.state))?{maximumFractionDigits:0}:void 0},p=(e,t)=>{const i={maximumFractionDigits:2,...t};if("string"!=typeof e)return i;if(!t||void 0===t.minimumFractionDigits&&void 0===t.maximumFractionDigits){const t=e.indexOf(".")>-1?e.split(".")[1].length:0;i.minimumFractionDigits=t,i.maximumFractionDigits=t}return i};a()}catch(e){a(e)}}))},34618:function(e,t,i){i.d(t,{N:()=>a});const a=(e,t=2)=>Math.round(e*10**t)/10**t},99426:function(e,t,i){i.r(t);var a=i(44249),o=i(57243),n=i(15093),r=i(35359),s=i(36522);i(23334),i(37583);const d={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};(0,a.Z)([(0,n.Mo)("ha-alert")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)()],key:"title",value:()=>""},{kind:"field",decorators:[(0,n.Cb)({attribute:"alert-type"})],key:"alertType",value:()=>"info"},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"dismissable",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"method",key:"render",value:function(){return o.dy` <div class="issue-type ${(0,r.$)({[this.alertType]:!0})}" role="alert"> <div class="icon ${this.title?"":"no-title"}"> <slot name="icon"> <ha-svg-icon .path="${d[this.alertType]}"></ha-svg-icon> </slot> </div> <div class="${(0,r.$)({content:!0,narrow:this.narrow})}"> <div class="main-content"> ${this.title?o.dy`<div class="title">${this.title}</div>`:o.Ld} <slot></slot> </div> <div class="action"> <slot name="action"> ${this.dismissable?o.dy`<ha-icon-button @click="${this._dismissClicked}" label="Dismiss alert" .path="${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}"></ha-icon-button>`:o.Ld} </slot> </div> </div> </div> `}},{kind:"method",key:"_dismissClicked",value:function(){(0,s.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`}]}}),o.oi)},34273:function(e,t,i){var a=i(44249),o=i(72621),n=(i(9359),i(31526),i(22997),i(57243)),r=i(15093),s=i(5111),d=i(76525);(0,a.Z)([(0,r.Mo)("ha-button-menu")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:d.gA,value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"corner",value:()=>"BOTTOM_START"},{kind:"field",decorators:[(0,r.Cb)({attribute:"menu-corner"})],key:"menuCorner",value:()=>"START"},{kind:"field",decorators:[(0,r.Cb)({type:Number})],key:"x",value:()=>null},{kind:"field",decorators:[(0,r.Cb)({type:Number})],key:"y",value:()=>null},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"multi",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"activatable",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"fixed",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"no-anchor"})],key:"noAnchor",value:()=>!1},{kind:"field",decorators:[(0,r.IO)("mwc-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){return this._menu?.items}},{kind:"get",key:"selected",value:function(){return this._menu?.selected}},{kind:"method",key:"focus",value:function(){this._menu?.open?this._menu.focusItemAtIndex(0):this._triggerButton?.focus()}},{kind:"method",key:"render",value:function(){return n.dy` <div @click="${this._handleClick}"> <slot name="trigger" @slotchange="${this._setTriggerAria}"></slot> </div> <mwc-menu .corner="${this.corner}" .menuCorner="${this.menuCorner}" .fixed="${this.fixed}" .multi="${this.multi}" .activatable="${this.activatable}" .y="${this.y}" .x="${this.x}"> <slot></slot> </mwc-menu> `}},{kind:"method",key:"firstUpdated",value:function(e){(0,o.Z)(i,"firstUpdated",this,3)([e]),"rtl"===s.E.document.dir&&this.updateComplete.then((()=>{this.querySelectorAll("mwc-list-item").forEach((e=>{const t=document.createElement("style");t.innerHTML="span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}",e.shadowRoot.appendChild(t)}))}))}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchor=this.noAnchor?null:this,this._menu.show())}},{kind:"get",key:"_triggerButton",value:function(){return this.querySelector('ha-icon-button[slot="trigger"], mwc-button[slot="trigger"]')}},{kind:"method",key:"_setTriggerAria",value:function(){this._triggerButton&&(this._triggerButton.ariaHasPopup="menu")}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`}]}}),n.oi)},54977:function(e,t,i){var a=i(44249),o=i(57243),n=i(15093);(0,a.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:()=>o.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 o.dy` ${this.header?o.dy`<h1 class="card-header">${this.header}</h1>`:o.Ld} <slot></slot> `}}]}}),o.oi)},20130:function(e,t,i){var a=i(44249),o=i(72621),n=i(39785),r=i(52876),s=i(15093),d=i(57243),l=i(5111);(0,a.Z)([(0,s.Mo)("ha-fab")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"firstUpdated",value:function(e){(0,o.Z)(i,"firstUpdated",this,3)([e]),this.style.setProperty("--mdc-theme-secondary","var(--primary-color)")}},{kind:"field",static:!0,key:"styles",value:()=>[r.W,d.iv`:host .mdc-fab--extended .mdc-fab__icon{margin-inline-start:-8px;margin-inline-end:12px;direction:var(--direction)}:disabled{--mdc-theme-secondary:var(--disabled-text-color);pointer-events:none}`,"rtl"===l.E.document.dir?d.iv`:host .mdc-fab--extended .mdc-fab__icon{direction:rtl}`:d.iv``]}]}}),n._)},65981:function(e,t,i){i.r(t),i.d(t,{HaIcon:()=>k});var a=i(44249),o=i(72621),n=i(57243),r=i(15093),s=i(36522),d=i(22381),l=i(80654),c=(i(92745),i(9359),i(31526),i(27608)),h=i(27486),u=i(37394);const p=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"}]}'),m=(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!==p.version&&(await(0,c.ZH)(e),(0,c.t8)("_version",p.version,e)):(0,c.t8)("_version",p.version,e)}return e})),f=["mdi","hass","hassio","hademo"];let v=[];i(37583);const g={},b={},_=(0,d.D)((()=>(async e=>{const t=Object.keys(e),i=await Promise.all(Object.values(e));(await m())("readwrite",(a=>{i.forEach(((i,o)=>{Object.entries(i).forEach((([e,t])=>{a.put(t,e)})),delete e[t[o]]}))}))})(b)),2e3),y={};let k=(0,a.Z)([(0,r.Mo)("ha-icon")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,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,o.Z)(a,"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,a]=this.icon.split(":",2);let o,n=a;if(!t||!n)return;if(!f.includes(t)){const i=l.g[t];return i?void(i&&"function"==typeof i.getIcon&&this._setCustomPath(i.getIcon(n),e)):void(this._legacy=!0)}if(this._legacy=!1,n in g){const e=g[n];let i;e.newName?(i=`Icon ${t}:${n} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,n=e.newName):i=`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(i),(0,s.B)(this,"write_log",{level:"warning",message:i})}if(n in y)return void(this._path=y[n]);if("home-assistant"===n){const t=(await i.e("48348").then(i.bind(i,30511))).mdiHomeAssistant;return this.icon===e&&(this._path=t),void(y[n]=t)}try{o=await(e=>new Promise(((t,i)=>{if(v.push([e,t,i]),v.length>1)return;const a=m();(0,u.n)(1e3,(async()=>{(await a)("readonly",(e=>{for(const[t,i,a]of v)(0,c.RV)(e.get(t)).then((e=>i(e))).catch((e=>a(e)));v=[]}))})()).catch((e=>{for(const[,,t]of v)t(e);v=[]}))})))(n)}catch(e){o=void 0}if(o)return this.icon===e&&(this._path=o),void(y[n]=o);const r=(e=>{let t;for(const i of p.parts){if(void 0!==i.start&&e<i.start)break;t=i}return t.file})(n);if(r in b)return void this._setPath(b[r],n,e);const d=fetch(`/static/mdi/${r}.json`).then((e=>e.json()));b[r]=d,this._setPath(d,n,e),_()}},{kind:"method",key:"_setCustomPath",value:async function(e,t){const i=await e;this.icon===t&&(this._path=i.path,this._secondaryPath=i.secondaryPath,this._viewBox=i.viewBox)}},{kind:"method",key:"_setPath",value:async function(e,t,i){const a=await e;this.icon===i&&(this._path=a[t]),y[t]=a[t]}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`:host{fill:currentcolor}`}]}}),n.oi)},7285:function(e,t,i){i.d(t,{M:()=>l});var a=i(44249),o=i(72621),n=i(65703),r=i(46289),s=i(57243),d=i(15093);let l=(0,a.Z)([(0,d.Mo)("ha-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,o.Z)(i,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[r.W,s.iv`:host{padding-left:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-inline-start:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-right:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px));padding-inline-end:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px))}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:48px}span.material-icons:first-of-type{margin-inline-start:0px!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important;direction:var(--direction)!important}span.material-icons:last-of-type{margin-inline-start:auto!important;margin-inline-end:0px!important;direction:var(--direction)!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);align-items:center;flex-shrink:0}:host([graphic=icon]:not([twoline])) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,20px)!important}:host([multiline-secondary]){height:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__text{padding:8px 0}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text{text-overflow:initial;white-space:normal;overflow:auto;display:inline-block;margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text::before{display:none}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text::before{display:none}:host([disabled]){color:var(--disabled-text-color)}:host([noninteractive]){pointer-events:unset}`,"rtl"===document.dir?s.iv`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`:s.iv``]}}]}}),n.K)},92824:function(e,t,i){var a=i(44249),o=i(72621),n=i(60930),r=i(9714),s=i(57243),d=i(15093),l=i(22381),c=i(76320);i(23334);(0,a.Z)([(0,d.Mo)("ha-select")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"icon",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({type:Boolean,reflect:!0})],key:"clearable",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)({attribute:"inline-arrow",type:Boolean})],key:"inlineArrow",value:()=>!1},{kind:"field",decorators:[(0,d.Cb)()],key:"options",value:void 0},{kind:"method",key:"render",value:function(){return s.dy` ${(0,o.Z)(i,"render",this,3)([])} ${this.clearable&&!this.required&&!this.disabled&&this.value?s.dy`<ha-icon-button label="clear" @click="${this._clearValue}" .path="${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}"></ha-icon-button>`:s.Ld} `}},{kind:"method",key:"renderLeadingIcon",value:function(){return this.icon?s.dy`<span class="mdc-select__icon"><slot name="icon"></slot></span>`:s.Ld}},{kind:"method",key:"connectedCallback",value:function(){(0,o.Z)(i,"connectedCallback",this,3)([]),window.addEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"firstUpdated",value:async function(){(0,o.Z)(i,"firstUpdated",this,3)([]),this.inlineArrow&&this.shadowRoot?.querySelector(".mdc-select__selected-text-container")?.classList.add("inline-arrow")}},{kind:"method",key:"updated",value:function(e){if((0,o.Z)(i,"updated",this,3)([e]),e.has("inlineArrow")){const e=this.shadowRoot?.querySelector(".mdc-select__selected-text-container");this.inlineArrow?e?.classList.add("inline-arrow"):e?.classList.remove("inline-arrow")}e.get("options")&&(this.layoutOptions(),this.selectByValue(this.value))}},{kind:"method",key:"disconnectedCallback",value:function(){(0,o.Z)(i,"disconnectedCallback",this,3)([]),window.removeEventListener("translations-updated",this._translationsUpdated)}},{kind:"method",key:"_clearValue",value:function(){!this.disabled&&this.value&&(this.valueSetDirectly=!0,this.select(-1),this.mdcFoundation.handleChange())}},{kind:"field",key:"_translationsUpdated",value(){return(0,l.D)((async()=>{await(0,c.y)(),this.layoutOptions()}),500)}},{kind:"field",static:!0,key:"styles",value:()=>[r.W,s.iv`:host([clearable]){position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:var(--secondary-text-color)}.mdc-select__anchor{width:var(--ha-select-min-width,200px)}.mdc-select--filled .mdc-select__anchor{height:var(--ha-select-height,56px)}.mdc-select--filled .mdc-floating-label{inset-inline-start:12px;inset-inline-end:initial;direction:var(--direction)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{inset-inline-start:48px;inset-inline-end:initial;direction:var(--direction)}.mdc-select .mdc-select__anchor{padding-inline-start:12px;padding-inline-end:0px;direction:var(--direction)}.mdc-select__anchor .mdc-floating-label--float-above{transform-origin:var(--float-start)}.mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,0px)}:host([clearable]) .mdc-select__selected-text-container{padding-inline-end:var(--select-selected-text-padding-end,12px)}ha-icon-button{position:absolute;top:10px;right:28px;--mdc-icon-button-size:36px;--mdc-icon-size:20px;color:var(--secondary-text-color);inset-inline-start:initial;inset-inline-end:28px;direction:var(--direction)}.inline-arrow{flex-grow:0}`]}]}}),n.K)},17170:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaSpinner:()=>h});var o=i(44249),n=i(72621),r=i(97677),s=i(43580),d=i(57243),l=i(15093),c=e([r]);r=(c.then?(await c)():c)[0];let h=(0,o.Z)([(0,l.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,l.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,n.Z)(i,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value:()=>[s.Z,d.iv`:host{--indicator-color:var(
          --ha-spinner-indicator-color,
          var(--primary-color)
        );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`]}]}}),r.Z);a()}catch(e){a(e)}}))},51223:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(44249),o=i(57243),n=i(15093),r=i(94571),s=i(59847),d=i(45729),l=(i(65981),i(37583),e([d]));d=(l.then?(await l)():l)[0];(0,a.Z)([(0,n.Mo)("ha-state-icon")],(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)({attribute:!1})],key:"stateObj",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"stateValue",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"icon",value:void 0},{kind:"method",key:"render",value:function(){const e=this.icon||this.stateObj&&this.hass?.entities[this.stateObj.entity_id]?.icon||this.stateObj?.attributes.icon;if(e)return o.dy`<ha-icon .icon="${e}"></ha-icon>`;if(!this.stateObj)return o.Ld;if(!this.hass)return this._renderFallback();const t=(0,d.gD)(this.hass,this.stateObj,this.stateValue).then((e=>e?o.dy`<ha-icon .icon="${e}"></ha-icon>`:this._renderFallback()));return o.dy`${(0,r.C)(t)}`}},{kind:"method",key:"_renderFallback",value:function(){const e=(0,s.N)(this.stateObj);return o.dy` <ha-svg-icon .path="${d.Ls[e]||d.Rb}"></ha-svg-icon> `}}]}}),o.oi);t()}catch(e){t(e)}}))},40917:function(e,t,i){var a=i(44249),o=i(72621),n=i(27323),r=i(33990),s=i(88540),d=i(57243),l=i(15093);(0,a.Z)([(0,l.Mo)("ha-textarea")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,l.Cb)({type:Boolean,reflect:!0})],key:"autogrow",value:()=>!1},{kind:"method",key:"updated",value:function(e){(0,o.Z)(i,"updated",this,3)([e]),this.autogrow&&e.has("value")&&(this.mdcRoot.dataset.value=this.value+'=​"')}},{kind:"field",static:!0,key:"styles",value:()=>[r.W,s.W,d.iv`:host([autogrow]) .mdc-text-field{position:relative;min-height:74px;min-width:178px;max-height:200px}:host([autogrow]) .mdc-text-field:after{content:attr(data-value);margin-top:23px;margin-bottom:9px;line-height:1.5rem;min-height:42px;padding:0px 32px 0 16px;letter-spacing:var(
          --mdc-typography-subtitle1-letter-spacing,
          .009375em
        );visibility:hidden;white-space:pre-wrap}:host([autogrow]) .mdc-text-field__input{position:absolute;height:calc(100% - 32px)}:host([autogrow]) .mdc-text-field.mdc-text-field--no-label:after{margin-top:16px;margin-bottom:16px}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start) top}@media only screen and (min-width:459px){:host([mobile-multiline]) .mdc-text-field__input{white-space:nowrap;max-height:16px}}`]}]}}),n.O)},56032:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(44249),o=i(80519),n=i(1261),r=i(57243),s=i(15093),d=i(85605),l=e([o]);o=(l.then?(await l)():l)[0],(0,d.jx)("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:150,easing:"ease"}}),(0,d.jx)("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:400,easing:"ease"}});(0,a.Z)([(0,s.Mo)("ha-tooltip")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value:()=>[n.Z,r.iv`:host{--sl-tooltip-background-color:var(--secondary-background-color);--sl-tooltip-color:var(--primary-text-color);--sl-tooltip-font-family:Roboto,sans-serif;--sl-tooltip-font-size:12px;--sl-tooltip-font-weight:normal;--sl-tooltip-line-height:1;--sl-tooltip-padding:8px;--sl-tooltip-border-radius:var(--ha-tooltip-border-radius, 4px);--sl-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 8px);--sl-z-index-tooltip:var(--ha-tooltip-z-index, 1000)}`]}]}}),o.Z);t()}catch(e){t(e)}}))},20901:function(e,t,i){var a=i(44249),o=i(72621),n=(i(9359),i(1331),i(70104),i(57243)),r=i(15093),s=i(36522),d=i(49976),l=i(22381),c=i(58968);i(7285),i(92824);const h="__NONE_OPTION__";(0,a.Z)([(0,r.Mo)("ha-tts-voice-picker")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"engineId",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"language",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"required",value:()=>!1},{kind:"field",decorators:[(0,r.SB)()],key:"_voices",value:void 0},{kind:"field",decorators:[(0,r.IO)("ha-select")],key:"_select",value:void 0},{kind:"method",key:"render",value:function(){if(!this._voices)return n.Ld;const e=this.value??(this.required?this._voices[0]?.voice_id:h);return n.dy` <ha-select .label="${this.label||this.hass.localize("ui.components.tts-voice-picker.voice")}" .value="${e}" .required="${this.required}" .disabled="${this.disabled}" @selected="${this._changed}" @closed="${d.U}" fixedMenuPosition naturalMenuWidth> ${this.required?n.Ld:n.dy`<ha-list-item .value="${h}"> ${this.hass.localize("ui.components.tts-voice-picker.none")} </ha-list-item>`} ${this._voices.map((e=>n.dy`<ha-list-item .value="${e.voice_id}"> ${e.name} </ha-list-item>`))} </ha-select> `}},{kind:"method",key:"willUpdate",value:function(e){(0,o.Z)(i,"willUpdate",this,3)([e]),this.hasUpdated?(e.has("language")||e.has("engineId"))&&this._debouncedUpdateVoices():this._updateVoices()}},{kind:"field",key:"_debouncedUpdateVoices",value(){return(0,l.D)((()=>this._updateVoices()),500)}},{kind:"method",key:"_updateVoices",value:async function(){this.engineId&&this.language?(this._voices=(await(0,c.MV)(this.hass,this.engineId,this.language)).voices,this.value&&(this._voices&&this._voices.find((e=>e.voice_id===this.value))||(this.value=void 0,(0,s.B)(this,"value-changed",{value:this.value})))):this._voices=void 0}},{kind:"method",key:"updated",value:function(e){(0,o.Z)(i,"updated",this,3)([e]),e.has("_voices")&&this._select?.value!==this.value&&(this._select?.layoutOptions(),(0,s.B)(this,"value-changed",{value:this._select?.value}))}},{kind:"field",static:!0,key:"styles",value:()=>n.iv`ha-select{width:100%}`},{kind:"method",key:"_changed",value:function(e){const t=e.target;!this.hass||""===t.value||t.value===this.value||void 0===this.value&&t.value===h||(this.value=t.value===h?void 0:t.value,(0,s.B)(this,"value-changed",{value:this.value}))}}]}}),n.oi)},76229:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(44249),o=i(72621),n=(i(9359),i(1331),i(75656),i(50100),i(18084),i(87319),i(31622),i(57243)),r=i(15093),s=i(68958),d=i(36522),l=i(58968),c=i(28008),h=(i(40917),i(2790)),u=(i(20901),i(54977),i(94616)),p=e([h]);h=(p.then?(await p)():p)[0];(0,a.Z)([(0,r.Mo)("ha-browse-media-tts")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"item",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"action",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_language",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_voice",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_provider",value:void 0},{kind:"field",decorators:[(0,s.t)({key:"TtsMessage",state:!0,subscribe:!1})],key:"_message",value:void 0},{kind:"method",key:"render",value:function(){return n.dy`<ha-card> <div class="card-content"> <ha-textarea autogrow .label="${this.hass.localize("ui.components.media-browser.tts.message")}" .value="${this._message||this.hass.localize("ui.components.media-browser.tts.example_message",{name:this.hass.user?.name||"Alice"})}"> </ha-textarea> ${this._provider?.supported_languages?.length?n.dy` <div class="options"> <ha-language-picker .hass="${this.hass}" .languages="${this._provider.supported_languages}" .value="${this._language}" required @value-changed="${this._languageChanged}"></ha-language-picker> <ha-tts-voice-picker .hass="${this.hass}" .value="${this._voice}" .engineId="${this._provider.engine_id}" .language="${this._language}" required @value-changed="${this._voiceChanged}"></ha-tts-voice-picker> </div>`:n.Ld} </div> <div class="card-actions"> <mwc-button @click="${this._ttsClicked}"> ${this.hass.localize(`ui.components.media-browser.tts.action_${this.action}`)} </mwc-button> </div> </ha-card> `}},{kind:"method",key:"willUpdate",value:function(e){if((0,o.Z)(i,"willUpdate",this,3)([e]),e.has("item")&&this.item.media_content_id){const e=new URLSearchParams(this.item.media_content_id.split("?")[1]),t=e.get("message"),i=e.get("language"),a=e.get("voice");t&&(this._message=t),i&&(this._language=i),a&&(this._voice=a);const o=(0,l.Xk)(this.item.media_content_id);o!==this._provider?.engine_id&&(this._provider=void 0,(0,l.yP)(this.hass,o).then((e=>{if(this._provider=e.provider,!this._language&&e.provider.supported_languages?.length){const t=`${this.hass.config.language}-${this.hass.config.country}`.toLowerCase(),i=e.provider.supported_languages.find((e=>e.toLowerCase()===t));if(i)return void(this._language=i);this._language=e.provider.supported_languages?.find((e=>e.substring(0,2)===this.hass.config.language.substring(0,2)))}})),"cloud"===o&&(0,u.LI)(this.hass).then((e=>{e.logged_in&&(this._language=e.prefs.tts_default_voice[0])})))}if(e.has("_message"))return;const t=this.shadowRoot.querySelector("ha-textarea")?.value;void 0!==t&&t!==this._message&&(this._message=t)}},{kind:"method",key:"_languageChanged",value:function(e){this._language=e.detail.value}},{kind:"method",key:"_voiceChanged",value:function(e){this._voice=e.detail.value}},{kind:"method",key:"_ttsClicked",value:async function(){const e=this.shadowRoot.querySelector("ha-textarea").value;this._message=e;const t={...this.item},i=new URLSearchParams;i.append("message",e),this._language&&i.append("language",this._language),this._voice&&i.append("voice",this._voice),t.media_content_id=`${t.media_content_id.split("?")[0]}?${i.toString()}`,t.can_play=!0,t.title=e,(0,d.B)(this,"tts-picked",{item:t})}},{kind:"field",static:!0,key:"styles",value:()=>[c.k1,n.iv`:host{margin:16px auto;padding:0 8px;display:flex;flex-direction:column;max-width:448px}.options{margin-top:16px;display:flex;justify-content:space-between}ha-textarea{width:100%}button.link{color:var(--primary-color)}`]}]}}),n.oi);t()}catch(e){t(e)}}))},32101:function(e,t,i){var a=i(44249),o=(i(31622),i(57243)),n=i(15093),r=i(36522),s=i(1079);i(37583);(0,a.Z)([(0,n.Mo)("ha-media-manage-button")],(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)({attribute:!1})],key:"currentItem",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_uploading",value:()=>0},{kind:"method",key:"render",value:function(){return this.currentItem&&((0,s.aV)(this.currentItem.media_content_id||"")||this.hass.user?.is_admin&&(0,s.IB)(this.currentItem.media_content_id))?o.dy` <mwc-button .label="${this.hass.localize("ui.components.media-browser.file_management.manage")}" @click="${this._manage}"> <ha-svg-icon .path="${"M19.39 10.74L11 19.13V20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V10.15C21.74 10.06 21.46 10 21.17 10C20.5 10 19.87 10.26 19.39 10.74M13 19.96V22H15.04L21.17 15.88L19.13 13.83L13 19.96M22.85 13.47L21.53 12.15C21.33 11.95 21 11.95 20.81 12.15L19.83 13.13L21.87 15.17L22.85 14.19C23.05 14 23.05 13.67 22.85 13.47Z"}" slot="icon"></ha-svg-icon> </mwc-button> `:o.Ld}},{kind:"method",key:"_manage",value:function(){var e,t;e=this,t={currentItem:this.currentItem,onClose:()=>(0,r.B)(this,"media-refresh")},(0,r.B)(e,"show-dialog",{dialogTag:"dialog-media-manage",dialogImport:()=>Promise.all([i.e("97983"),i.e("29570"),i.e("7964")]).then(i.bind(i,70643)),dialogParams:t})}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`mwc-button{--mdc-button-disabled-ink-color:--mdc-theme-primary}ha-svg-icon[slot=icon]{vertical-align:middle}ha-svg-icon[slot=icon]{margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction)}`}]}}),o.oi)},10177:function(e,t,i){i.a(e,(async function(e,t){try{var a=i(44249),o=i(72621),n=(i(92745),i(9359),i(68107),i(30843)),r=(i(31622),i(2060),i(87319),i(57243)),s=i(15093),d=i(35359),l=i(69634),c=i(94571),h=i(36522),u=i(22381),p=i(96194),m=i(89890),f=i(1079),v=i(58968),g=i(76131),b=i(28008),_=i(88238),y=i(73192),k=i(58725),w=(i(99426),i(34273),i(54977),i(17170)),x=(i(20130),i(23334),i(37583),i(56032)),C=i(76229),L=i(47641),$=e([k,w,x,C]);[k,w,x,C]=$.then?(await $)():$;const A="M21.5 9.5L20.09 10.92L17 7.83V13.5C17 17.09 14.09 20 10.5 20H4V18H10.5C13 18 15 16 15 13.5V7.83L11.91 10.91L10.5 9.5L16 4L21.5 9.5Z",H="M8,5.14V19.14L19,12.14L8,5.14Z",V="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";(0,a.Z)([(0,s.Mo)("ha-media-player-browse")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"entityId",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"action",value:()=>"play"},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"preferredLayout",value:()=>"auto"},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"dialog",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"navigateIds",value:()=>[]},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"scrolled",value:()=>!1},{kind:"field",decorators:[(0,s.SB)()],key:"_error",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_parentItem",value:void 0},{kind:"field",decorators:[(0,s.SB)()],key:"_currentItem",value:void 0},{kind:"field",decorators:[(0,s.IO)(".header")],key:"_header",value:void 0},{kind:"field",decorators:[(0,s.IO)(".content")],key:"_content",value:void 0},{kind:"field",decorators:[(0,s.IO)("lit-virtualizer")],key:"_virtualizer",value:void 0},{kind:"field",key:"_observed",value:()=>!1},{kind:"field",key:"_headerOffsetHeight",value:()=>0},{kind:"field",key:"_resizeObserver",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,o.Z)(i,"connectedCallback",this,3)([]),this.updateComplete.then((()=>this._attachResizeObserver()))}},{kind:"method",key:"disconnectedCallback",value:function(){(0,o.Z)(i,"disconnectedCallback",this,3)([]),this._resizeObserver&&this._resizeObserver.disconnect()}},{kind:"method",key:"refresh",value:async function(){const e=this.navigateIds[this.navigateIds.length-1];try{this._currentItem=await this._fetchData(this.entityId,e.media_content_id,e.media_content_type),(0,h.B)(this,"media-browsed",{ids:this.navigateIds,current:this._currentItem})}catch(e){this._setError(e)}}},{kind:"method",key:"play",value:function(){this._currentItem?.can_play&&this._runAction(this._currentItem)}},{kind:"method",key:"willUpdate",value:function(e){if((0,o.Z)(i,"willUpdate",this,3)([e]),this.hasUpdated||(0,L.o)(),e.has("entityId"))this._setError(void 0);else if(!e.has("navigateIds"))return;this._setError(void 0);const t=e.get("navigateIds"),a=this.navigateIds;this._content?.scrollTo(0,0),this.scrolled=!1;const n=this._currentItem,r=this._parentItem;this._currentItem=void 0,this._parentItem=void 0;const s=a[a.length-1],d=a.length>1?a[a.length-2]:void 0;let l,c;e.has("entityId")||(t&&a.length===t.length+1&&t.every(((e,t)=>{const i=a[t];return i.media_content_id===e.media_content_id&&i.media_content_type===e.media_content_type}))?c=Promise.resolve(n):t&&a.length===t.length-1&&a.every(((e,i)=>{const a=t[i];return e.media_content_id===a.media_content_id&&e.media_content_type===a.media_content_type}))&&(l=Promise.resolve(r))),l||(l=this._fetchData(this.entityId,s.media_content_id,s.media_content_type)),l.then((e=>{this._currentItem=e,(0,h.B)(this,"media-browsed",{ids:a,current:e})}),(i=>{t&&e.has("entityId")&&a.length===t.length&&t.every(((e,t)=>a[t].media_content_id===e.media_content_id&&a[t].media_content_type===e.media_content_type))?(0,h.B)(this,"media-browsed",{ids:[{media_content_id:void 0,media_content_type:void 0}],replace:!0}):"entity_not_found"===i.code&&(0,p.rk)(this.hass.states[this.entityId]?.state)?this._setError({message:this.hass.localize("ui.components.media-browser.media_player_unavailable"),code:"entity_not_found"}):this._setError(i)})),c||void 0===d||(c=this._fetchData(this.entityId,d.media_content_id,d.media_content_type)),c&&c.then((e=>{this._parentItem=e}))}},{kind:"method",key:"shouldUpdate",value:function(e){if(e.size>1||!e.has("hass"))return!0;const t=e.get("hass");return void 0===t||t.localize!==this.hass.localize}},{kind:"method",key:"firstUpdated",value:function(){this._measureCard(),this._attachResizeObserver()}},{kind:"method",key:"updated",value:function(e){if((0,o.Z)(i,"updated",this,3)([e]),e.has("_scrolled"))this._animateHeaderHeight();else if(e.has("_currentItem")){if(this._setHeaderHeight(),this._observed)return;const e=this._virtualizer?._virtualizer;e&&(this._observed=!0,setTimeout((()=>e._observeMutations()),0))}}},{kind:"method",key:"render",value:function(){if(this._error)return r.dy` <div class="container"> <ha-alert alert-type="error"> ${this._renderError(this._error)} </ha-alert> </div> `;if(!this._currentItem)return r.dy`<ha-spinner></ha-spinner>`;const e=this._currentItem,t=this.hass.localize(`ui.components.media-browser.class.${e.media_class}`),i=e.children||[],a=m.Fn[e.media_class],o=e.children_media_class?m.Fn[e.children_media_class]:m.Fn.directory,s=e.thumbnail?this._getThumbnailURLorBase64(e.thumbnail).then((e=>`url(${e})`)):"none";return r.dy` ${e.can_play?r.dy` <div class="header ${(0,d.$)({"no-img":!e.thumbnail,"no-dialog":!this.dialog})}" @transitionend="${this._setHeaderHeight}"> <div class="header-content"> ${e.thumbnail?r.dy` <div class="img" style="background-image:${(0,c.C)(s,"")}"> ${this.narrow&&e?.can_play?r.dy` <ha-fab mini .item="${e}" @click="${this._actionClicked}"> <ha-svg-icon slot="icon" .label="${this.hass.localize(`ui.components.media-browser.${this.action}-media`)}" .path="${"play"===this.action?H:V}"></ha-svg-icon> ${this.hass.localize(`ui.components.media-browser.${this.action}`)} </ha-fab> `:""} </div> `:r.Ld} <div class="header-info"> <div class="breadcrumb"> <h1 class="title">${e.title}</h1> ${t?r.dy` <h2 class="subtitle">${t}</h2> `:""} </div> ${!e.can_play||e.thumbnail&&this.narrow?"":r.dy` <mwc-button raised .item="${e}" @click="${this._actionClicked}"> <ha-svg-icon .label="${this.hass.localize(`ui.components.media-browser.${this.action}-media`)}" .path="${"play"===this.action?H:V}"></ha-svg-icon> ${this.hass.localize(`ui.components.media-browser.${this.action}`)} </mwc-button> `} </div> </div> </div> `:""} <div class="content" @scroll="${this._scroll}" @touchmove="${this._scroll}"> ${this._error?r.dy` <div class="container"> <ha-alert alert-type="error"> ${this._renderError(this._error)} </ha-alert> </div> `:(0,v.b_)(e.media_content_id)?r.dy` <ha-browse-media-tts .item="${e}" .hass="${this.hass}" .action="${this.action}" @tts-picked="${this._ttsPicked}"></ha-browse-media-tts> `:i.length||e.not_shown?"grid"===this.preferredLayout||"auto"===this.preferredLayout&&"grid"===o.layout?r.dy` <lit-virtualizer scroller .layout="${(0,n.e)({itemSize:{width:"175px",height:"portrait"===o.thumbnail_ratio?"312px":"225px"},gap:"16px",flex:{preserve:"aspect-ratio"},justify:"space-evenly",direction:"vertical"})}" .items="${i}" .renderItem="${this._renderGridItem}" class="children ${(0,d.$)({portrait:"portrait"===o.thumbnail_ratio,not_shown:!!e.not_shown})}"></lit-virtualizer> ${e.not_shown?r.dy` <div class="grid not-shown"> <div class="title"> ${this.hass.localize("ui.components.media-browser.not_shown",{count:e.not_shown})} </div> </div> `:""} `:r.dy` <mwc-list> <lit-virtualizer scroller .items="${i}" style="${(0,l.V)({height:72*i.length+26+"px"})}" .renderItem="${this._renderListItem}"></lit-virtualizer> ${e.not_shown?r.dy` <mwc-list-item noninteractive class="not-shown" .graphic="${a.show_list_images?"medium":"avatar"}"> <span class="title"> ${this.hass.localize("ui.components.media-browser.not_shown",{count:e.not_shown})} </span> </mwc-list-item> `:""} </mwc-list> `:r.dy` <div class="container no-items"> ${"media-source://media_source/local/."===e.media_content_id?r.dy` <div class="highlight-add-button"> <span> <ha-svg-icon .path="${A}"></ha-svg-icon> </span> <span> ${this.hass.localize("ui.components.media-browser.file_management.highlight_button")} </span> </div> `:this.hass.localize("ui.components.media-browser.no_items")} </div> `} </div> `}},{kind:"field",key:"_renderGridItem",value(){return e=>{const t=e.thumbnail?this._getThumbnailURLorBase64(e.thumbnail).then((e=>`url(${e})`)):"none";return r.dy` <div class="child" .item="${e}" @click="${this._childClicked}"> <ha-card outlined> <div class="thumbnail"> ${e.thumbnail?r.dy` <div class="${(0,d.$)({"centered-image":["app","directory"].includes(e.media_class),"brand-image":(0,_.zC)(e.thumbnail)})} image" style="background-image:${(0,c.C)(t,"")}"></div> `:r.dy` <div class="icon-holder image"> <ha-svg-icon class="folder" .path="${m.Fn["directory"===e.media_class&&e.children_media_class||e.media_class].icon}"></ha-svg-icon> </div> `} ${e.can_play?r.dy` <ha-icon-button class="play ${(0,d.$)({can_expand:e.can_expand})}" .item="${e}" .label="${this.hass.localize(`ui.components.media-browser.${this.action}-media`)}" .path="${"play"===this.action?H:V}" @click="${this._actionClicked}"></ha-icon-button> `:""} </div> <ha-tooltip distance="-4" .content="${e.title}"> <div class="title">${e.title}</div> </ha-tooltip> </ha-card> </div> `}}},{kind:"field",key:"_renderListItem",value(){return e=>{const t=this._currentItem,i=m.Fn[t.media_class],a=i.show_list_images&&e.thumbnail?this._getThumbnailURLorBase64(e.thumbnail).then((e=>`url(${e})`)):"none";return r.dy` <mwc-list-item @click="${this._childClicked}" .item="${e}" .graphic="${i.show_list_images?"medium":"avatar"}"> ${"none"!==a||e.can_play?r.dy`<div class="${(0,d.$)({graphic:!0,thumbnail:!0===i.show_list_images})}" style="background-image:${(0,c.C)(a,"")}" slot="graphic"> ${e.can_play?r.dy`<ha-icon-button class="play ${(0,d.$)({show:!i.show_list_images||!e.thumbnail})}" .item="${e}" .label="${this.hass.localize(`ui.components.media-browser.${this.action}-media`)}" .path="${"play"===this.action?H:V}" @click="${this._actionClicked}"></ha-icon-button>`:r.Ld} </div>`:r.dy`<ha-svg-icon .path="${m.Fn["directory"===e.media_class&&e.children_media_class||e.media_class].icon}" slot="graphic"></ha-svg-icon>`} <span class="title">${e.title}</span> </mwc-list-item> `}}},{kind:"method",key:"_getThumbnailURLorBase64",value:async function(e){return e?e.startsWith("/")?new Promise(((t,i)=>{this.hass.fetchWithAuth(e).then((e=>e.blob())).then((e=>{const a=new FileReader;a.onload=()=>{const e=a.result;t("string"==typeof e?e:"")},a.onerror=e=>i(e),a.readAsDataURL(e)}))})):((0,_.zC)(e)&&(e=(0,_.X1)({domain:(0,_.u4)(e),type:"icon",useFallback:!0,darkOptimized:this.hass.themes?.darkMode})),e):""}},{kind:"field",key:"_actionClicked",value(){return e=>{e.stopPropagation();const t=e.currentTarget.item;this._runAction(t)}}},{kind:"method",key:"_runAction",value:function(e){(0,h.B)(this,"media-picked",{item:e,navigateIds:this.navigateIds})}},{kind:"method",key:"_ttsPicked",value:function(e){e.stopPropagation();const t=this.navigateIds.slice(0,-1);t.push(e.detail.item),(0,h.B)(this,"media-picked",{...e.detail,navigateIds:t})}},{kind:"field",key:"_childClicked",value(){return async e=>{const t=e.currentTarget.item;t&&(t.can_expand?(0,h.B)(this,"media-browsed",{ids:[...this.navigateIds,t]}):this._runAction(t))}}},{kind:"method",key:"_fetchData",value:async function(e,t,i){return e!==m.N8?(0,m.zz)(this.hass,e,t,i):(0,f.b)(this.hass,t)}},{kind:"method",key:"_measureCard",value:function(){this.narrow=(this.dialog?window.innerWidth:this.offsetWidth)<450}},{kind:"method",key:"_attachResizeObserver",value:async function(){this._resizeObserver||(this._resizeObserver=new ResizeObserver((0,u.D)((()=>this._measureCard()),250,!1))),this._resizeObserver.observe(this)}},{kind:"method",key:"_closeDialogAction",value:function(){(0,h.B)(this,"close-dialog")}},{kind:"method",key:"_setError",value:function(e){this.dialog?e&&(this._closeDialogAction(),(0,g.showAlertDialog)(this,{title:this.hass.localize("ui.components.media-browser.media_browsing_error"),text:this._renderError(e)})):this._error=e}},{kind:"method",key:"_renderError",value:function(e){return"Media directory does not exist."===e.message?r.dy` <h2> ${this.hass.localize("ui.components.media-browser.no_local_media_found")} </h2> <p> ${this.hass.localize("ui.components.media-browser.no_media_folder")} <br> ${this.hass.localize("ui.components.media-browser.setup_local_help",{documentation:r.dy`<a href="${(0,y.R)(this.hass,"/more-info/local-media/setup-media")}" target="_blank" rel="noreferrer">${this.hass.localize("ui.components.media-browser.documentation")}</a>`})} <br> ${this.hass.localize("ui.components.media-browser.local_media_files")} </p> `:r.dy`<span class="error">${e.message}</span>`}},{kind:"method",key:"_setHeaderHeight",value:async function(){await this.updateComplete;const e=this._header,t=this._content;e&&t&&(this._headerOffsetHeight=e.offsetHeight,t.style.marginTop=`${this._headerOffsetHeight}px`,t.style.maxHeight=`calc(var(--media-browser-max-height, 100%) - ${this._headerOffsetHeight}px)`)}},{kind:"method",key:"_animateHeaderHeight",value:function(){let e;const t=i=>{void 0===e&&(e=i);const a=i-e;this._setHeaderHeight(),a<400&&requestAnimationFrame(t)};requestAnimationFrame(t)}},{kind:"method",decorators:[(0,s.hO)({passive:!0})],key:"_scroll",value:function(e){const t=e.currentTarget;!this.scrolled&&t.scrollTop>this._headerOffsetHeight?this.scrolled=!0:this.scrolled&&t.scrollTop<this._headerOffsetHeight&&(this.scrolled=!1)}},{kind:"get",static:!0,key:"styles",value:function(){return[b.Qx,r.iv`:host{display:flex;flex-direction:column;position:relative;direction:ltr}ha-spinner{margin:40px auto}.container{padding:16px}.no-items{padding-left:32px}.highlight-add-button{display:flex;flex-direction:row-reverse;margin-right:48px}.highlight-add-button ha-svg-icon{position:relative;top:-.5em;margin-left:8px}.content{overflow-y:auto;box-sizing:border-box;height:100%}.header{display:flex;justify-content:space-between;border-bottom:1px solid var(--divider-color);background-color:var(--card-background-color);position:absolute;top:0;right:0;left:0;z-index:3;padding:16px}.header_button{position:relative;right:-8px}.header-content{display:flex;flex-wrap:wrap;flex-grow:1;align-items:flex-start}.header-content .img{height:175px;width:175px;margin-right:16px;background-size:cover;border-radius:2px;transition:width .4s,height .4s}.header-info{display:flex;flex-direction:column;justify-content:space-between;align-self:stretch;min-width:0;flex:1}.header-info mwc-button{display:block;--mdc-theme-primary:var(--primary-color);padding-bottom:16px}.breadcrumb{display:flex;flex-direction:column;overflow:hidden;flex-grow:1;padding-top:16px}.breadcrumb .title{font-size:32px;line-height:1.2;font-weight:700;margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;padding-right:8px}.breadcrumb .previous-title{font-size:14px;padding-bottom:8px;color:var(--secondary-text-color);overflow:hidden;text-overflow:ellipsis;cursor:pointer;--mdc-icon-size:14px}.breadcrumb .subtitle{font-size:16px;overflow:hidden;text-overflow:ellipsis;margin-bottom:0;transition:height .5s,margin .5s}.not-shown{font-style:italic;color:var(--secondary-text-color);padding:8px 16px 8px}.grid.not-shown{display:flex;align-items:center;text-align:center}mwc-list{--mdc-list-vertical-padding:0;--mdc-list-item-graphic-margin:0;--mdc-theme-text-icon-on-background:var(--secondary-text-color);margin-top:10px}mwc-list li:last-child{display:none}mwc-list li[divider]{border-bottom-color:var(--divider-color)}mwc-list-item{width:100%}div.children{display:grid;grid-template-columns:repeat(auto-fit,minmax(var(--media-browse-item-size,175px),0.1fr));grid-gap:16px;padding:16px}:host([dialog]) .children{grid-template-columns:repeat(auto-fit,minmax(var(--media-browse-item-size,175px),0.33fr))}.child{display:flex;flex-direction:column;cursor:pointer}ha-card{position:relative;width:100%;box-sizing:border-box}.children ha-card .thumbnail{width:100%;position:relative;box-sizing:border-box;transition:padding-bottom .1s ease-out;padding-bottom:100%}.portrait ha-card .thumbnail{padding-bottom:150%}ha-card .image{border-radius:3px 3px 0 0}.image{position:absolute;top:0;right:0;left:0;bottom:0;background-size:cover;background-repeat:no-repeat;background-position:center}.centered-image{margin:0 8px;background-size:contain}.brand-image{background-size:40%}.children ha-card .icon-holder{display:flex;justify-content:center;align-items:center}.child .folder{color:var(--secondary-text-color);--mdc-icon-size:calc(var(--media-browse-item-size, 175px) * 0.4)}.child .play{position:absolute;transition:color .5s;border-radius:50%;top:calc(50% - 40px);right:calc(50% - 35px);opacity:0;transition:opacity .1s ease-out}.child .play:not(.can_expand){--mdc-icon-button-size:70px;--mdc-icon-size:48px;background-color:var(--primary-color);color:var(--text-primary-color)}ha-card:hover .image{filter:brightness(70%);transition:filter .5s}ha-card:hover .play{opacity:1}ha-card:hover .play.can_expand{bottom:8px}.child .play.can_expand{background-color:rgba(var(--rgb-card-background-color),.5);top:auto;bottom:0px;right:8px;transition:bottom .1s ease-out,opacity .1s ease-out}.child .title{font-size:16px;padding-top:16px;padding-left:2px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis}.child ha-card .title{margin-bottom:16px;padding-left:16px}mwc-list-item .graphic{background-size:contain;background-repeat:no-repeat;background-position:center;border-radius:2px;display:flex;align-content:center;align-items:center;line-height:initial}mwc-list-item .graphic .play{opacity:0;transition:all .5s;background-color:rgba(var(--rgb-card-background-color),.5);border-radius:50%;--mdc-icon-button-size:40px}mwc-list-item:hover .graphic .play{opacity:1;color:var(--primary-text-color)}mwc-list-item .graphic .play.show{opacity:1;background-color:transparent}mwc-list-item .title{margin-left:16px;margin-inline-start:16px;margin-inline-end:initial}:host([narrow]){padding:0}:host([narrow]) .media-source{padding:0 24px}:host([narrow]) div.children{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}:host([narrow]) .breadcrumb .title{font-size:24px}:host([narrow]) .header{padding:0}:host([narrow]) .header.no-dialog{display:block}:host([narrow]) .header_button{position:absolute;top:14px;right:8px}:host([narrow]) .header-content{flex-direction:column;flex-wrap:nowrap}:host([narrow]) .header-content .img{height:auto;width:100%;margin-right:0;padding-bottom:50%;margin-bottom:8px;position:relative;background-position:center;border-radius:0;transition:width .4s,height .4s,padding-bottom .4s}ha-fab{position:absolute;--mdc-theme-secondary:var(--primary-color);bottom:-20px;right:20px}:host([narrow]) .header-info mwc-button{margin-top:16px;margin-bottom:8px}:host([narrow]) .header-info{padding:0 16px 8px}:host([scrolled]) .breadcrumb .subtitle{height:0;margin:0}:host([scrolled]) .breadcrumb .title{-webkit-line-clamp:1}:host(:not([narrow])[scrolled]) .header:not(.no-img) ha-icon-button{align-self:center}.no-img .header-info mwc-button,:host([scrolled]) .header-info mwc-button{padding-right:4px}:host([scrolled][narrow]) .no-img .header-info mwc-button{padding-right:16px}:host([scrolled]) .header-info{flex-direction:row}:host([scrolled]) .header-info mwc-button{align-self:center;margin-top:0;margin-bottom:0;padding-bottom:0}:host([scrolled][narrow]) .no-img .header-info{flex-direction:row-reverse}:host([scrolled][narrow]) .header-info{padding:20px 24px 10px 24px;align-items:center}:host([scrolled]) .header-content{align-items:flex-end;flex-direction:row}:host([scrolled]) .header-content .img{height:75px;width:75px}:host([scrolled]) .breadcrumb{padding-top:0;align-self:center}:host([scrolled][narrow]) .header-content .img{height:100px;width:100px;padding-bottom:initial;margin-bottom:0}:host([scrolled]) ha-fab{bottom:0px;right:-24px;--mdc-fab-box-shadow:none;--mdc-theme-secondary:rgba(var(--rgb-primary-color), 0.5)}lit-virtualizer{height:100%;overflow:overlay!important;contain:size layout!important}lit-virtualizer.not_shown{height:calc(100% - 36px)}ha-browse-media-tts{direction:var(--direction)}`]}}]}}),r.oi);t()}catch(e){t(e)}}))},99650:function(e,t,i){if(i.d(t,{B:()=>_,Ch:()=>l,Lr:()=>p,Mw:()=>g,T9:()=>m,Xn:()=>v,i4:()=>h,jU:()=>d,kU:()=>s,nk:()=>c,ou:()=>k,qW:()=>r,r:()=>f,sF:()=>n,z9:()=>w,zj:()=>y}),66977!=i.j)var a=i(86190);var o=i(43546);const n=66977!=i.j?[1,2,3,4,6,8]:null,r=2,s="hls",d="web_rtc",l=(e,t,i)=>`${e}&width=${t}&height=${i}`,c=e=>`/api/camera_proxy_stream/${e.entity_id}?token=${e.attributes.access_token}`,h=async(e,t,i,o)=>{const n=await(0,a.U)("_cameraTmbUrl",9e3,u,e,t);return l(n,i,o)},u=async(e,t)=>{const i=await(0,o.iI)(e,`/api/camera_proxy/${t}`);return e.hassUrl(i.path)},p=async(e,t,i)=>{const a={type:"camera/stream",entity_id:t};i&&(a.format=i);const o=await e.callWS(a);return o.url=e.hassUrl(o.url),o},m=(e,t,i,a)=>e.connection.subscribeMessage(a,{type:"camera/webrtc/offer",entity_id:t,offer:i}),f=(e,t,i,a)=>e.callWS({type:"camera/webrtc/candidate",entity_id:t,session_id:i,candidate:a}),v=(e,t)=>e.callWS({type:"camera/get_prefs",entity_id:t}),g=(e,t,i)=>e.callWS({type:"camera/update_prefs",entity_id:t,...i}),b="media-source://camera/",_=e=>e.startsWith(b),y=e=>e.substring(22),k=async(e,t)=>e.callWS({type:"camera/capabilities",entity_id:t}),w=async(e,t)=>e.callWS({type:"camera/webrtc/get_client_config",entity_id:t})},94616:function(e,t,i){i.d(t,{AC:()=>g,AV:()=>l,De:()=>p,H9:()=>u,LI:()=>d,LV:()=>m,Mc:()=>c,QD:()=>v,VU:()=>o,_Y:()=>a,_t:()=>s,bi:()=>r,dV:()=>f,dn:()=>h,u_:()=>n});const a=({hass:e,...t})=>e.callApi("POST","cloud/login",t),o=e=>e.callApi("POST","cloud/logout"),n=(e,t)=>e.callApi("POST","cloud/forgot_password",{email:t}),r=(e,t,i)=>e.callApi("POST","cloud/register",{email:t,password:i}),s=(e,t)=>e.callApi("POST","cloud/resend_confirm",{email:t}),d=e=>e.callWS({type:"cloud/status"}),l=(e,t)=>e.callWS({type:"cloud/cloudhook/create",webhook_id:t}),c=(e,t)=>e.callWS({type:"cloud/cloudhook/delete",webhook_id:t}),h=e=>e.callWS({type:"cloud/remote/connect"}),u=e=>e.callWS({type:"cloud/remote/disconnect"}),p=e=>e.callWS({type:"cloud/subscription"}),m=(e,t)=>e.callWS({type:"cloud/update_prefs",...t}),f=e=>e.callWS({type:"cloud/remove_data"}),v=(e,t,i)=>e.callWS({type:"cloud/google_assistant/entities/update",entity_id:t,disable_2fa:i}),g=e=>e.callApi("GET","cloud/support_package")},80654:function(e,t,i){i.d(t,{g:()=>r});const a=window;"customIconsets"in a||(a.customIconsets={});const o=a.customIconsets,n=window;"customIcons"in n||(n.customIcons={});const r=new Proxy(n.customIcons,{get:(e,t)=>e[t]??(o[t]?{getIcon:o[t]}:void 0)})},96194:function(e,t,i){i.d(t,{ON:()=>r,PX:()=>s,V_:()=>d,lz:()=>n,nZ:()=>o,rk:()=>c});var a=i(92636);const o="unavailable",n="unknown",r="on",s="off",d=[o,n],l=[o,n,s],c=(0,a.z)(d);(0,a.z)(l)},89890:function(e,t,i){i.d(t,{DQ:()=>y,Fn:()=>f,Mj:()=>b,N8:()=>m,WL:()=>k,fI:()=>w,kr:()=>x,qV:()=>C,rs:()=>g,xt:()=>_,yZ:()=>p,zz:()=>v});i(92745);if(66977!=i.j)var a=i(75278);var o=i(5839),n=i(96194);if(66977!=i.j)var r=i(58968);const s="M11,14C12,14 13.05,14.16 14.2,14.44C13.39,15.31 13,16.33 13,17.5C13,18.39 13.25,19.23 13.78,20H3V18C3,16.81 3.91,15.85 5.74,15.12C7.57,14.38 9.33,14 11,14M11,12C9.92,12 9,11.61 8.18,10.83C7.38,10.05 7,9.11 7,8C7,6.92 7.38,6 8.18,5.18C9,4.38 9.92,4 11,4C12.11,4 13.05,4.38 13.83,5.18C14.61,6 15,6.92 15,8C15,9.11 14.61,10.05 13.83,10.83C13.05,11.61 12.11,12 11,12M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",d="M14,19H18V5H14M6,19H10V5H6V19Z",l="M8,5.14V19.14L19,12.14L8,5.14Z",c="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",h="M18,18H6V6H18V18Z",u="M8.16,3L6.75,4.41L9.34,7H4C2.89,7 2,7.89 2,9V19C2,20.11 2.89,21 4,21H20C21.11,21 22,20.11 22,19V9C22,7.89 21.11,7 20,7H14.66L17.25,4.41L15.84,3L12,6.84L8.16,3M4,9H17V19H4V9M19.5,9A1,1 0 0,1 20.5,10A1,1 0 0,1 19.5,11A1,1 0 0,1 18.5,10A1,1 0 0,1 19.5,9M19.5,12A1,1 0 0,1 20.5,13A1,1 0 0,1 19.5,14A1,1 0 0,1 18.5,13A1,1 0 0,1 19.5,12Z";let p=function(e){return e[e.PAUSE=1]="PAUSE",e[e.SEEK=2]="SEEK",e[e.VOLUME_SET=4]="VOLUME_SET",e[e.VOLUME_MUTE=8]="VOLUME_MUTE",e[e.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",e[e.NEXT_TRACK=32]="NEXT_TRACK",e[e.TURN_ON=128]="TURN_ON",e[e.TURN_OFF=256]="TURN_OFF",e[e.PLAY_MEDIA=512]="PLAY_MEDIA",e[e.VOLUME_STEP=1024]="VOLUME_STEP",e[e.SELECT_SOURCE=2048]="SELECT_SOURCE",e[e.STOP=4096]="STOP",e[e.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",e[e.PLAY=16384]="PLAY",e[e.SHUFFLE_SET=32768]="SHUFFLE_SET",e[e.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",e[e.BROWSE_MEDIA=131072]="BROWSE_MEDIA",e[e.REPEAT_SET=262144]="REPEAT_SET",e[e.GROUPING=524288]="GROUPING",e}({});const m="browser",f={album:{icon:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12,16.5C9.5,16.5 7.5,14.5 7.5,12C7.5,9.5 9.5,7.5 12,7.5C14.5,7.5 16.5,9.5 16.5,12C16.5,14.5 14.5,16.5 12,16.5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",layout:"grid"},app:{icon:"M21 2H3C1.9 2 1 2.9 1 4V20C1 21.1 1.9 22 3 22H21C22.1 22 23 21.1 23 20V4C23 2.9 22.1 2 21 2M21 7H3V4H21V7Z",layout:"grid",show_list_images:!0},artist:{icon:s,layout:"grid",show_list_images:!0},channel:{icon:u,thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},composer:{icon:"M11,4A4,4 0 0,1 15,8A4,4 0 0,1 11,12A4,4 0 0,1 7,8A4,4 0 0,1 11,4M11,6A2,2 0 0,0 9,8A2,2 0 0,0 11,10A2,2 0 0,0 13,8A2,2 0 0,0 11,6M11,13C12.1,13 13.66,13.23 15.11,13.69C14.5,14.07 14,14.6 13.61,15.23C12.79,15.03 11.89,14.9 11,14.9C8.03,14.9 4.9,16.36 4.9,17V18.1H13.04C13.13,18.8 13.38,19.44 13.76,20H3V17C3,14.34 8.33,13 11,13M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z",layout:"grid",show_list_images:!0},contributing_artist:{icon:s,layout:"grid",show_list_images:!0},directory:{icon:"M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",layout:"grid",show_list_images:!0},episode:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},game:{icon:"M7,6H17A6,6 0 0,1 23,12A6,6 0 0,1 17,18C15.22,18 13.63,17.23 12.53,16H11.47C10.37,17.23 8.78,18 7,18A6,6 0 0,1 1,12A6,6 0 0,1 7,6M6,9V11H4V13H6V15H8V13H10V11H8V9H6M15.5,12A1.5,1.5 0 0,0 14,13.5A1.5,1.5 0 0,0 15.5,15A1.5,1.5 0 0,0 17,13.5A1.5,1.5 0 0,0 15.5,12M18.5,9A1.5,1.5 0 0,0 17,10.5A1.5,1.5 0 0,0 18.5,12A1.5,1.5 0 0,0 20,10.5A1.5,1.5 0 0,0 18.5,9Z",layout:"grid",thumbnail_ratio:"portrait"},genre:{icon:"M8.11,19.45C5.94,18.65 4.22,16.78 3.71,14.35L2.05,6.54C1.81,5.46 2.5,4.4 3.58,4.17L13.35,2.1L13.38,2.09C14.45,1.88 15.5,2.57 15.72,3.63L16.07,5.3L20.42,6.23H20.45C21.5,6.47 22.18,7.53 21.96,8.59L20.3,16.41C19.5,20.18 15.78,22.6 12,21.79C10.42,21.46 9.08,20.61 8.11,19.45V19.45M20,8.18L10.23,6.1L8.57,13.92V13.95C8,16.63 9.73,19.27 12.42,19.84C15.11,20.41 17.77,18.69 18.34,16L20,8.18M16,16.5C15.37,17.57 14.11,18.16 12.83,17.89C11.56,17.62 10.65,16.57 10.5,15.34L16,16.5M8.47,5.17L4,6.13L5.66,13.94L5.67,13.97C5.82,14.68 6.12,15.32 6.53,15.87C6.43,15.1 6.45,14.3 6.62,13.5L7.05,11.5C6.6,11.42 6.21,11.17 6,10.81C6.06,10.2 6.56,9.66 7.25,9.5C7.33,9.5 7.4,9.5 7.5,9.5L8.28,5.69C8.32,5.5 8.38,5.33 8.47,5.17M15.03,12.23C15.35,11.7 16.03,11.42 16.72,11.57C17.41,11.71 17.91,12.24 18,12.86C17.67,13.38 17,13.66 16.3,13.5C15.61,13.37 15.11,12.84 15.03,12.23M10.15,11.19C10.47,10.66 11.14,10.38 11.83,10.53C12.5,10.67 13.03,11.21 13.11,11.82C12.78,12.34 12.11,12.63 11.42,12.5C10.73,12.33 10.23,11.8 10.15,11.19M11.97,4.43L13.93,4.85L13.77,4.05L11.97,4.43Z",layout:"grid",show_list_images:!0},image:{icon:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z",layout:"grid",show_list_images:!0},movie:{icon:"M18,4L20,8H17L15,4H13L15,8H12L10,4H8L10,8H7L5,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V4H18Z",thumbnail_ratio:"portrait",layout:"grid",show_list_images:!0},music:{icon:"M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z",show_list_images:!0},playlist:{icon:"M15,6H3V8H15V6M15,10H3V12H15V10M3,16H11V14H3V16M17,6V14.18C16.69,14.07 16.35,14 16,14A3,3 0 0,0 13,17A3,3 0 0,0 16,20A3,3 0 0,0 19,17V8H22V6H17Z",layout:"grid",show_list_images:!0},podcast:{icon:"M17,18.25V21.5H7V18.25C7,16.87 9.24,15.75 12,15.75C14.76,15.75 17,16.87 17,18.25M12,5.5A6.5,6.5 0 0,1 18.5,12C18.5,13.25 18.15,14.42 17.54,15.41L16,14.04C16.32,13.43 16.5,12.73 16.5,12C16.5,9.5 14.5,7.5 12,7.5C9.5,7.5 7.5,9.5 7.5,12C7.5,12.73 7.68,13.43 8,14.04L6.46,15.41C5.85,14.42 5.5,13.25 5.5,12A6.5,6.5 0 0,1 12,5.5M12,1.5A10.5,10.5 0 0,1 22.5,12C22.5,14.28 21.77,16.39 20.54,18.11L19.04,16.76C19.96,15.4 20.5,13.76 20.5,12A8.5,8.5 0 0,0 12,3.5A8.5,8.5 0 0,0 3.5,12C3.5,13.76 4.04,15.4 4.96,16.76L3.46,18.11C2.23,16.39 1.5,14.28 1.5,12A10.5,10.5 0 0,1 12,1.5M12,9.5A2.5,2.5 0 0,1 14.5,12A2.5,2.5 0 0,1 12,14.5A2.5,2.5 0 0,1 9.5,12A2.5,2.5 0 0,1 12,9.5Z",layout:"grid"},season:{icon:u,layout:"grid",thumbnail_ratio:"portrait",show_list_images:!0},track:{icon:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13,13H11V18A2,2 0 0,1 9,20A2,2 0 0,1 7,18A2,2 0 0,1 9,16C9.4,16 9.7,16.1 10,16.3V11H13V13M13,9V3.5L18.5,9H13Z"},tv_show:{icon:u,layout:"grid",thumbnail_ratio:"portrait"},url:{icon:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},video:{icon:"M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z",layout:"grid",show_list_images:!0}},v=(e,t,i,a)=>e.callWS({type:"media_player/browse_media",entity_id:t,media_content_id:i,media_content_type:a}),g=e=>{let t=e.attributes.media_position;return"playing"!==e.state?t:(t+=(Date.now()-new Date(e.attributes.media_position_updated_at).getTime())/1e3,t<0?0:t)},b=e=>{let t;switch(e.attributes.media_content_type){case"music":case"image":t=e.attributes.media_artist;break;case"playlist":t=e.attributes.media_playlist||e.attributes.media_artist;break;case"tvshow":t=e.attributes.media_series_title,e.attributes.media_season&&(t+=" S"+e.attributes.media_season,e.attributes.media_episode&&(t+="E"+e.attributes.media_episode));break;case"channel":t=e.attributes.media_channel;break;default:t=e.attributes.app_name||""}return t},_=(e,t=!1)=>{if(!e)return;const i=e.state;if((0,n.rk)(i))return;if(!(0,o.v)(e))return(0,a.e)(e,p.TURN_ON)?[{icon:c,action:"turn_on"}]:void 0;const r=[];(0,a.e)(e,p.TURN_OFF)&&r.push({icon:c,action:"turn_off"});const s=!0===e.attributes.assumed_state,u=e.attributes;return("playing"===i||"paused"===i||s)&&(0,a.e)(e,p.SHUFFLE_SET)&&t&&r.push({icon:!0===u.shuffle?"M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z":"M16,4.5V7H5V9H16V11.5L19.5,8M16,12.5V15H5V17H16V19.5L19.5,16",action:"shuffle_set"}),("playing"===i||"paused"===i||s)&&(0,a.e)(e,p.PREVIOUS_TRACK)&&r.push({icon:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z",action:"media_previous_track"}),!s&&("playing"===i&&((0,a.e)(e,p.PAUSE)||(0,a.e)(e,p.STOP))||("paused"===i||"idle"===i)&&(0,a.e)(e,p.PLAY)||"on"===i&&((0,a.e)(e,p.PLAY)||(0,a.e)(e,p.PAUSE)))&&r.push({icon:"on"===i?"M3,5V19L11,12M13,19H16V5H13M18,5V19H21V5":"playing"!==i?l:(0,a.e)(e,p.PAUSE)?d:h,action:"playing"!==i?"media_play":(0,a.e)(e,p.PAUSE)?"media_pause":"media_stop"}),s&&(0,a.e)(e,p.PLAY)&&r.push({icon:l,action:"media_play"}),s&&(0,a.e)(e,p.PAUSE)&&r.push({icon:d,action:"media_pause"}),s&&(0,a.e)(e,p.STOP)&&r.push({icon:h,action:"media_stop"}),("playing"===i||"paused"===i||s)&&(0,a.e)(e,p.NEXT_TRACK)&&r.push({icon:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z",action:"media_next_track"}),("playing"===i||"paused"===i||s)&&(0,a.e)(e,p.REPEAT_SET)&&t&&r.push({icon:"all"===u.repeat?"M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"one"===u.repeat?"M13,15V9H12L10,10V11H11.5V15M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z":"M2,5.27L3.28,4L20,20.72L18.73,22L15.73,19H7V22L3,18L7,14V17H13.73L7,10.27V11H5V8.27L2,5.27M17,13H19V17.18L17,15.18V13M17,5V2L21,6L17,10V7H8.82L6.82,5H17Z",action:"repeat_set"}),r.length>0?r:void 0},y=e=>{if(void 0===e||e===1/0)return"";let t=new Date(1e3*e).toISOString();return t=e>3600?t.substring(11,16):t.substring(14,19),t.replace(/^0+/,"").padStart(4,"0")},k=e=>{if(!e)return;const t=e.indexOf("?authSig=");let i=t>0?e.slice(0,t):e;return i.startsWith("http")&&(i=decodeURIComponent(i.split("/").pop())),i},w=(e,t,i)=>e.callService("media_player","volume_set",{entity_id:t,volume_level:i}),x=(e,t,i)=>e.callService("media_player",i,"shuffle_set"===i?{entity_id:t.entity_id,shuffle:!t.attributes.shuffle}:"repeat_set"===i?{entity_id:t.entity_id,repeat:"all"===t.attributes.repeat?"one":"off"===t.attributes.repeat?"all":"off"}:{entity_id:t.entity_id}),C=(e,t,i,a,o={})=>(!o.enqueue&&void 0===o.announce&&(0,r.b_)(i)&&(o.announce=!0),e.callService("media_player","play_media",{entity_id:t,media_content_id:i,media_content_type:a,...o}))},1079:function(e,t,i){i.d(t,{IB:()=>r,Qr:()=>d,aV:()=>n,b:()=>o,oE:()=>s,uy:()=>a});const a=(e,t)=>e.callWS({type:"media_source/resolve_media",media_content_id:t}),o=(e,t)=>e.callWS({type:"media_source/browse_media",media_content_id:t}),n=e=>e.startsWith("media-source://media_source"),r=e=>e.startsWith("media-source://image_upload"),s=async(e,t,i)=>{const a=new FormData;a.append("media_content_id",t),a.append("file",i);const o=await e.fetchWithAuth("/api/media_source/local_source/upload",{method:"POST",body:a});if(413===o.status)throw new Error(`Uploaded file is too large (${i.name})`);if(200!==o.status)throw new Error("Unknown error");return o.json()},d=async(e,t)=>e.callWS({type:"media_source/local_source/remove",media_content_id:t})},58968:function(e,t,i){i.d(t,{MV:()=>l,Wg:()=>s,Xk:()=>r,aT:()=>a,b_:()=>n,yP:()=>d});const a=(e,t)=>e.callApi("POST","tts_get_url",t),o="media-source://tts/",n=e=>e.startsWith(o),r=e=>e.substring(19),s=(e,t,i)=>e.callWS({type:"tts/engine/list",language:t,country:i}),d=(e,t)=>e.callWS({type:"tts/engine/get",engine_id:t}),l=(e,t,i)=>e.callWS({type:"tts/engine/voices",engine_id:t,language:i})},69919:function(e,t,i){i.a(e,(async function(e,a){try{i.d(t,{EX:()=>p,Fj:()=>w,M$:()=>x,SO:()=>m,Sk:()=>v,TN:()=>L,UJ:()=>g,Ym:()=>C,hF:()=>f});i(9359),i(56475),i(70104);var o=i(73358);if(99387==i.j)var n=i(73850);if(99387==i.j)var r=i(59847);var s=i(75278),d=i(50602),l=i(1416);if(99387==i.j)var c=i(76131);if(99387==i.j)var h=i(72473);var u=e([d]);d=(u.then?(await u)():u)[0];let p=function(e){return e[e.INSTALL=1]="INSTALL",e[e.SPECIFIC_VERSION=2]="SPECIFIC_VERSION",e[e.PROGRESS=4]="PROGRESS",e[e.BACKUP=8]="BACKUP",e[e.RELEASE_NOTES=16]="RELEASE_NOTES",e}({});const m=e=>(0,s.e)(e,p.PROGRESS)&&null!==e.attributes.update_percentage,f=(e,t=!1)=>(e.state===o.uo||t&&Boolean(e.attributes.skipped_version))&&(0,s.e)(e,p.INSTALL),v=e=>!!e.attributes.in_progress,g=(e,t)=>e.callWS({type:"update/release_notes",entity_id:t}),b="ioBroker Core",_="ioBroker Supervisor",y="ioBroker Operating System",k=(e,t)=>Object.values(e).filter((e=>"update"===(0,r.N)(e))).sort(((e,i)=>e.attributes.title===b?-3:i.attributes.title===b?3:e.attributes.title===y?-2:i.attributes.title===y?2:e.attributes.title===_?-1:i.attributes.title===_?1:(0,l.fe)(e.attributes.title||e.attributes.friendly_name||"",i.attributes.title||i.attributes.friendly_name||"",t))),w=(e,t=!1)=>k(e).filter((e=>f(e,t))),x=async(e,t)=>{const i=k(t.states,t.locale.language).map((e=>e.entity_id));if(!i.length)return void(0,c.showAlertDialog)(e,{title:t.localize("ui.panel.config.updates.no_update_entities.title"),text:t.localize("ui.panel.config.updates.no_update_entities.description"),warning:!0});(0,h.C)(e,{message:t.localize("ui.panel.config.updates.checking_updates")});let a=0;const o=await t.connection.subscribeEvents((i=>{"update"===(0,n.M)(i.data.entity_id)&&(a++,(0,h.C)(e,{message:t.localize("ui.panel.config.updates.updates_refreshed",{count:a})}))}),"state_changed");await t.callService("homeassistant","update_entity",{entity_id:i}),await new Promise((e=>{setTimeout(e,15e3)})),o(),0===a&&(0,h.C)(e,{message:t.localize("ui.panel.config.updates.no_new_updates")})},C=(e,t)=>{const i=e.state,a=e.attributes;if("off"===i){return a.latest_version&&a.skipped_version===a.latest_version?a.latest_version:t.formatEntityState(e)}if("on"===i&&v(e)){return(0,s.e)(e,p.PROGRESS)&&null!==a.update_percentage?t.localize("ui.card.update.installing_with_progress",{progress:(0,d.uf)(a.update_percentage,t.locale,{maximumFractionDigits:a.display_precision,minimumFractionDigits:a.display_precision})}):t.localize("ui.card.update.installing")}return t.formatEntityState(e)},L=(e,t)=>{const i=e.entity_id,a=t[i]?.domain;if("hassio"!==a)return"generic";const o=e.attributes.title||"";return o===b?"home_assistant":[b,_,y].includes(o)?"generic":"addon"};a()}catch(e){a(e)}}))},96530:function(e,t,i){i.d(t,{X:()=>n,y:()=>o});var a=i(92636);const o=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],n=(0,a.z)(o)},30511:function(e,t,i){i.r(t),i.d(t,{mdiHomeAssistant:()=>a});const a="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},16485:function(e,t,i){i.a(e,(async function(e,t){try{i(92745);var a=i(61449),o=i(40574),n=i(30532),r=i(41674),s=i(49722),d=i(76632),l=i(7884),c=i(35185),h=i(60933),u=i(44180),p=i(49447);const e=async()=>{const e=(0,u.sS)(),t=[];(0,n.shouldPolyfill)()&&await Promise.all([i.e("80210"),i.e("74055")]).then(i.bind(i,98133)),(0,s.shouldPolyfill)()&&await Promise.all([i.e("83895"),i.e("75297"),i.e("80210"),i.e("60251")]).then(i.bind(i,59095)),(0,a.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("68250")]).then(i.bind(i,80561)).then((()=>(0,p.H)()))),(0,h.shouldPolyfill)()&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("65578")]).then(i.bind(i,97995))),(0,o.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("59826")]).then(i.bind(i,31514))),(0,r.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("23649")]).then(i.bind(i,93840))),(0,d.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("42831")]).then(i.bind(i,29559))),(0,l.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("57377")]).then(i.bind(i,39030)).then((()=>i.e("61236").then(i.t.bind(i,4121,23))))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([i.e("83895"),i.e("75297"),i.e("13870")]).then(i.bind(i,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,p.n)(e)))};await e(),t()}catch(e){t(e)}}),1)},28008:function(e,t,i){i.d(t,{$c:()=>s,Qx:()=>n,k1:()=>o,yu:()=>r});var a=i(57243);const o=a.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=a.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)}${o} .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}`,r=a.iv`ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between}ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-dialog{--mdc-dialog-min-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-max-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-min-height:100%;--mdc-dialog-max-height:100%;--vertical-align-dialog:flex-end;--ha-dialog-border-radius:0}}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}.error{color:var(--error-color)}`,s=a.iv`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{-webkit-border-radius:4px;border-radius:4px;background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`;a.iv`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`},47641:function(e,t,i){i.d(t,{o:()=>a});const a=async()=>{await i.e("31026").then(i.bind(i,35714))}},88238:function(e,t,i){i.d(t,{RU:()=>o,X1:()=>a,u4:()=>n,zC:()=>r});const a=e=>`https://brands.home-assistant.io/${e.brand?"brands/":""}${e.useFallback?"_/":""}${e.domain}/${e.darkOptimized?"dark_":""}${e.type}.png`,o=e=>`https://brands.home-assistant.io/hardware/${e.category}/${e.darkOptimized?"dark_":""}${e.manufacturer}${e.model?`_${e.model}`:""}.png`,n=e=>e.split("/")[4],r=e=>e.startsWith("https://brands.home-assistant.io/")},73192:function(e,t,i){i.d(t,{R:()=>a});const a=(e,t)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`}};
//# sourceMappingURL=91310.0e7e4a8d0e94abd4.js.map