PageSourceSearch

https://aitor3ml.com/frontend_latest/85920.b297c8ba4311a30f.js

js aitor3ml.com collected 2026-09-25 22:34:03 UTC 37,079 bytes, 2 lines download raw bytes

1export const __rspack_esm_id=85920;export const __rspack_esm_ids=[85920];export const __webpack_modules__={90608(e,t,i){i.a(e,async function(e,a){try{var n=i(92684),s=i(47749),r=i(53104),l=e([n,r]);[n,r]=l.then?(await l)():l;const o=(0,s.A)((e,t)=>new Intl.RelativeTimeFormat(e.language,{numeric:"auto",style:t})),d=(e,t,i,a=!0,n="long")=>{const s=(0,r.x)(e,i,t);return a?o(t,n).format(s.value,s.unit):Intl.NumberFormat(t.language,{style:"unit",unit:s.unit,unitDisplay:n}).format(Math.abs(s.value))};i.d(t,{},{K:d}),a()}catch(e){a(e)}})},81121(e,t,i){i(18111),i(22489),i(13579);i.d(t,{},{$:e=>e.some(e=>"rejected"===e.status),N:e=>e.filter(e=>"rejected"===e.status)})},53104(e,t,i){i.a(e,async function(e,a){try{var n=i(65719),s=i(86451),r=i(55099),l=i(59955);const o=1e3,d=60,h=60*d;function c(e,t=Date.now(),i,a={}){const c={...p,...a||{}},u=(+e-+t)/o;if(Math.abs(u)<c.second)return{value:Math.round(u),unit:"second"};const v=u/d;if(Math.abs(v)<c.minute)return{value:Math.round(v),unit:"minute"};const g=u/h;if(Math.abs(g)<c.hour)return{value:Math.round(g),unit:"hour"};const m=new Date(e),f=new Date(t);m.setHours(0,0,0,0),f.setHours(0,0,0,0);const _=(0,n.c)(m,f);if(0===_)return{value:Math.round(g),unit:"hour"};if(Math.abs(_)<c.day)return{value:_,unit:"day"};const b=(0,l.P)(i),y=(0,s.k)(m,{weekStartsOn:b}),x=(0,s.k)(f,{weekStartsOn:b}),w=(0,r.I)(y,x);if(0===w)return{value:_,unit:"day"};if(Math.abs(w)<c.week)return{value:w,unit:"week"};const C=m.getFullYear()-f.getFullYear(),$=12*C+m.getMonth()-f.getMonth();return 0===$?{value:w,unit:"week"}:Math.abs($)<c.month||0===C?{value:$,unit:"month"}:{value:Math.round(C),unit:"year"}}const p={second:59,minute:59,hour:22,day:5,week:4,month:11};i.d(t,{x:()=>c}),a()}catch(u){a(u)}})},15754(e,t,i){i.a(e,async function(e,t){try{i(18111),i(61701);var a=i(28861),n=i(11467),s=i(82476),r=i(93584),l=i(73885),o=i(62228),d=i(59926),h=i(8399),c=(i(36008),i(6162)),p=(i(26e3),i(7407),i(26513)),u=e([c,p]);[c,p]=u.then?(await u)():u;class v extends n.WF{willUpdate(e){e.has("labels")&&(this._sortedLabels=[...this.labels].sort((e,t)=>(0,h.xL)(e.name,t.name)))}render(){const e=this._sortedLabels,t=e.slice(0,this._visibleCount),i=e.length-this._visibleCount;return n.qy` <div class="viewport"> <ha-chip-set> ${(0,r.u)(t,e=>e.label_id,e=>this._renderLabel(e,!0))} ${i>0?n.qy` <ha-dropdown role="button" tabindex="0" @click=${d.d} @wa-select=${this._handleDropdownSelect}> <ha-label slot="trigger" class="plus" dense> +${i} </ha-label> ${(0,r.u)(e.slice(this._visibleCount),e=>e.label_id,e=>n.qy` <ha-dropdown-item .value=${e.label_id} .item=${e}> ${this._renderLabel(e,!1)} </ha-dropdown-item> `)} </ha-dropdown> `:n.s6} </ha-chip-set> </div> <div class="measure" aria-hidden="true"> <ha-chip-set> ${(0,r.u)(e,e=>e.label_id,e=>n.qy` <div class="measure-chip" data-chip> ${this._renderLabel(e,!1)} </div> `)} <div class="measure-chip" data-plus> <ha-label class="plus" dense>+99</ha-label> </div> </ha-chip-set> </div> `}async firstUpdated(){await this.updateComplete,this._viewport&&this._resizeController.observe(this._viewport),await this._measureWidths(),this._recomputeVisibleCount(this._viewport?.clientWidth??0)}async updated(e){e.has("labels")&&(await this.updateComplete,await this._measureWidths(),this._recomputeVisibleCount(this._viewport?.clientWidth??0))}async _measureWidths(){await this.updateComplete;const e=this._measure;if(!e)return;const t=e.querySelector("ha-chip-set");if(t){const e=getComputedStyle(t),i=e.columnGap||e.gap;this._gap=i?parseFloat(i):0}const i=Array.from(e.querySelectorAll("[data-chip]")),a=e.querySelector("[data-plus]");this._chipWidths=i.map(e=>e.offsetWidth),this._plusWidth=a?.offsetWidth??0}_recomputeVisibleCount(e){if(!e||!this.labels?.length)return void(this._visibleCount=0);const t=this._sortedLabels.length;let i=0,a=0;for(let n=0;n<t;n++){const s=this._chipWidths[n]??0,r=0===a?s:i+this._gap+s;if(!(r+(t-(n+1)>0?this._gap+this._plusWidth:0)<=e))break;i=r,a++}this._visibleCount=a}_renderLabel(e,t){return n.qy` <ha-label dense role="button" tabindex="0" .color=${e.color} .item=${e} @click=${t?this._labelClicked:void 0} @keydown=${t?this._labelClicked:void 0} .description=${e.description}>
1 ${e?.icon?n.qy`<ha-icon slot="icon" .icon=${e.icon}></ha-icon>`:n.s6} ${e.name} </ha-label> `}_labelClicked(e){if(e.stopPropagation(),"keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;const t=e.currentTarget.item;(0,o.r)(this,"label-clicked",{label:t})}_handleDropdownSelect(e){const t=e.detail?.item?.item;t&&(0,o.r)(this,"label-clicked",{label:t})}constructor(...e){super(...e),this._visibleCount=0,this._sortedLabels=[],this._chipWidths=[],this._plusWidth=0,this._gap=8,this._resizeController=new l.P(this,{target:null,skipInitial:!0,callback:e=>{const t=e[0],i=t?.contentRect.width??0;return this._recomputeVisibleCount(i),i}})}}v.styles=n.AH`:host{flex-grow:1;min-width:0;height:22px;margin-top:4px;display:block;position:relative}.viewport{width:100%;min-width:0;overflow:hidden}ha-chip-set{flex-wrap:nowrap;align-items:center;min-width:0;display:flex;overflow:hidden}.measure{visibility:hidden;pointer-events:none;white-space:nowrap;position:absolute;inset:0 auto auto 0}.measure ha-chip-set{width:max-content;overflow:visible}.measure-chip{display:inline-flex}.plus{--ha-label-background-color:transparent;border:1px solid var(--divider-color)}`,(0,a.Cg)([(0,s.MZ)({attribute:!1})],v.prototype,"labels",void 0),(0,a.Cg)([(0,s.wk)()],v.prototype,"_visibleCount",void 0),(0,a.Cg)([(0,s.P)(".viewport")],v.prototype,"_viewport",void 0),(0,a.Cg)([(0,s.P)(".measure")],v.prototype,"_measure",void 0),v=(0,a.Cg)([(0,s.EM)("ha-data-table-labels")],v),t()}catch(e){t(e)}})},58095(e,t,i){i.a(e,async function(e,t){try{i(74423),i(18111),i(22489),i(7588),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var a=i(28861),n=i(63018),s=i(11467),r=i(82476),l=i(61062),o=i(47749),d=i(98710),h=i(7346),c=i(62228),p=i(74424),u=i(8399),v=i(742),g=i(78813),m=i(34817),f=(i(39369),i(63543)),_=(i(70773),i(55925),e([f]));f=(_.then?(await _)():_)[0];const b="M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z";class y extends s.WF{willUpdate(e){super.willUpdate(e),e.has("value")&&!(0,v.b)(this.value,e.get("value"))&&this._findRelated()}render(){return s.qy` <ha-expansion-panel left-chevron .expanded=${this.expanded} @expanded-changed=${this._expandedChanged}> <div slot="header" class="header"> ${this._localize("ui.panel.config.devices.caption")} ${this.value?.length?s.qy`<div class="badge">${this.value?.length}</div> <ha-icon-button .path=${b} @click=${this._clearFilter} @keydown=${this._handleClearFilterKeydown}></ha-icon-button>`:s.s6} </div> </ha-expansion-panel> ${this._panel.showContent?s.qy`<div class="content" ${(0,l.K)(this._content)}> <ha-input-search appearance="outlined" .value=${this._filter} @input=${this._handleSearchChange} @keydown=${this._handleSearchKeydown}> </ha-input-search> <ha-list-selectable-virtualized multi .rows=${this._devices(this._devicesReg,this._filter||"",this._localize,this._states,this._i18n.locale.language)} .rowRenderer=${this._renderItem} @ha-list-item-selected=${this._handleAdded} @ha-list-item-deselected=${this._handleRemoved}></ha-list-selectable-virtualized> </div>`:s.s6} `}_handleAdded(e){this.value=[...this.value??[],this._devices(this._devicesReg,this._filter||"",this._localize,this._states,this._i18n.locale.language)[e.detail].id]}_handleRemoved(e){const t=this._devices(this._devicesReg,this._filter||"",this._localize,this._states,this._i18n.locale.language)[e.detail].id;this.value=(this.value??[]).filter(e=>e!==t)}_expandedChanged(e){this.expanded=e.detail.expanded}_handleSearchChange(e){const t=e.target;this._filter=t.value??""}_handleSearchKeydown(e){"ArrowDown"===e.key&&this._listElement&&(e.preventDefault(),this._listElement.focus())}async _findRelated(){const e=[];if(!this.value?.length)return this.value=[],void(0,c.r)(this,"data-table-filter-changed",{value:[],items:void 0});const t=[];for(const i of this.value)t.push(i),this.type&&e.push((0,m.f)(this._api,"device",i));const i=await Promise.all(e),a=new Set;
1for(const e of i)e[this.type]&&e[this.type].forEach(e=>a.add(e));(0,c.r)(this,"data-table-filter-changed",{value:t,items:this.type?a:void 0})}_handleClearFilterKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.stopPropagation(),this._clearFilter(e))}_clearFilter(e){e.preventDefault(),this.value=void 0,(0,c.r)(this,"data-table-filter-changed",{value:void 0,items:void 0}),this._listElement?.clearSelection()}constructor(...e){super(...e),this.expanded=!1,this.narrow=!1,this._content=(0,l._)(),this._panel=new d.N(this,this._content),this._renderItem=e=>e?s.qy`<ha-list-item-option style="width:100%" appearance="checkbox" selection-position="end" .value=${e.id} .selected=${this.value?.includes(e.id)??!1}> <span slot="headline">${e.name}</span> </ha-list-item-option>`:s.s6,this._devices=(0,o.A)((e,t,i,a,n)=>Object.values(e).map(e=>({id:e.id,interactive:!0,name:(0,p.T)(e,i,a)})).filter(({name:e})=>!t||e.toLowerCase().includes(t.toLowerCase())).sort((e,t)=>(0,u.xL)(e.name,t.name,n)))}}y.styles=[d.h,s.AH`ha-list-selectable-virtualized{flex:1;min-height:0}.header{align-items:center;display:flex}.header ha-icon-button{margin-inline:auto 8px}.badge{margin-left:8px;box-sizing:border-box;border-radius:var(--ha-border-radius-circle);min-width:16px;font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);line-height:var(--ha-line-height-normal);text-align:center;color:var(--text-primary-color);margin-inline:8px 0;padding:0 2px;display:inline-block}ha-input-search{padding:var(--ha-space-1) var(--ha-space-2) 0;display:block}`],(0,a.Cg)([(0,r.wk)(),(0,h.IW)()],y.prototype,"_localize",void 0),(0,a.Cg)([(0,n.Fg)({context:g.iN,subscribe:!0}),(0,r.wk)()],y.prototype,"_states",void 0),(0,a.Cg)([(0,n.Fg)({context:g.xJ,subscribe:!0}),(0,r.wk)()],y.prototype,"_devicesReg",void 0),(0,a.Cg)([(0,n.Fg)({context:g.D5,subscribe:!0}),(0,r.wk)()],y.prototype,"_i18n",void 0),(0,a.Cg)([(0,n.Fg)({context:g.Ie,subscribe:!0})],y.prototype,"_api",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)()],y.prototype,"type",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],y.prototype,"expanded",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"narrow",void 0),(0,a.Cg)([(0,r.wk)()],y.prototype,"_filter",void 0),(0,a.Cg)([(0,r.P)("ha-list-selectable-virtualized")],y.prototype,"_listElement",void 0),y=(0,a.Cg)([(0,r.EM)("ha-filter-devices")],y),t()}catch(e){t(e)}})},40473(e,t,i){i.a(e,async function(e,t){try{i(74423),i(18111),i(22489),i(7588),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var a=i(28861),n=i(63018),s=i(11467),r=i(82476),l=i(5633),o=i(61062),d=i(93584),h=i(47749),c=i(98710),p=i(7346),u=i(62228),v=i(53821),g=i(742),m=i(78813),f=i(74153),_=i(34817),b=i(7578),y=(i(39369),i(12515),i(7407),i(96007)),x=(i(47551),i(31899),i(70773),i(10565),e([y]));y=(x.then?(await x)():x)[0];const w="M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z",C="M20 2H4C2.9 2 2 2.9 2 4V20C2 21.11 2.9 22 4 22H20C21.11 22 22 21.11 22 20V4C22 2.9 21.11 2 20 2M4 6L6 4H10.9L4 10.9V6M4 13.7L13.7 4H18.6L4 18.6V13.7M20 18L18 20H13.1L20 13.1V18M20 10.3L10.3 20H5.4L20 5.4V10.3Z";class $ extends s.WF{willUpdate(e){super.willUpdate(e),e.has("value")&&!(0,g.b)(this.value,e.get("value"))&&this._findRelated()}render(){const e=this._areas(this._areasReg,this._floorsReg);return s.qy` <ha-expansion-panel left-chevron .expanded=${this.expanded} @expanded-changed=${this._expandedChanged}> <div slot="header" class="header"> ${this._localize("ui.panel.config.areas.caption")} ${this.value?.areas?.length||this.value?.floors?.length?s.qy`<div class="badge"> ${(this.value?.areas?.length||0)+(this.value?.floors?.length||0)} </div> <ha-icon-button .path=${w} @click=${this._clearFilter} @keydown=${this._handleClearFilterKeydown}></ha-icon-button>`:s.s6} </div> </ha-expansion-panel> ${this._panel.showContent?s.qy` <div class="content" ${(0,o.K)(this._content)}> <ha-list-selectable class="ha-scrollbar" multi @ha-list-item-selected=${this._handleAdded} @ha-list-item-deselected=${this._handleRemoved} aria-label=${this._localize("ui.panel.config.areas.caption")}> ${(0,d.u)(e?.floors||[],e=>e.floor_id,e=>
1s.qy` <ha-list-item-option appearance="checkbox" selection-position="end" .value=${e.floor_id} .type=${"floors"} .selected=${this.value?.floors?.includes(e.floor_id)||!1}> <ha-floor-icon slot="start" .floor=${e}></ha-floor-icon> <span slot="headline">${e.name} </span> </ha-list-item-option> ${(0,d.u)(e.areas,(t,i)=>`${t.area_id}${i===e.areas.length-1?"___last":""}`,(t,i)=>this._renderArea(t,i===e.areas.length-1))} `)} ${(0,d.u)(e?.unassisgnedAreas,e=>e.area_id,e=>this._renderArea(e))} </ha-list-selectable> </div> `:s.s6} `}_renderArea(e,t=!1){const i=!!e.floor_id;return s.qy` <ha-list-item-option appearance="checkbox" selection-position="end" .value=${e.area_id} .selected=${this.value?.areas?.includes(e.area_id)||!1} .type=${"areas"} class=${(0,l.H)({rtl:(0,v.qC)(this._i18n.language,this._i18n.translationMetadata.translations),floor:i})}> ${i?s.qy`<ha-tree-indicator slot="start" .end=${t}></ha-tree-indicator>`:s.s6} ${e.icon?s.qy`<ha-icon slot="start" .icon=${e.icon}></ha-icon>`:s.qy`<ha-svg-icon slot="start" .path=${C}></ha-svg-icon>`} <span slot="headline">${e.name}</span> </ha-list-item-option> `}_handleAdded(e){this.value||(this.value={});const t=e.currentTarget.items[e.detail];t&&(this.value={...this.value,[t.type]:[...this.value[t.type]||[],t.value]})}_handleRemoved(e){if(!this.value)return;const t=e.currentTarget.items[e.detail];t&&(this.value={...this.value,[t.type]:this.value[t.type].filter(e=>e!==t.value)})}_expandedChanged(e){this.expanded=e.detail.expanded}async _findRelated(){const e=[];if(!this.value||!this.value.areas?.length&&!this.value.floors?.length)return this.value={},void(0,u.r)(this,"data-table-filter-changed",{value:{},items:void 0});if(this.value.areas)for(const t of this.value.areas)this.type&&e.push((0,_.f)(this._api,"area",t));if(this.value.floors)for(const t of this.value.floors)this.type&&e.push((0,_.f)(this._api,"floor",t));const t=await Promise.all(e),i=new Set;for(const e of t)e[this.type]&&e[this.type].forEach(e=>i.add(e));(0,u.r)(this,"data-table-filter-changed",{value:this.value,items:this.type?i:void 0})}_handleClearFilterKeydown(e){"Enter"!==e.key&&" "!==e.key||(e.stopPropagation(),this._clearFilter(e))}_clearFilter(e){e.preventDefault(),this.value=void 0,(0,u.r)(this,"data-table-filter-changed",{value:void 0,items:void 0}),this._list?.clearSelection()}static get styles(){return[b.dp,c.h,s.AH`ha-list-selectable{flex:1;min-height:0}.header{align-items:center;display:flex}.header ha-icon-button{margin-inline:auto 8px}.badge{margin-left:8px;box-sizing:border-box;border-radius:var(--ha-border-radius-circle);min-width:16px;font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);line-height:var(--ha-line-height-normal);text-align:center;color:var(--text-primary-color);margin-inline:8px 0;padding:0 2px;display:inline-block}.floor::part(base){padding-inline:48px 16px}ha-tree-indicator{width:56px;position:absolute;top:0;left:0}.rtl ha-tree-indicator{right:0;left:initial;transform:scaleX(-1)}.subdir{opacity:.6;margin-inline-end:8px}`]}constructor(...e){super(...e),this.narrow=!1,this.expanded=!1,this._content=(0,o._)(),this._panel=new c.N(this,this._content),this._areas=(0,h.A)((e,t)=>{const i=Object.values(e),a=Object.values(t),n=(0,f._o)(i),s=i.filter(e=>!e.floor_id||!n[e.floor_id]);return{floors:a?.map(e=>({...e,areas:n[e.floor_id]||[]})),unassisgnedAreas:s}})}}(0,a.Cg)([(0,r.wk)(),(0,p.IW)()],$.prototype,"_localize",void 0),(0,a.Cg)([(0,n.Fg)({context:m.wn,subscribe:!0}),(0,r.wk)()],$.prototype,"_areasReg",void 0),(0,a.Cg)([(0,n.Fg)({context:m.rf,subscribe:!0}),(0,r.wk)()],$.prototype,"_floorsReg",void 0),(0,a.Cg)([(0,n.Fg)({context:m.D5,subscribe:!0}),(0,r.wk)()],$.prototype,"_i18n",void 0),(0,a.Cg)([(0,n.Fg)({context:m.Ie,subscribe:!0})],$.prototype,"_api",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],$.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)()],$.prototype,"type",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],$.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],$.prototype,"expanded",void 0),(0,a.Cg)([(0,r.P)("ha-list-selectable")],$.prototype,"_list",void 0),$=(0,a.Cg)([(0,r.EM)("ha-filter-floor-areas")],$),t()}catch(e){t(e)}})},7473(e,t,i){i.a(e,async function(e,t){try{i(74423),i(18111),i(22489),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var a=i(28861),n=i(63018),s=i(11467),r=i(82476),l=i(61062),o=i(93584),d=i(47749),h=i(98710),c=i(7346),p=i(62228),u=i(38563),v=i(8399),g=i(78813),m=i(7578),f=(i(90733),i(39369),i(7407),i(96007)),_=i(26513),b=(i(799),i(71811),i(63543)),y=e([f,_,b]);[f,_,b]=y.then?(await y)():y;const x="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",w="M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z";class C extends s.WF{render(){return s.qy` <ha-expansion-panel left-chevron .expanded=${this.expanded} @expanded-changed=${this._expandedChanged}> <div slot="header" class="header"> ${this._localize("ui.panel.config.labels.caption")} ${this.value?.length?s.qy`<div class="badge">${this.value?.length}</div> <ha-icon-button .path=${w} @click=${this._clearFilter}></ha-icon-button>`:s.s6} </div> </ha-expansion-panel> ${this._panel.showContent?s.qy`<div class="content" ${(0,l.K)(this._content)}> <ha-input-search appearance="outlined" .value=${this._filter} @input=${this._handleSearchChange}> </ha-input-search> <ha-list @selected=${this._labelSelected} class="ha-scrollbar" multi> ${(0,o.u)(this._filteredLabels(this._labels||[],this._filter,this._i18n.locale.language,this.value),e=>e.label_id,e=>s.qy`<ha-check-list-item .value=${e.label_id} .selected=${(this.value||[]).includes(e.label_id)} hasMeta> <ha-label .color=${e.color} .description=${e.description}>
1 ${e.icon?s.qy`<ha-icon slot="icon" .icon=${e.icon}></ha-icon>`:s.s6} ${e.name} </ha-label> </ha-check-list-item>`)} </ha-list> <ha-list-item graphic="icon" @click=${this._manageLabels}> <ha-svg-icon slot="graphic" .path=${x}></ha-svg-icon> ${this._localize("ui.panel.config.labels.manage_labels")} </ha-list-item> </div>`:s.s6} `}_manageLabels(){(0,u.oo)("/config/labels")}_expandedChanged(e){this.expanded=e.detail.expanded}_handleSearchChange(e){const t=e.target.value??"";this._filter=t.toLowerCase()}async _labelSelected(e){const t=this._filteredLabels(this._labels||[],this._filter,this._i18n.locale.language,this.value),i=new Set(t.map(e=>e.label_id)),a=(this.value||[]).filter(e=>!i.has(e)),n=[];for(const i of e.detail.index){const e=t[i]?.label_id;e&&n.push(e)}const s=[...a,...n];this.value=s.length?s:[],(0,p.r)(this,"data-table-filter-changed",{value:s.length?s:void 0,items:void 0})}_clearFilter(e){e.preventDefault(),this.value=void 0,(0,p.r)(this,"data-table-filter-changed",{value:void 0,items:void 0})}static get styles(){return[m.dp,h.h,s.AH`ha-list{flex:1;min-height:0}.header{align-items:center;display:flex}.header ha-icon-button{margin-inline:auto 8px}.badge{margin-left:8px;box-sizing:border-box;border-radius:var(--ha-border-radius-circle);min-width:16px;font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);line-height:var(--ha-line-height-normal);text-align:center;color:var(--text-primary-color);margin-inline:8px 0;padding:0 2px;display:inline-block}.warning{color:var(--error-color)}ha-input-search{padding:var(--ha-space-1) var(--ha-space-2) 0;display:block}`]}constructor(...e){super(...e),this.narrow=!1,this.expanded=!1,this._content=(0,l._)(),this._panel=new h.N(this,this._content),this._filteredLabels=(0,d.A)((e,t,i,a)=>e.filter(e=>!t||e.name.toLowerCase().includes(t)||e.label_id.toLowerCase().includes(t)).sort((e,t)=>(0,v.xL)(e.name||e.label_id,t.name||t.label_id,i)))}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],C.prototype,"value",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],C.prototype,"expanded",void 0),(0,a.Cg)([(0,r.wk)(),(0,c.IW)()],C.prototype,"_localize",void 0),(0,a.Cg)([(0,n.Fg)({context:g.D5,subscribe:!0}),(0,r.wk)()],C.prototype,"_i18n",void 0),(0,a.Cg)([(0,n.Fg)({context:g.HD,subscribe:!0}),(0,r.wk)()],C.prototype,"_labels",void 0),(0,a.Cg)([(0,r.wk)()],C.prototype,"_filter",void 0),C=(0,a.Cg)([(0,r.EM)("ha-filter-labels")],C),t()}catch(e){t(e)}})},12515(e,t,i){var a=i(28861),n=i(11467),s=i(82476);i(7407),i(47551);const r=e=>{switch(e.level){case 0:return"M11,10H13V16H11V10M22,12H19V20H5V12H2L12,3L22,12M15,10A2,2 0 0,0 13,8H11A2,2 0 0,0 9,10V16A2,2 0 0,0 11,18H13A2,2 0 0,0 15,16V10Z";case 1:return"M12,3L2,12H5V20H19V12H22L12,3M10,8H14V18H12V10H10V8Z";case 2:return"M12,3L2,12H5V20H19V12H22L12,3M9,8H13A2,2 0 0,1 15,10V12A2,2 0 0,1 13,14H11V16H15V18H9V14A2,2 0 0,1 11,12H13V10H9V8Z";case 3:return"M12,3L22,12H19V20H5V12H2L12,3M15,11.5V10C15,8.89 14.1,8 13,8H9V10H13V12H11V14H13V16H9V18H13A2,2 0 0,0 15,16V14.5A1.5,1.5 0 0,0 13.5,13A1.5,1.5 0 0,0 15,11.5Z";case-1:return"M12,3L2,12H5V20H19V12H22L12,3M11,15H7V13H11V15M15,18H13V10H11V8H15V18Z"}return"M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z"};class l extends n.WF{render(){if(!this.floor)return n.s6;if(this.floor.icon)return n.qy`<ha-icon .icon=${this.floor.icon}></ha-icon>`;const e=r(this.floor);return n.qy`<ha-svg-icon .path=${e}></ha-svg-icon>`}}(0,a.Cg)([(0,s.MZ)({attribute:!1})],l.prototype,"floor",void 0),(0,a.Cg)([(0,s.MZ)()],l.prototype,"icon",void 0),l=(0,a.Cg)([(0,s.EM)("ha-floor-icon")],l),i.d(t,{},{Dc:e=>{switch(e.level){case 0:return"mdi:home-floor-0";case 1:return"mdi:home-floor-1";case 2:return"mdi:home-floor-2";case 3:return"mdi:home-floor-3";case-1:return"mdi:home-floor-negative-1"}return"mdi:home"},Si:r})},26513(e,t,i){i.a(e,async function(e,a){try{var n=i(28861),s=i(11467),r=i(82476),l=i(42867),o=i(72411),d=i(56823),h=i(37208),c=e([h]);h=(c.then?(await c)():c)[0];const p=e=>{const t=e?(0,l.MP)(e):void 0;return t?`--ha-label-background-color: ${t};\n       --primary-text-color: ${(0,o.gJ)(e)};`:"--ha-label-background-color: rgba(var(--rgb-primary-text-color), 0.15);"};class u extends s.WF{willUpdate(e){super.willUpdate(e),e.has("color")&&(this.style.cssText=p(this.color))}render(){return s.qy` <ha-tooltip .for=${this._elementId} .disabled=${!this.description?.trim()}> ${this.description} </ha-tooltip> <div class="container" .id=${this._elementId}> <span class="content"> <slot name="icon"></slot> <span class="label-content"> <slot></slot> </span> </span> </div> `}static get styles(){return[s.AH`:host{--ha-label-text-color:var(--primary-text-color);--ha-label-icon-color:var(--primary-text-color);--ha-label-background-opacity:1;border:1px solid var(--outline-color);box-sizing:border-box;font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-condensed);letter-spacing:.1px;border-radius:var(--ha-border-radius-xl);height:32px;color:var(--ha-label-text-color);--mdc-icon-size:12px;text-wrap:nowrap;flex-direction:row;align-items:center;display:inline-flex;position:relative}.content>*{flex-direction:row;align-items:center;display:inline-flex;position:relative}:host:before{content:"";border-radius:inherit;background-color:var(--ha-label-background-color);opacity:var(--ha-label-background-opacity);position:absolute;inset:0}::slotted([slot=icon]){margin-left:-8px;margin-right:8px;margin-inline:-8px 8px;display:flex}.container{align-items:center;height:100%;padding:0 16px;display:flex;position:relative}span{display:inline-flex}.label-content{display:contents}:host([dense]){border-radius:var(--ha-border-radius-md);height:20px}:host([dense]) .container{padding:0 12px}:host([dense]) ::slotted([slot=icon]){margin-left:-4px;margin-right:4px;margin-inline:-4px 4px}:host(.text-ellipsis){min-width:0;max-width:100%}:host(.text-ellipsis) .container{min-width:0;overflow:hidden}:host(.text-ellipsis) span.content{width:100%;min-width:0;display:flex}:host(.text-ellipsis) .label-content{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;max-width:100%;display:block;overflow:hidden}`]}constructor(...e){super(...e),this.dense=!1,this._elementId="label-"+(0,d.L)()}}(0,n.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],u.prototype,"dense",void 0),(0,n.Cg)([(0,r.MZ)()],u.prototype,"color",void 0),(0,n.Cg)([(0,r.MZ)({attribute:"description"})],u.prototype,"description",void 0),u=(0,n.Cg)([(0,r.EM)("ha-label")],u),i.d(t,{},{l:p}),a()}catch(e){a(e)}})},71811(e,t,i){var a=i(28861),n=i(74331),s=i(88148),r=i(11467),l=i(82476);class o extends n.J{renderRipple(){return this.noninteractive?"":super.renderRipple()}static get styles(){return[s.R,r.AH`: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{direction:var(--direction)!important;margin-inline-start:0!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important}span.material-icons:last-of-type{direction:var(--direction)!important;margin-inline:auto 0!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);flex-shrink:0;align-items:center}: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;margin-top:10px;display:inline-block;overflow:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text:before,: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?r.AH`span.material-icons:first-of-type,span.material-icons:last-of-type{--direction:rtl;direction:rtl!important}`:r.AH``]}}
1o=(0,a.Cg)([(0,l.EM)("ha-list-item")],o)},55925(e,t,i){i(18111),i(7588);var a=i(28861),n=i(82476),s=i(70773),r=i(29273),l=i(35640);class o extends((0,r._)(l.N)){optionIndexOf(e){if(!this.virtualizerElement||-1===this.rangeStart)return-1;const t=Array.from(this.virtualizerElement.children).indexOf(e);return-1===t?-1:this.rangeStart+t}clearSelection(){this.virtualizerElement&&-1!==this.rangeStart&&Array.from(this.virtualizerElement.children).forEach(e=>{e instanceof s.C&&e.selected&&e.toggleAttribute("selected",!1)})}}o=(0,a.Cg)([(0,n.EM)("ha-list-selectable-virtualized")],o)},35640(e,t,i){i(74423),i(18111),i(7588);var a=i(28861),n=i(11467),s=i(82476),r=i(62228),l=i(95921),o=i(81961),d=i(97536);class h extends d.N{willUpdate(e){this.hasUpdated||this._loadVirtualizer(),e.has("rows")&&(this.recomputeFocusableIndexes(),this.activeItemIndex=this.firstFocusableIndex)}async _loadVirtualizer(){await(0,l.i)(),this._virtualizerReady=!0}render(){return this._virtualizerReady?n.qy`<div part="base" class="base ha-scrollbar"> <lit-virtualizer .keyFunction=${this._keyFunction} tabindex="-1" scroller .items=${this.rows} .renderItem=${this.rowRenderer} style="height:100%;min-height:36px" .layout=${this._unpinned||void 0===this.pinIndex?void 0:{pin:{index:this.pinIndex,block:this.pinBlock}}} @unpinned=${this._handleUnpinned} @rangeChanged=${this._handleRangeChanged}> </lit-virtualizer> </div>`:n.s6}setActiveItemIndex(e,t=!1){this.hasFocusableItem?(this.activeItemIndex=Math.max(0,Math.min(this.rows.length-1,e)),this.isFocusable(this.activeItemIndex)||(this.activeItemIndex=this.firstFocusableIndex),this.activeItemIndex>=this.rangeStart&&this.activeItemIndex<=this.rangeEnd?this.applyActive(t):(this._activeItemFocus=t,this._scrollToActiveItem=!0,this.virtualizerElement?.element(this.activeItemIndex)?.scrollIntoView({block:"nearest"}))):this.activeItemIndex=-1}focusItemAtIndex(e){!this._virtualizerReady||e<0||this.setActiveItemIndex(e,!0)}applyActive(e){this.virtualizerElement&&this.rangeStart>-1&&Array.from(this.virtualizerElement.children).forEach((t,i)=>{const a=t;i+this.rangeStart===this.activeItemIndex?(a.tabIndex=0,e&&a.focus()):a.removeAttribute("tabindex")})}async _handleRangeChanged(e){if(this.rangeStart=e.first,this.rangeEnd=e.last,await(this.virtualizerElement?.layoutComplete),this._applySetSize(),!this.virtualizerElement)return;const t=this.activeItemIndex>=this.rangeStart&&this.activeItemIndex<=this.rangeEnd,i=this._scrollToActiveItem&&t&&this._activeItemFocus;this.applyActive(i),this._scrollToActiveItem&&t&&(this._activeItemFocus=!1,this._scrollToActiveItem=!1)}_applySetSize(){if(!this.virtualizerElement||this.rangeStart<0)return;const e=this.rows?.length??0;Array.from(this.virtualizerElement.children).forEach((t,i)=>{const a=t;a.setAttribute("aria-setsize",String(e)),a.setAttribute("aria-posinset",String(this.rangeStart+i+1))})}isFocusable(e){if(!this.rows[e])return!1;const{disabled:t=!1,interactive:i=!1}=this.rows[e];return i&&!t}get itemCount(){return this.rows?.length??0}moveFocus(e,t){this.hasFocusableItem&&(e.preventDefault(),t<0||t===this.activeItemIndex||(this.activeItemIndex=t,t<this.rangeStart||t>this.rangeEnd?(this._activeItemFocus=!0,this._scrollToActiveItem=!0,this.virtualizerElement?.element(this.activeItemIndex)?.scrollIntoView({block:"nearest"})):this.applyActive(!0)))}getPageSize(){return this.rangeStart<0||this.rangeEnd<0?super.getPageSize():Math.max(1,this.rangeEnd-this.rangeStart+1)}_handleUnpinned(){this._unpinned=!0}constructor(...e){super(...e),this._virtualizerReady=!1,this.pinBlock="center",this._unpinned=!1,this.rangeStart=-1,this.rangeEnd=-1,this._activeItemFocus=!1,this._scrollToActiveItem=!1,this.onFocusIn=e=>{if(!this.virtualizerElement||-1===this.rangeStart||-1===this.rangeEnd)return;const t=e.composedPath(),i=Array.from(this.virtualizerElement.children);for(let e=this.rangeStart;e<=this.rangeEnd;e++)if(t.includes(i[e-this.rangeStart]))return void(e!==this.activeItemIndex&&(this.activeItemIndex=e,e<this.rangeStart||e>this.rangeEnd?(this._activeItemFocus=!0,this._scrollToActiveItem=!0,this.virtualizerElement?.element(this.activeItemIndex)?.scrollIntoView({block:"nearest"})):this.applyActive(!1)))},this.onActivate=e=>{if(this.isFocusable(this.activeItemIndex)&&this.virtualizerElement&&this.activeItemIndex>=this.rangeStart&&this.activeItemIndex<=this.rangeEnd){const t=this.virtualizerElement?.children[this.activeItemIndex-this.rangeStart];t&&t instanceof o.o&&(e.preventDefault(),t.activate(),(0,r.r)(this,"ha-list-activated",{index:this.activeItemIndex,item:t}))}},this._keyFunction=e=>e.id,this.onItemRegister=e=>{e.stopPropagation()},this.onItemUnregister=e=>{e.stopPropagation()}}}h.styles=[...d.N.styles,n.AH`.base{height:100%}[ha-list-item]{width:100%}`],(0,a.Cg)([(0,s.wk)()],h.prototype,"_virtualizerReady",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"rows",void 0),(0,a.Cg)([(0,s.MZ)({attribute:!1})],h.prototype,"rowRenderer",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"pin-index",type:Number})],h.prototype,"pinIndex",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"pin-block"})],h.prototype,"pinBlock",void 0),(0,a.Cg)([(0,s.wk)()],h.prototype,"_unpinned",void 0),(0,a.Cg)([(0,s.P)("lit-virtualizer")],h.prototype,"virtualizerElement",void 0),(0,a.Cg)([(0,s.Ls)({passive:!0})],h.prototype,"_handleRangeChanged",null),(0,a.Cg)([(0,s.Ls)({passive:!0})],h.prototype,"_handleUnpinned",null),h=(0,a.Cg)([(0,s.EM)("ha-list-virtualized")],h),i.d(t,{N:()=>h})},74153(e,t,i){i.d(t,{},{KD:(e,t)=>e.callWS({type:"config/floor_registry/create",...t}),NL:(e,t,i)=>e.callWS({type:"config/floor_registry/update",floor_id:t,...i}),Rj:(e,t)=>e.callWS({type:"config/floor_registry/reorder",floor_ids:t}),_o:e=>{const t={};for(const i of e)i.floor_id&&(i.floor_id in t||(t[i.floor_id]=[]),t[i.floor_id].push(i));return t},ls:(e,t)=>e.callWS({type:"config/floor_registry/delete",floor_id:t})})},64108(e,t,i){var a=i(30835),n=i(38563),s=i(84336);i.d(t,{},{E:(e,t,i)=>{const r=(0,s.H)(t);r&&!(0,a.d)(e)||(i?i():(0,n.OE)(r))}})},27668(e,t,i){i.a(e,async function(e,a){try{i(18111),i(61701);var n=i(11467),s=i(65719),r=i(16651),l=i(90608),o=i(87258),d=i(95722),h=i(37208),c=(i(47551),e([h,l,o]));
1[h,l,o]=c.then?(await c)():c;const p="M18.66,2C18.4,2 18.16,2.09 17.97,2.28L16.13,4.13L19.88,7.88L21.72,6.03C22.11,5.64 22.11,5 21.72,4.63L19.38,2.28C19.18,2.09 18.91,2 18.66,2M3.28,4L2,5.28L8.5,11.75L4,16.25V20H7.75L12.25,15.5L18.72,22L20,20.72L13.5,14.25L9.75,10.5L3.28,4M15.06,5.19L11.03,9.22L14.78,12.97L18.81,8.94L15.06,5.19Z";function u(){return{title:"",hidden:!0,filterable:!0}}function v(e,t){return{title:e("ui.panel.config.generic.headers.entity_id"),defaultHidden:t,filterable:!0,sortable:!0}}function g(e){return{title:e("ui.panel.config.generic.headers.domain"),hidden:!0,groupable:!0,filterable:!0,sortable:!1}}function m(e){return{title:e("ui.panel.config.generic.headers.area"),groupable:!0,filterable:!0,sortable:!0,minWidth:"120px"}}function f(e){return{title:e("ui.panel.config.generic.headers.floor"),defaultHidden:!0,groupable:!0,filterable:!0,sortable:!0,minWidth:"120px"}}function _(e){return{title:e("ui.panel.config.generic.headers.category"),defaultHidden:!0,groupable:!0,filterable:!0,sortable:!0}}function b(e,t){return{title:e("ui.panel.config.generic.headers.editable"),type:"icon",showNarrow:!0,sortable:!0,minWidth:"88px",maxWidth:"88px",template:e=>n.qy` ${e.editable?n.s6:n.qy` <ha-svg-icon .id="icon-edit-${(0,r.Y)(e.entity_id)}" .path=${p} style="color:var(--secondary-text-color)"></ha-svg-icon> <ha-tooltip .for="icon-edit-${(0,r.Y)(e.entity_id)}" placement="left"> ${t} </ha-tooltip> `} `}}function y(){return{title:"",hidden:!0,filterable:!0,template:e=>e.label_entries.map(e=>e.name).join(" ")}}function x(e,t){return{title:e("ui.card.automation.last_triggered"),sortable:!0,template:i=>w(i.last_triggered,"last-triggered",i.entity_id,e,t)}}const w=(e,t,i,a,h)=>{if(!e||e===d.Hh||e===d.HV)return a("ui.components.relative_time.never");
1const c=new Date(e),p=new Date,u=(0,s.c)(p,c),v=(0,o.CL)(c,h.locale,h.config),g=t+"-"+(0,r.Y)(i);return n.qy` ${u>3?v:n.qy` <ha-tooltip for=${g}>${v}</ha-tooltip> <span id=${g}>${(0,l.K)(c,h.locale)}</span> `} `};function C(e,t){return{title:e("ui.panel.config.generic.headers.created_at"),defaultHidden:!0,sortable:!0,minWidth:"128px",template:e=>L(e.created_at,t)}}function $(e,t){return{title:e("ui.panel.config.generic.headers.modified_at"),defaultHidden:!0,sortable:!0,minWidth:"128px",template:e=>L(e.modified_at,t)}}const L=(e,t)=>e?(0,o.CL)(new Date(1e3*e),t.locale,t.config):n.s6;i.d(t,{A7:()=>m,AI:()=>y,Bl:()=>_,DZ:()=>v,N4:()=>x,Tr:()=>$,f8:()=>f,oO:()=>C,t:()=>u,tH:()=>b,vm:()=>g},{yx:w}),a()}catch(I){a(I)}})},26170(e,t,i){var a=i(62228);const n=()=>Promise.all([i.e(77184),i.e(34018),i.e(49927),i.e(22687),i.e(99151)]).then(i.bind(i,91550));i.d(t,{},{f:(e,t)=>{(0,a.r)(e,"show-dialog",{dialogTag:"dialog-label-detail",dialogImport:n,dialogParams:t})}})},88999(e,t,i){i(74423);i.d(t,{},{o:(e,t)=>`https://${e.config.version.includes("b")?"rc":e.config.version.includes("dev")?"next":"www"}.home-assistant.io${t}`})}};
2//# sourceMappingURL=85920.b297c8ba4311a30f.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.