UNPKG

iobroker.lovelace

Version:

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

23 lines 24.5 kB
/*! For license information please see 9374.c3188b1ff306ffe6.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[9374],{75064:function(t,e,i){i(62953);var o=i(40445),s=i(5124),a=i(67576),r=i(2846);let l;class n extends r.G{constructor(...t){super(...t),this.borderTop=!1}}n.styles=[...r.J,(0,s.AH)(l||(l=(t=>t)`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var( --mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family) );color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`))],(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],n.prototype,"borderTop",void 0),n=(0,o.Cg)([(0,a.EM)("ha-combo-box-item")],n)},3449:function(t,e,i){i(62953);var o=i(40445),s=i(5124),a=i(67576);let r,l,n=t=>t;class d extends s.WF{render(){return(0,s.qy)(r||(r=n`<slot></slot>`))}constructor(...t){super(...t),this.disabled=!1}}d.styles=(0,s.AH)(l||(l=n`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var( --mdc-typography-caption-letter-spacing, .0333333333em );line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`)),(0,o.Cg)([(0,a.MZ)({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),d=(0,o.Cg)([(0,a.EM)("ha-input-helper-text")],d)},2846:function(t,e,i){i.d(e,{G:function(){return p},J:function(){return h}});var o=i(40445),s=i(58168),a=i(82553),r=i(5124),l=i(67576);i(54276);let n,d,c=t=>t;const h=[a.R,(0,r.AH)(n||(n=c`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`))];class p extends s.n{renderRipple(){return"text"===this.type?r.s6:(0,r.qy)(d||(d=c`<ha-ripple part="ripple" for="item" ?disabled="${0}"></ha-ripple>`),this.disabled&&"link"!==this.type)}}p.styles=h,p=(0,o.Cg)([(0,l.EM)("ha-md-list-item")],p)},88285:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);var o=i(40445),s=i(35211),a=i(5124),r=i(67576),l=i(63672),n=i(1087),d=i(22792),c=i(17894),h=(i(75064),i(47680),i(26300)),p=t([h]);h=(p.then?(await p)():p)[0];let m,u,y,g,v,f,b,x,w,$,C=t=>t;const k="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",_="M7,10L12,15L17,10H7Z";class M extends((0,c.c)(a.WF)){async focus(){var t;await this.updateComplete,await(null===(t=this.item)||void 0===t?void 0:t.focus())}render(){var t,e,i,o;const s=!!this.value,r=!(!this.value||this.required||this.disabled||this.hideClearIcon),n=null!==(t=this.placeholder)&&void 0!==t?t:this.label,d=this.label&&s?(0,a.qy)(m||(m=C`<span slot="overline">${0}${0}</span>`),this.label,this.required?" *":""):a.s6,c=s?this.valueRenderer?this.valueRenderer(null!==(e=this.value)&&void 0!==e?e:""):(0,a.qy)(u||(u=C`<span slot="headline">${0}</span>`),this.value):n?(0,a.qy)(y||(y=C`<span slot="headline" class="placeholder"> ${0}${0} </span>`),n,this.required?" *":""):a.s6;return(0,a.qy)(g||(g=C` <ha-combo-box-item aria-label="${0}" .disabled="${0}" type="button" compact="compact"> ${0} ${0}${0} ${0} ${0} <ha-svg-icon class="arrow" slot="end" .path="${0}"></ha-svg-icon> </ha-combo-box-item> `),(0,l.J)(this.label||this.placeholder),this.disabled,this.image?(0,a.qy)(v||(v=C`<img alt="${0}" slot="start" .src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer">`),null!==(i=this.label)&&void 0!==i?i:"",this.image):this.icon?(0,a.qy)(f||(f=C`<ha-icon slot="start" .icon="${0}"></ha-icon>`),this.icon):(0,a.qy)(b||(b=C`<slot name="start"></slot>`)),d,c,this.unknown?(0,a.qy)(x||(x=C`<div slot="supporting-text" class="unknown"> ${0} </div>`),this.unknownItemText||(null===(o=this._i18n)||void 0===o?void 0:o.localize("ui.components.combo-box.unknown_item"))):a.s6,r?(0,a.qy)(w||(w=C` <ha-icon-button class="clear" slot="end" @click="${0}" .path="${0}"></ha-icon-button> `),this._clear,k):a.s6,_)}_clear(t){t.stopPropagation(),(0,n.r)(this,"clear")}static get styles(){return[(0,a.AH)($||($=C`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`))]}constructor(...t){super(...t),this.invalid=!1}}(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],M.prototype,"invalid",void 0),(0,o.Cg)([(0,r.P)("ha-combo-box-item",!0)],M.prototype,"item",void 0),(0,o.Cg)([(0,r.wk)(),(0,s.Fg)({context:d.D5,subscribe:!0})],M.prototype,"_i18n",void 0),M=(0,o.Cg)([(0,r.EM)("ha-picker-field")],M),e()}catch(m){e(m)}})},606:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(18111),i(61701),i(62953);var o=i(40445),s=i(5124),a=i(67576),r=i(63672),l=i(22786),n=i(1087),d=i(29823),c=(i(70947),i(3449),i(88285)),h=(i(67094),t([d,c]));[d,c]=h.then?(await h)():h;let p,m,u,y,g,v,f,b,x,w=t=>t;class $ extends s.WF{render(){return this.disabled?(0,s.qy)(p||(p=w`${0}${0}`),this._renderField(),this._renderHelper()):(0,s.qy)(m||(m=w` <ha-dropdown placement="bottom" @wa-select="${0}" @wa-show="${0}" @wa-hide="${0}"> ${0} ${0} </ha-dropdown> ${0} `),this._handleSelect,this._handleShow,this._handleHide,this._renderField(),this.options?this.options.map(t=>{var e;const i=["string","number"].includes(typeof t);return(0,s.qy)(u||(u=w` <ha-dropdown-item .value="${0}" .disabled="${0}" .selected="${0}"> ${0} <div class="content"> ${0} ${0} </div> </ha-dropdown-item> `),i?t:t.value,!i&&(null!==(e=t.disabled)&&void 0!==e&&e),this.value===(i?t:t.value),t.iconPath?(0,s.qy)(y||(y=w`<ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon>`),t.iconPath):s.s6,i?t:t.label||t.value,t.secondary?(0,s.qy)(g||(g=w`<div class="secondary">${0}</div>`),t.secondary):s.s6)}):(0,s.qy)(v||(v=w`<slot></slot>`)),this._renderHelper())}_renderField(){const t=this._getValueLabel(this.options,this.value);return(0,s.qy)(f||(f=w` <ha-picker-field slot="trigger" type="button" class="${0}" compact="compact" aria-label="${0}" @clear="${0}" .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" .hideClearIcon="${0}"> </ha-picker-field> `),this._opened?"opened":"",(0,r.J)(this.label),this._clearValue,this.label,t,this.required,this.disabled,!this.clearable||this.required||this.disabled||!String(this.value))}_renderHelper(){return this.helper?(0,s.qy)(b||(b=w`<ha-input-helper-text .disabled="${0}">${0}</ha-input-helper-text>`),this.disabled,this.helper):s.s6}_handleSelect(t){t.stopPropagation();const e=t.detail.item.value;e!==this.value&&(0,n.r)(this,"selected",{value:e})}_clearValue(){!this.disabled&&this.value&&(0,n.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...t){super(...t),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,l.A)((t,e)=>{const i=void 0!==e?String(e):void 0;if(!t||!i)return i;for(const o of t){const t=["string","number"].includes(typeof o);if(t&&o===i||!t&&String(o.value)===i)return t?o:o.label||o.value}return i})}}$.styles=(0,s.AH)(x||(x=w`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`)),(0,o.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"clearable",void 0),(0,o.Cg)([(0,a.MZ)({attribute:!1})],$.prototype,"options",void 0),(0,o.Cg)([(0,a.MZ)()],$.prototype,"label",void 0),(0,o.Cg)([(0,a.MZ)()],$.prototype,"helper",void 0),(0,o.Cg)([(0,a.MZ)()],$.prototype,"value",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"required",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean})],$.prototype,"disabled",void 0),(0,o.Cg)([(0,a.wk)()],$.prototype,"_opened",void 0),(0,o.Cg)([(0,a.P)("ha-picker-field")],$.prototype,"_triggerField",void 0),$=(0,o.Cg)([(0,a.EM)("ha-select")],$),e()}catch(p){e(p)}})},97078:function(t,e,i){i.d(e,{w:function(){return o}});const o=(t,e,i)=>t.callService("select","select_option",{option:i},{entity_id:e})},17894:function(t,e,i){i.d(e,{c:function(){return a}});i(62953);var o=i(40445),s=i(67576);const a=t=>{class e extends t{constructor(...t){super(...t),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,o.Cg)([(0,s.MZ)({type:Boolean})],e.prototype,"disabled",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],e.prototype,"required",void 0),(0,o.Cg)([(0,s.MZ)()],e.prototype,"icon",void 0),(0,o.Cg)([(0,s.MZ)()],e.prototype,"image",void 0),(0,o.Cg)([(0,s.MZ)()],e.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)()],e.prototype,"placeholder",void 0),(0,o.Cg)([(0,s.MZ)()],e.prototype,"helper",void 0),(0,o.Cg)([(0,s.MZ)()],e.prototype,"value",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],e.prototype,"unknown",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"unknown-item-text"})],e.prototype,"unknownItemText",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"hide-clear-icon",type:Boolean})],e.prototype,"hideClearIcon",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],e.prototype,"valueRenderer",void 0),e}},78157:function(t,e,i){i.a(t,async function(t,o){try{i.r(e);i(16280),i(74423),i(18111),i(61701),i(3362),i(9391);var s=i(40445),a=i(5124),r=i(67576),l=i(606),n=i(22675),d=i(88360),c=i(97078),h=i(784),p=i(79757),m=i(85979),u=t([l,p,m]);[l,p,m]=u.then?(await u)():u;let y,g,v,f=t=>t;class b extends a.WF{setConfig(t){if(!t||!t.entity)throw new Error("Entity must be specified");this._config=t}shouldUpdate(t){return(0,h.LX)(this,t)||t.has("_selectedEntityRow")}willUpdate(t){super.willUpdate(t),this.hass&&this._config&&t.get("hass")&&this.hass.states[this._config.entity]!==t.get("hass").states[this._config.entity]&&(this._selectedEntityRow=void 0)}render(){var t;if(!this.hass||!this._config)return a.s6;const e=this.hass.states[this._config.entity];if(!e)return(0,a.qy)(y||(y=f` <hui-warning .hass="${0}"> ${0} </hui-warning> `),this.hass,(0,m.j)(this.hass,this._config.entity));const i=this.hass.formatEntityName(e,this._config.name);return(0,a.qy)(g||(g=f` <hui-generic-entity-row .hass="${0}" .config="${0}" hide-name> <ha-select .label="${0}" .value="${0}" .options="${0}" .disabled="${0}" @selected="${0}"> </ha-select> </hui-generic-entity-row> `),this.hass,this._config,i,this._selectedEntityRow||e.state,null===(t=e.attributes.options)||void 0===t?void 0:t.map(t=>({value:t,label:this.hass.formatEntityState(e,t)})),e.state===n.Hh,this._handleAction)}_handleAction(t){const e=this.hass.states[this._config.entity],i=t.detail.value;i!==e.state&&e.attributes.options.includes(i)&&((0,d.j)(this,"light"),this._selectedEntityRow=i,(0,c.w)(this.hass,e.entity_id,i).catch(t=>{}).finally(()=>setTimeout(()=>{this.hass.states[this._config.entity]===e&&(this._selectedEntityRow=void 0)},2e3)))}}b.styles=(0,a.AH)(v||(v=f`hui-generic-entity-row{display:flex;align-items:center}ha-select{width:100%;--ha-select-min-width:0}`)),(0,s.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,s.Cg)([(0,r.wk)()],b.prototype,"_config",void 0),(0,s.Cg)([(0,r.wk)()],b.prototype,"_selectedEntityRow",void 0),b=(0,s.Cg)([(0,r.EM)("hui-select-entity-row")],b),o()}catch(y){o(y)}})},9391:function(t,e,i){var o=i(46518),s=i(96395),a=i(80550),r=i(79039),l=i(97751),n=i(94901),d=i(2293),c=i(93438),h=i(36840),p=a&&a.prototype;if(o({target:"Promise",proto:!0,real:!0,forced:!!a&&r(function(){p.finally.call({then:function(){}},function(){})})},{finally:function(t){var e=d(this,l("Promise")),i=n(t);return this.then(i?function(i){return c(e,t()).then(function(){return i})}:t,i?function(i){return c(e,t()).then(function(){throw i})}:t)}}),!s&&n(a)){var m=l("Promise").prototype.finally;p.finally!==m&&h(p,"finally",m,{unsafe:!0})}},82553:function(t,e,i){i.d(e,{R:function(){return s}});let o;const s=(0,i(5124).AH)(o||(o=(t=>t)`:host{display:flex;-webkit-tap-highlight-color:transparent;--md-ripple-hover-color:var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity:var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color:var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity:var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape:8px}a,button,li{background:0 0;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:0;-webkit-tap-highlight-color:transparent;width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, .3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color,var(--md-sys-color-on-surface,#1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight,var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400)));min-height:var(--md-list-item-one-line-container-height,56px);padding-top:var(--md-list-item-top-space,12px);padding-bottom:var(--md-list-item-bottom-space,12px);padding-inline-start:var(--md-list-item-leading-space,16px);padding-inline-end:var(--md-list-item-trailing-space,16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height,72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, .875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight,var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, .6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight,var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}@media(forced-colors:active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}`))},58168:function(t,e,i){i.d(e,{n:function(){return q}});i(62953);var o=i(40445),s=(i(75275),i(67576)),a=(i(27495),i(5124));let r,l=t=>t;class n extends a.WF{render(){return(0,a.qy)(r||(r=l` <slot name="container"></slot> <slot class="non-text" name="start"></slot> <div class="text"> <slot name="overline" @slotchange="${0}"></slot> <slot class="default-slot" @slotchange="${0}"></slot> <slot name="headline" @slotchange="${0}"></slot> <slot name="supporting-text" @slotchange="${0}"></slot> </div> <slot class="non-text" name="trailing-supporting-text"></slot> <slot class="non-text" name="end"></slot> `),this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange)}handleTextSlotChange(){let t=!1,e=0;for(const i of this.textSlots)if(d(i)&&(e+=1),e>1){t=!0;break}this.multiline=t}constructor(){super(...arguments),this.multiline=!1}}function d(t){for(const i of t.assignedNodes({flatten:!0})){var e;const t=i.nodeType===Node.ELEMENT_NODE,o=i.nodeType===Node.TEXT_NODE&&(null===(e=i.textContent)||void 0===e?void 0:e.match(/\S/));if(t||o)return!0}return!1}(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],n.prototype,"multiline",void 0),(0,o.Cg)([(0,s.YG)(".text slot")],n.prototype,"textSlots",void 0);let c;const h=(0,a.AH)(c||(c=(t=>t)`:host{color:var(--md-sys-color-on-surface,#1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, .875rem);font-weight:var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}`));let p=class extends n{};p.styles=[h],p=(0,o.Cg)([(0,s.EM)("md-item")],p);i(71970);var m=i(6412),u=i(7872),y=i(1024),g=i(27525);let v,f,b,x,w,$,C,k,_=t=>t;const M=(0,y.n)(a.WF);class q extends M{get isDisabled(){return this.disabled&&"link"!==this.type}willUpdate(t){this.href&&(this.type="link"),super.willUpdate(t)}render(){return this.renderListItem((0,a.qy)(v||(v=_` <md-item> <div slot="container"> ${0} ${0} </div> <slot name="start" slot="start"></slot> <slot name="end" slot="end"></slot> ${0} </md-item> `),this.renderRipple(),this.renderFocusRing(),this.renderBody()))}renderListItem(t){const e="link"===this.type;let i;switch(this.type){case"link":i=(0,u.eu)(f||(f=_`a`));break;case"button":i=(0,u.eu)(b||(b=_`button`));break;default:i=(0,u.eu)(x||(x=_`li`))}const o="text"!==this.type,s=e&&this.target?this.target:a.s6;return(0,u.qy)(w||(w=_` <${0} id="item" tabindex="${0}" ?disabled=${0} role="listitem" aria-selected=${0} aria-checked=${0} aria-expanded=${0} aria-haspopup=${0} class="list-item ${0}" href=${0} target=${0} @focus=${0} >${0}</${0}> `),i,this.isDisabled||!o?-1:0,this.isDisabled,this.ariaSelected||a.s6,this.ariaChecked||a.s6,this.ariaExpanded||a.s6,this.ariaHasPopup||a.s6,(0,m.H)(this.getRenderClasses()),this.href||a.s6,s,this.onFocus,t,i)}renderRipple(){return"text"===this.type?a.s6:(0,a.qy)($||($=_` <md-ripple part="ripple" for="item" ?disabled="${0}"></md-ripple>`),this.isDisabled)}renderFocusRing(){return"text"===this.type?a.s6:(0,a.qy)(C||(C=_` <md-focus-ring @visibility-changed="${0}" part="focus-ring" for="item" inward></md-focus-ring>`),this.onFocusRingVisibilityChanged)}onFocusRingVisibilityChanged(t){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return(0,a.qy)(k||(k=_` <slot></slot> <slot name="overline" slot="overline"></slot> <slot name="headline" slot="headline"></slot> <slot name="supporting-text" slot="supporting-text"></slot> <slot name="trailing-supporting-text" slot="trailing-supporting-text"></slot> `))}onFocus(){-1===this.tabIndex&&this.dispatchEvent((0,g.cG)())}focus(){var t;null===(t=this.listItemRoot)||void 0===t||t.focus()}click(){this.listItemRoot?this.listItemRoot.click():super.click()}constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}}q.shadowRootOptions=Object.assign(Object.assign({},a.WF.shadowRootOptions),{},{delegatesFocus:!0}),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],q.prototype,"disabled",void 0),(0,o.Cg)([(0,s.MZ)({reflect:!0})],q.prototype,"type",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"md-list-item",reflect:!0})],q.prototype,"isListItem",void 0),(0,o.Cg)([(0,s.MZ)()],q.prototype,"href",void 0),(0,o.Cg)([(0,s.MZ)()],q.prototype,"target",void 0),(0,o.Cg)([(0,s.P)(".list-item")],q.prototype,"listItemRoot",void 0)}}]);